3

我正在使用 ECR 来存储 docker 图像。在预览环境中,我对 values.yaml 进行了一些更改,以便从 ECR 中提取图像。

cat pim/dam/preview/values.yaml

expose:
  Annotations:
    helm.sh/hook: post-install,post-upgrade
    helm.sh/hook-delete-policy: hook-succeeded
  config:
    exposer: Ingress
    http: true
    tlsacme: false

cleanup:
  Args:
    - --cleanup
  Annotations:
    helm.sh/hook: pre-delete
    helm.sh/hook-delete-policy: hook-succeeded

preview:
  image:
    repository: abc.dkr.ecr.us-east-1.amazonaws.com/pim-dam
    tag:
    pullPolicy: IfNotPresent

当我运行时,jx preview --app pim-dam --dir ../.. 我可以看到extraValues.yaml正在创建的文件覆盖了我的values.yaml文件。问题extraValues.preview.image.repository是它在注册表名称后添加了组织,而 ECR 不是这种情况。我该如何覆盖extraValues.yaml?或者我如何告诉 Jenkinsx 不要包含 $ORG extraValues .yaml

当前的:

extraValues.preview.image.repository: $DOCKER_REGISTRY/$ORG/$APPNAME

必需的:

extraValues.preview.image.repository: $DOCKER_REGISTRY/$APPNAME

猫 extraValues.yaml

expose:
  Annotations:
    helm.sh/hook: post-install,post-upgrade
    helm.sh/hook-delete-policy: hook-succeeded
  config:
    domain: 54.183.236.166.nip.io
    exposer: Ingress
    http: "true"
preview:
  image:
    repository: abcd.dkr.ecr.us-east-1.amazonaws.com/tejesh-unbxd/pim-dam
    tag: 0.0.0-SNAPSHOT-PR-11-2

的输出jx version是:

NAME               VERSION
jx                 1.3.980
jenkins x platform 0.0.3513
Kubernetes cluster v1.10.6
kubectl            v1.12.1
helm client        v2.11.0+g2e55dbe
helm server        v2.12.2+g7d2b0c7
git                git version 2.14.4
Operating System   Unkown Linux distribution Linux version 4.14.72-73.55.amzn2.x86_64 (mockbuild@ip-10-0-1-219) (gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)) #1 SMP Thu Sep 27 23:37:24 UTC 2018
4

0 回答 0