This is an automated email from the ASF dual-hosted git repository.

Tejaskriya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ozone-helm-charts.git


The following commit(s) were added to refs/heads/main by this push:
     new 4c35a26  HDDS-15905. Cleanup and format templates (#47)
4c35a26 is described below

commit 4c35a26155da25cab8f17385051ebd6a6890d23b
Author: Denis Krivenko <[email protected]>
AuthorDate: Tue Sep 15 13:45:28 2026 +0200

    HDDS-15905. Cleanup and format templates (#47)
---
 charts/ozone/templates/_helpers.tpl                | 46 ++--------------------
 .../ozone/templates/helm/om-decommission-job.yaml  |  4 +-
 .../templates/helm/om-decommission-service.yaml    |  2 +-
 .../templates/helm/om-leader-transfer-job.yaml     |  4 +-
 charts/ozone/templates/om/om-statefulset.yaml      |  4 +-
 charts/ozone/templates/recon/recon-deployment.yaml |  2 +-
 charts/ozone/templates/recon/recon-service.yaml    |  2 +-
 charts/ozone/templates/s3g/s3g-statefulset.yaml    |  2 +-
 charts/ozone/templates/scm/scm-statefulset.yaml    |  2 +-
 9 files changed, 15 insertions(+), 53 deletions(-)

diff --git a/charts/ozone/templates/_helpers.tpl 
b/charts/ozone/templates/_helpers.tpl
index 59794b4..f7a250d 100644
--- a/charts/ozone/templates/_helpers.tpl
+++ b/charts/ozone/templates/_helpers.tpl
@@ -31,26 +31,6 @@ app.kubernetes.io/name: {{ .Chart.Name }}
 app.kubernetes.io/instance: {{ .Release.Name }}
 {{- end }}
 
-{{/* List of comma separated SCM pod names */}}
-{{- define "ozone.scm.pods" -}}
-  {{- $pods := list }}
-  {{- $replicas := .Values.scm.replicas | int }}
-  {{- range $i := until $replicas }}
-    {{- $pods = append $pods (printf "%s-scm-%d.%s-scm-headless" 
$.Release.Name $i $.Release.Name) }}
-  {{- end }}
-  {{- $pods | join "," }}
-{{- end }}
-
-{{/* List of comma separated OM pod names */}}
-{{- define "ozone.om.pods" -}}
-  {{- $pods := list }}
-  {{- $replicas := .Values.om.replicas | int }}
-  {{- range $i := until $replicas }}
-    {{- $pods = append $pods (printf "%s-om-%d.%s-om-headless" $.Release.Name 
$i $.Release.Name) }}
-  {{- end }}
-  {{- $pods | join "," }}
-{{- end }}
-
 {{/* List of comma separated om ids */}}
 {{- define "ozone.om.cluster.ids" -}}
   {{- $pods := list }}
@@ -120,22 +100,6 @@ app.kubernetes.io/instance: {{ .Release.Name }}
     {{- $nodes | join "," -}}
 {{- end }}
 
-{{/* List of decommission data nodes */}}
-{{- define "ozone.data.decommissioned.hosts" -}}
-    {{- $hosts := list }}
-    {{- $statefulset := lookup "apps/v1" "StatefulSet" $.Release.Namespace 
(printf "%s-datanode" $.Release.Name) -}}
-    {{- if $statefulset }}
-      {{- $oldCount := $statefulset.spec.replicas | int -}}
-      {{- $newCount := .Values.datanode.replicas | int }}
-        {{- range $i := until $oldCount }}
-          {{- if ge $i $newCount }}
-            {{- $hosts = append $hosts (printf 
"%s-datanode-%d.%s-datanode-headless.%s.svc.cluster.local" $.Release.Name $i 
$.Release.Name $.Release.Namespace) }}
-          {{- end }}
-        {{- end }}
-    {{- end }}
-    {{- $hosts | join "," -}}
-{{- end }}
-
 {{- define "ozone.configuration.env.common" -}}
 - name: OZONE-SITE.XML_hdds.datanode.dir
   value: /data/storage
@@ -149,8 +113,6 @@ app.kubernetes.io/instance: {{ .Release.Name }}
   value: {{ .Values.clusterId }}
 - name: OZONE-SITE.XML_ozone.scm.nodes.{{ .Values.clusterId }}
   value: {{ include "ozone.scm.cluster.ids" . }}
-  {{/*- name: OZONE-SITE.XML_ozone.scm.skip.bootstrap.validation*/}}
-  {{/*  value: {{ quote .Values.scm.skipBootstrapValidation }}*/}}
 {{- range $i, $val := until ( .Values.scm.replicas | int ) }}
 - name: {{ printf "OZONE-SITE.XML_ozone.scm.address.%s.%s-scm-%d" 
$.Values.clusterId $.Release.Name $i }}
   value: {{ printf "%s-scm-%d.%s-scm-headless.%s.svc.cluster.local" 
$.Release.Name $i $.Release.Name $.Release.Namespace }}
@@ -178,12 +140,12 @@ app.kubernetes.io/instance: {{ .Release.Name }}
 {{- $bOmNodes := ternary (splitList "," (include "ozone.om.bootstrap.nodes" 
.)) (list) (ne "" (include "ozone.om.bootstrap.nodes" .)) }}
 {{- $dOmNodes := ternary (splitList "," (include 
"ozone.om.decommissioned.nodes" .)) (list) (ne "" (include 
"ozone.om.decommissioned.nodes" .)) }}
 {{- $activeOmNodes := ternary (splitList "," (include "ozone.om.cluster.ids" 
.)) (list) (ne "" (include "ozone.om.cluster.ids" .)) }}
-{{ include "ozone.configuration.env.common" . }}
+{{- include "ozone.configuration.env.common" . }}
 {{- if gt (len $dOmNodes) 0 }}
 {{- $decomIds := $dOmNodes | join "," }}
 - name: OZONE-SITE.XML_ozone.om.decommissioned.nodes.{{ .Values.clusterId }}
   value: {{ $decomIds }}
-{{- else}}
+{{- else }}
 - name: OZONE-SITE.XML_ozone.om.decommissioned.nodes.{{ .Values.clusterId }}
   value: ""
 {{- end }}
@@ -205,7 +167,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
 {{- $dOmNodes := ternary (splitList "," (include 
"ozone.om.decommissioned.nodes" .)) (list) (ne "" (include 
"ozone.om.decommissioned.nodes" .)) }}
 {{- $activeOmNodes := ternary (splitList "," (include "ozone.om.cluster.ids" 
.)) (list) (ne "" (include "ozone.om.cluster.ids" .)) }}
 {{- $allOmNodes := concat $activeOmNodes $dOmNodes }}
-{{ include "ozone.configuration.env.common" . }}
+{{- include "ozone.configuration.env.common" . }}
 - name: OZONE-SITE.XML_ozone.om.decommissioned.nodes.{{ .Values.clusterId }}
   value: ""
 {{- range $tempId := $allOmNodes }}
@@ -217,4 +179,4 @@ app.kubernetes.io/instance: {{ .Release.Name }}
   value: {{ $allOmNodes | join "," }}
 - name: "OZONE-SITE.XML_ozone.om.address.{{ .Values.clusterId 
}}.om-leader-transfer"
   value: localhost
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/ozone/templates/helm/om-decommission-job.yaml 
b/charts/ozone/templates/helm/om-decommission-job.yaml
index 5f9be3e..83975a8 100644
--- a/charts/ozone/templates/helm/om-decommission-job.yaml
+++ b/charts/ozone/templates/helm/om-decommission-job.yaml
@@ -105,7 +105,7 @@ spec:
           persistentVolumeClaim:
             claimName: {{ $.Release.Name}}-om-{{ $dnode }}
         - name: om-data
-          emptyDir: { }
+          emptyDir: {}
         - name: config
           projected:
             sources:
@@ -117,4 +117,4 @@ spec:
       restartPolicy: Never
 {{- end }}
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/ozone/templates/helm/om-decommission-service.yaml 
b/charts/ozone/templates/helm/om-decommission-service.yaml
index 466c5c5..ceaa7ad 100644
--- a/charts/ozone/templates/helm/om-decommission-service.yaml
+++ b/charts/ozone/templates/helm/om-decommission-service.yaml
@@ -27,4 +27,4 @@ spec:
   type: ClusterIP
 {{- end }}
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/ozone/templates/helm/om-leader-transfer-job.yaml 
b/charts/ozone/templates/helm/om-leader-transfer-job.yaml
index e81c8a8..e7b3c77 100644
--- a/charts/ozone/templates/helm/om-leader-transfer-job.yaml
+++ b/charts/ozone/templates/helm/om-leader-transfer-job.yaml
@@ -84,7 +84,7 @@ spec:
       {{- end }}
       volumes:
         - name: om-data
-          emptyDir: { }
+          emptyDir: {}
         - name: config
           projected:
             sources:
@@ -96,4 +96,4 @@ spec:
       restartPolicy: Never
 
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/ozone/templates/om/om-statefulset.yaml 
b/charts/ozone/templates/om/om-statefulset.yaml
index 9c3c74d..ac59c97 100644
--- a/charts/ozone/templates/om/om-statefulset.yaml
+++ b/charts/ozone/templates/om/om-statefulset.yaml
@@ -173,7 +173,7 @@ spec:
               {{- end }}
         {{- if not .Values.om.persistence.enabled }}
         - name: {{ .Release.Name }}-om
-          emptyDir: { }
+          emptyDir: {}
         {{- end }}
   {{- if .Values.om.persistence.enabled }}
   volumeClaimTemplates:
@@ -192,4 +192,4 @@ spec:
         {{- with .Values.om.persistence.storageClassName }}
         storageClassName: {{ . }}
         {{- end }}
-  {{- end }}
\ No newline at end of file
+  {{- end }}
diff --git a/charts/ozone/templates/recon/recon-deployment.yaml 
b/charts/ozone/templates/recon/recon-deployment.yaml
index d33ede4..a350175 100644
--- a/charts/ozone/templates/recon/recon-deployment.yaml
+++ b/charts/ozone/templates/recon/recon-deployment.yaml
@@ -100,4 +100,4 @@ spec:
               {{- with .Values.configuration.filesFrom }}
                 {{- tpl (toYaml .) $ | nindent 14 }}
               {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/ozone/templates/recon/recon-service.yaml 
b/charts/ozone/templates/recon/recon-service.yaml
index fe21f1e..4fbbd78 100644
--- a/charts/ozone/templates/recon/recon-service.yaml
+++ b/charts/ozone/templates/recon/recon-service.yaml
@@ -43,4 +43,4 @@ spec:
   selector:
     {{- include "ozone.selectorLabels" . | nindent 4 }}
     app.kubernetes.io/component: recon
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/ozone/templates/s3g/s3g-statefulset.yaml 
b/charts/ozone/templates/s3g/s3g-statefulset.yaml
index 2bf758c..73e0f2c 100644
--- a/charts/ozone/templates/s3g/s3g-statefulset.yaml
+++ b/charts/ozone/templates/s3g/s3g-statefulset.yaml
@@ -129,4 +129,4 @@ spec:
         {{- with .Values.s3g.persistence.storageClassName }}
         storageClassName: {{ . }}
         {{- end }}
-  {{- end }}
\ No newline at end of file
+  {{- end }}
diff --git a/charts/ozone/templates/scm/scm-statefulset.yaml 
b/charts/ozone/templates/scm/scm-statefulset.yaml
index ac1bc81..ca155f6 100644
--- a/charts/ozone/templates/scm/scm-statefulset.yaml
+++ b/charts/ozone/templates/scm/scm-statefulset.yaml
@@ -204,4 +204,4 @@ spec:
         {{- with .Values.scm.persistence.storageClassName }}
         storageClassName: {{ . }}
         {{- end }}
-  {{- end }}
\ No newline at end of file
+  {{- end }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to