From 17b9baf00a49003abbc1ef4d2e91ba609e491418 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Wed, 24 Jul 2024 14:27:31 +0200 Subject: [PATCH] fix(base-cluster/kube-janitor): enable artifacthub-values and correctly prefix docker.io registry (#1048) --- .github/trusted_registries.yaml | 2 ++ charts/base-cluster/ci/artifacthub-values.yaml | 2 ++ .../base-cluster/templates/global/kube-janitor.yaml | 13 ++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/trusted_registries.yaml b/.github/trusted_registries.yaml index 808a02d9f..02efb03b2 100644 --- a/.github/trusted_registries.yaml +++ b/.github/trusted_registries.yaml @@ -10,6 +10,8 @@ registries: curl: ALL_TAGS fluxcd: ALL_IMAGES grafana: ALL_IMAGES + hjacobs: + kube-janitor: ALL_TAGS stellio: ALL_IMAGES velero: ALL_IMAGES vladgh: diff --git a/charts/base-cluster/ci/artifacthub-values.yaml b/charts/base-cluster/ci/artifacthub-values.yaml index 9025befe2..da5d0edcb 100644 --- a/charts/base-cluster/ci/artifacthub-values.yaml +++ b/charts/base-cluster/ci/artifacthub-values.yaml @@ -27,3 +27,5 @@ monitoring: pagerduty: enabled: true integrationKey: INTEGRATION_KEY +kube-janitor: + enabled: true diff --git a/charts/base-cluster/templates/global/kube-janitor.yaml b/charts/base-cluster/templates/global/kube-janitor.yaml index 62ff5eda5..1c0daafb5 100644 --- a/charts/base-cluster/templates/global/kube-janitor.yaml +++ b/charts/base-cluster/templates/global/kube-janitor.yaml @@ -14,16 +14,11 @@ spec: mode: enabled values: priorityClassName: cluster-components - {{- $image := dict -}} - {{- if .Values.global.imageRegistry -}} - {{- $image = set $image "repository" (printf "%s/hjacobs/kube-janitor" $.Values.global.imageRegistry) -}} - {{- end }} - {{- with dig "kube-janitor" "charts" "kube-janitor" "tag" "" .Values.global.helmRepositories -}} - {{- $image = set $image "tag" . -}} - {{- end }} - {{- with $image }} - image: {{- toYaml $image | nindent 6 }} + {{- $image := dict "repository" (printf "%s/hjacobs/kube-janitor" ($.Values.global.imageRegistry | default (include "base-cluster.defaultRegistry" (dict)))) -}} + {{- with dig "kube-janitor" "charts" "kube-janitor" "tag" "" .Values.global.helmRepositories -}} + {{- $image = set $image "tag" . -}} {{- end }} + image: {{- toYaml $image | nindent 6 }} resources: limits: memory: 1Gi