Kubernetes: How to set boolean type variable in configMap

后端 未结 1 1421
一个人的身影
一个人的身影 2021-01-22 02:54

I want to set a boolean variable in configMap (or secret):

apiVersion: v1
kind: ConfigMap
metadata:
  name: env-config
  namespace: mlo-stage
data:
  webpack_dev_         


        
相关标签:
1条回答
  • 2021-01-22 03:08

    Values in a ConfigMap must be key-value string values or files.

    Change:

    data:
      webpack_dev_server: false
    

    To:

    data:
      webpack_dev_server: "false"
    

    To your question:

    what should I do if I want to pass a boolean as value?

    You may handle this in the application, transform from string to bool.

    0 讨论(0)
提交回复
热议问题