feat: made argocd image updater cm and secret name templated

Signed-off-by: AvivGuiser <avivguiser@gmail.com>
This commit is contained in:
AvivGuiser 2024-10-29 09:59:47 +02:00
parent b0578c4001
commit cf32a4bfb2
5 changed files with 20 additions and 20 deletions

View file

@ -4,7 +4,7 @@ kind: ConfigMap
metadata: metadata:
labels: labels:
{{- include "argocd-image-updater.labels" . | nindent 4 }} {{- include "argocd-image-updater.labels" . | nindent 4 }}
name: argocd-image-updater-authscripts name: {{ include "argocd-image-updater.fullname" . }}-authscripts
namespace: {{ include "argocd-image-updater.namespace" . | quote }} namespace: {{ include "argocd-image-updater.namespace" . | quote }}
data: data:
{{- toYaml .Values.authScripts.scripts | nindent 2}} {{- toYaml .Values.authScripts.scripts | nindent 2}}

View file

@ -3,7 +3,7 @@ kind: ConfigMap
metadata: metadata:
labels: labels:
{{- include "argocd-image-updater.labels" . | nindent 4 }} {{- include "argocd-image-updater.labels" . | nindent 4 }}
name: argocd-image-updater-ssh-config name: {{ include "argocd-image-updater.fullname" . }}-sshconfig
namespace: {{ include "argocd-image-updater.namespace" . | quote }} namespace: {{ include "argocd-image-updater.namespace" . | quote }}
{{- with .Values.config.sshConfig }} {{- with .Values.config.sshConfig }}
data: data:

View file

@ -4,7 +4,7 @@ kind: ConfigMap
metadata: metadata:
labels: labels:
{{- include "argocd-image-updater.labels" . | nindent 4 }} {{- include "argocd-image-updater.labels" . | nindent 4 }}
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
namespace: {{ include "argocd-image-updater.namespace" . | quote }} namespace: {{ include "argocd-image-updater.namespace" . | quote }}
data: data:
{{- with .Values.config.applicationsAPIKind }} {{- with .Values.config.applicationsAPIKind }}

View file

@ -44,79 +44,79 @@ spec:
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: applications_api key: applications_api
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: ARGOCD_GRPC_WEB - name: ARGOCD_GRPC_WEB
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: argocd.grpc_web key: argocd.grpc_web
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: ARGOCD_SERVER - name: ARGOCD_SERVER
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: argocd.server_addr key: argocd.server_addr
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: ARGOCD_INSECURE - name: ARGOCD_INSECURE
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: argocd.insecure key: argocd.insecure
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: ARGOCD_PLAINTEXT - name: ARGOCD_PLAINTEXT
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: argocd.plaintext key: argocd.plaintext
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: ARGOCD_TOKEN - name: ARGOCD_TOKEN
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
key: argocd.token key: argocd.token
name: argocd-image-updater-secret name:{{ include "argocd-image-updater.fullname" . }}-secret
optional: true optional: true
- name: IMAGE_UPDATER_LOGLEVEL - name: IMAGE_UPDATER_LOGLEVEL
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: log.level key: log.level
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: GIT_COMMIT_USER - name: GIT_COMMIT_USER
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: git.user key: git.user
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: GIT_COMMIT_EMAIL - name: GIT_COMMIT_EMAIL
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: git.email key: git.email
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: IMAGE_UPDATER_KUBE_EVENTS - name: IMAGE_UPDATER_KUBE_EVENTS
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: kube.events key: kube.events
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: GIT_COMMIT_SIGNING_KEY - name: GIT_COMMIT_SIGNING_KEY
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: git.commit-signing-key key: git.commit-signing-key
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: GIT_COMMIT_SIGNING_METHOD - name: GIT_COMMIT_SIGNING_METHOD
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: git.commit-signing-method key: git.commit-signing-method
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
- name: GIT_COMMIT_SIGN_OFF - name: GIT_COMMIT_SIGN_OFF
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
key: git.commit-sign-off key: git.commit-sign-off
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
{{- with .Values.extraEnv }} {{- with .Values.extraEnv }}
{{- toYaml . | nindent 10 }} {{- toYaml . | nindent 10 }}
@ -177,13 +177,13 @@ spec:
path: registries.conf path: registries.conf
- key: git.commit-message-template - key: git.commit-message-template
path: commit.template path: commit.template
name: argocd-image-updater-config name: {{ include "argocd-image-updater.fullname" . }}-config
optional: true optional: true
name: image-updater-conf name: image-updater-conf
{{- if .Values.authScripts.enabled }} {{- if .Values.authScripts.enabled }}
- configMap: - configMap:
defaultMode: 0777 defaultMode: 0777
name: argocd-image-updater-authscripts name: {{ include "argocd-image-updater.fullname" . }}-authscripts
name: authscripts name: authscripts
{{- end }} {{- end }}
- configMap: - configMap:
@ -191,7 +191,7 @@ spec:
optional: true optional: true
name: ssh-known-hosts name: ssh-known-hosts
- configMap: - configMap:
name: argocd-image-updater-ssh-config name: {{ include "argocd-image-updater.fullname" . }}-sshconfig
optional: true optional: true
name: ssh-config name: ssh-config
- name: ssh-signing-key - name: ssh-signing-key

View file

@ -2,7 +2,7 @@
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: argocd-image-updater-secret name: {{ include "argocd-image-updater.fullname" . }}-secret
namespace: {{ include "argocd-image-updater.namespace" . | quote }} namespace: {{ include "argocd-image-updater.namespace" . | quote }}
labels: labels:
{{- include "argocd-image-updater.labels" . | nindent 4 }} {{- include "argocd-image-updater.labels" . | nindent 4 }}