如何使用openshift中的参数更新configmap数据?

时间:2020-08-21 06:37:15

标签: yaml openshift-origin openshift-3 okd

我有以下openshift模板:

kind: Template
metadata:
  name: test-python
  annotations:
    tags: python,django
    iconClass: icon-python

objects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: war-config

    data:
      POSTGRES_PASSWORD: qwerty
      POSTGRES_USER: warrior
      warrior_conf.conf: |
        [WARRIOR]
        API_URL=${api_url}
        MGMT_SVC_1=ne-mgmt-svc
        MGMT_SVC_2=manager-svc

.
.
.
.
<other -resources>
.
.
.



parameters:
  - name: "api_url"
    description: Enter the api_url
    value: test.svc
    required: true


此处传递了api_url作为参数,但是在部署模板后在此处发出问题,配置映射中的参数未替换为所需的值,即:test.svc而是保留为{{ 1}}

如果我必须遵循一些其他语法来使用参数进行更新,请建议我。

0 个答案:

没有答案
相关问题