From f9744207c73fcfad222dd21dae30b8b9b2c97c12 Mon Sep 17 00:00:00 2001 From: ss-rishang Date: Thu, 18 Sep 2025 23:31:20 +0530 Subject: [PATCH 1/4] Update ingress.yaml --- templates/ingress.yaml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index b844ec4..eb46b06 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -43,31 +43,17 @@ metadata: {{- end }} annotations: "helm.sh/chart": "{{ $.Chart.Name }}-{{ $.Chart.Version }}" - {{- if $.Values.ingress.certmanager }} - {{- $addClusterIssuer := true }} - {{- $addIngressClass := true }} {{- range $annotationName, $annotationValue := $.Values.ingress.annotations }} - {{- if or (eq $annotationName "cert-manager.io/cluster-issuer") (eq $annotationName "certmanager.k8s.io/cluster-issuer") (eq $annotationName "cert-manager.io/issuer") (eq $annotationName "certmanager.k8s.io/issuer") }} - {{- $addClusterIssuer = false }} - {{- end }} - {{- if or (eq $annotationName "acme.cert-manager.io/http01-ingress-class") (eq $annotationName "certmanager.k8s.io/http01-ingress-class") }} - {{- $addIngressClass = false }} - {{- end }} {{ $annotationName | quote }}: {{ $annotationValue | quote }} {{- end }} + {{- if and $.Values.ingress.certmanager $.Values.ingress.tls }} {{- if ne (printf "%s" $tlsSecretName) "" }} - {{- if $addClusterIssuer }} - cert-manager.io/cluster-issuer: {{ $.Values.ingress.tlsClusterIssuer | default "lets-encrypt-http-issuer" | quote }} - certmanager.k8s.io/cluster-issuer: {{ $.Values.ingress.tlsClusterIssuer | default "lets-encrypt-http-issuer" | quote }} - {{- end }} - {{- if $addIngressClass }} - acme.cert-manager.io/http01-ingress-class: {{ $.Values.ingress.ingressClass | default "nginx" | quote }} - certmanager.k8s.io/http01-ingress-class: {{ $.Values.ingress.ingressClass | default "nginx" | quote }} + {{- if not (hasKey $.Values.ingress.annotations "cert-manager.io/cluster-issuer") }} + cert-manager.io/cluster-issuer: {{ $.Values.ingress.tlsClusterIssuer | default "cert-manager-letsencrypt" | quote }} {{- end }} + {{- if not (hasKey $.Values.ingress.annotations "acme.cert-manager.io/http01-edit-in-place") }} + acme.cert-manager.io/http01-edit-in-place: "true" {{- end }} - {{- else }} - {{- range $annotationName, $annotationValue := $.Values.ingress.annotations }} - {{ $annotationName | quote }}: {{ $annotationValue | quote }} {{- end }} {{- end }} spec: @@ -131,4 +117,4 @@ spec: {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From bf4de37427652b10cbe2c98453fd1e27d824c6c1 Mon Sep 17 00:00:00 2001 From: ss-rishang Date: Tue, 30 Sep 2025 07:14:07 +0000 Subject: [PATCH 2/4] add: configmap fix: deployment revisionhistory limit --- templates/config-map.yaml | 31 +++++++++++++++++++++++++++++++ templates/deployment.yaml | 3 ++- templates/ingress.yaml | 2 +- values.yaml | 5 +++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 templates/config-map.yaml diff --git a/templates/config-map.yaml b/templates/config-map.yaml new file mode 100644 index 0000000..9ad79bc --- /dev/null +++ b/templates/config-map.yaml @@ -0,0 +1,31 @@ +{{- if .Values.configmap }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.configmap.name | default .Release.Name | quote }} + labels: + "app.kubernetes.io/name": {{ .Release.Name | quote }} + "app.kubernetes.io/managed-by": {{ .Release.Service | quote }} + {{- range $labelName, $labelValue := .Values.labels }} + {{ $labelName | quote }}: {{ $labelValue | quote }} + {{- end }} + annotations: + "helm.sh/chart": "{{ .Chart.Name }}-{{ .Chart.Version }}" + {{- range $annotationName, $annotationValue := .Values.annotations }} + {{ $annotationName | quote }}: {{ $annotationValue | quote }} + {{- end }} + {{- range $annotationName, $annotationValue := .Values.configmap.annotations }} + {{ $annotationName | quote }}: {{ $annotationValue | quote }} + {{- end }} +data: + {{- if .Values.configmap.data }} + {{- range $key, $value := .Values.configmap.data }} + {{- if kindIs "string" $value }} + {{ $key }}: {{ $value | quote }} + {{- else }} + {{ $key }}: {{ $value | toYaml | quote }} + {{- end }} + {{- end }} + {{- else }} + {{- end }} +{{- end }} diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 180bf94..1694523 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -40,6 +40,7 @@ metadata: {{- end }} spec: replicas: {{ $.Values.replicas | default 1 }} + revisionHistoryLimit: {{ $.Values.revisionHistoryLimit | default 3 }} {{- if eq $kind "Deployment" }} strategy: {{- if $.Values.rollingUpdate }} @@ -184,7 +185,7 @@ spec: {{ toYaml $.Values.ephemeralContainers | indent 8 }} containers: {{- range $containerIndex, $container := $.Values.containers }} - - image: {{ $container.image | quote }} + - image: "{{ $container.image }}:{{ $container.imageTag | default "latest" }}" {{- if $container.name }} name: {{ $container.name | quote }} {{- else }} diff --git a/templates/ingress.yaml b/templates/ingress.yaml index eb46b06..38456be 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -117,4 +117,4 @@ spec: {{- end }} {{- end }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/values.yaml b/values.yaml index 3280c2c..716d608 100644 --- a/values.yaml +++ b/values.yaml @@ -6,6 +6,11 @@ containers: [] initContainers: [] +configmap: + data: {} + labels: {} + annotations: {} + service: type: ClusterIP labels: {} From 66eed030fd18aaf5aa6c29544d38e20f7844e948 Mon Sep 17 00:00:00 2001 From: ss-rishang Date: Tue, 30 Sep 2025 07:22:44 +0000 Subject: [PATCH 3/4] fix: configmap default value --- values.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/values.yaml b/values.yaml index 716d608..93c06a4 100644 --- a/values.yaml +++ b/values.yaml @@ -6,10 +6,7 @@ containers: [] initContainers: [] -configmap: - data: {} - labels: {} - annotations: {} +configmap: {} service: type: ClusterIP From 79367ad6a0a5c93a0dc1860e792dc16a00018338 Mon Sep 17 00:00:00 2001 From: ss-rishang Date: Thu, 9 Oct 2025 11:13:53 +0000 Subject: [PATCH 4/4] remove: invalid serviceaccount config correct key is serviceAccountName --- templates/deployment.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 1694523..d880971 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -161,9 +161,6 @@ spec: {{- if $.Values.schedulerName }} schedulerName: {{ $.Values.schedulerName }} {{- end }} - {{- if $.Values.serviceAccount }} - serviceAccount: {{ $.Values.serviceAccount }} - {{- end }} {{- if $.Values.serviceAccountName }} serviceAccountName: {{ $.Values.serviceAccountName }} {{- end }}