fix: Add more customization options to commit-server

Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Marco Maurer 2025-02-04 00:42:29 +01:00
parent cc37c6f709
commit 4cacadf5fd
No known key found for this signature in database
3 changed files with 27 additions and 5 deletions

View file

@ -1,5 +1,6 @@
kind: NetworkPolicy
{{- if .Values.global.networkPolicy.create }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "argo-cd.commitServer.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
@ -21,3 +22,4 @@ spec:
- namespaceSelector: { }
ports:
- port: 8087
{{- end }}

View file

@ -3,6 +3,17 @@ kind: Service
metadata:
name: {{ template "argo-cd.commitServer.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 4 }}
{{- with .Values.commitServer.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.commitServer.service.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
ports:
- name: server

View file

@ -1,9 +1,18 @@
{{- if .Values.commitServer.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: argocd-commit-server
app.kubernetes.io/part-of: argocd
app.kubernetes.io/component: commit-server
name: {{ include "argo-cd.commitServer.serviceAccountName" . }}
namespace: {{ include "argo-cd.namespace" . }}
{{- with .Values.commitServer.serviceAccount.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 4 }}
{{- with .Values.commitServer.serviceAccount.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}