我从 FluxCD 开始,我希望使用推送到 docker 注册表的每个新图像来更新我的 helm 版本。到目前为止,我有我的政策并且已经imageautomation
到位 - 工作正常,我可以看到 git repo 已使用最新的 docker 标签进行了更新。现在的问题是虽然helmrelease
kustomization 文件在 git 中使用新标签进行了更新,但它并没有将更改应用到helmrelease
集群中。我将不胜感激有关未配置内容的任何提示。您可以在下面看到我与上下文配置相关的内容:
# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: tor
resources:
- ./../application/stat
- ./fluxkustomize.yaml
#fluxkustomize.yaml
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: stat
namespace: tor
spec:
interval: 1m0s
prune: false
sourceRef:
kind: GitRepository
name: gitops
namespace: tor
images:
- name: ecr/tor
newName: ecr/tor # {"$imagepolicy": "tor:stat:name"}
# based on policy, latest tag was updated in git accordingly
newTag: 1.3.4 # {"$imagepolicy": "tor:stat:tag"}
# ../application/stat/helmrelease.yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: stat
spec:
values:
api:
image:
repository: ecr/tor
image:
tag: 1.3.0
interval: 1m0s
releaseName: stat
chart:
spec:
chart: ./helm/stat
interval: 1m0s
valuesFile: ./helm/stat/values.yaml
sourceRef:
kind: GitRepository
name: stat
namespace: tor