'ConfigMap having a an Array of db names as data

Friends

Im writing a configMap containing an array of postgres db names. Approach 1 throws an error like scalar value is expected at postgres.db.name

apiVersion: v1
kind: ConfigMap
metadata:
  name: postgres-init
data:
  postgres.host: "postgreshost"
  postgres.db.name: {"postgredb1","postgredb1", "postgredb3"}

Here is Approach 2 ie postgres.db.name having db names separated by comma

----
apiVersion: v1
kind: ConfigMap
metadata:
  name: postgres-init
data:
  postgres.host: postgreshost
  postgres.db.name: postgredb1,postgredb1,postgredb3

Which is the correct way to achieve db names as an array ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source