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

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 47ac18da [charts] Organize admin charts  Configure (#456)
47ac18da is described below

commit 47ac18da5fae1031aaab5eade113e53fd870d0bf
Author: mfordjody <[email protected]>
AuthorDate: Mon Oct 14 08:57:38 2024 +0800

    [charts] Organize admin charts  Configure (#456)
---
 .../templates/custom/jobs/jobs-crds-scripts.yaml   | 29 ----------
 .../admin/templates/custom/jobs/jobs-crds.yaml     | 37 ------------
 .../admin/templates/custom/jobs/jobs-scripts.yaml  | 67 ++++++++++++++++++++++
 .../nacos/{nacos-cm.yaml => nacos-configmap.yaml}  |  0
 .../nacos/{nacos-svc.yaml => nacos-service.yaml}   |  0
 .../{nacos-sts.yaml => nacos-statefulset.yaml}     |  0
 .../zookeeper-configmap.yaml}                      |  0
 .../zookeeper-service.yaml}                        |  0
 .../zookeeper-statefulset.yaml}                    |  0
 manifests/charts/base/templates/crds.yaml          |  3 -
 10 files changed, 67 insertions(+), 69 deletions(-)

diff --git 
a/manifests/charts/admin/templates/custom/jobs/jobs-crds-scripts.yaml 
b/manifests/charts/admin/templates/custom/jobs/jobs-crds-scripts.yaml
deleted file mode 100644
index 98dcd143..00000000
--- a/manifests/charts/admin/templates/custom/jobs/jobs-crds-scripts.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-{{- $jobs := .Values.jobs }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ template "job.name" . }}-crds-scripts
-  namespace: {{ template "job.namespace" . }}
-  labels:
-  {{- include "job.labels" . | nindent 4 }}
-  {{- with $jobs.labels }}
-  {{- toYaml . | nindent 4 }}
-  {{- end }}
-  annotations:
-    "helm.sh/hook": "pre-install"
-    "helm.sh/hook-weight": "1"
-    "helm.sh/hook-delete-policy": "before-hook-creation"
-  {{- with $jobs.annotations }}
-  {{- toYaml . | nindent 4 }}
-  {{- end }}
-data:
-  install_crds.sh: |-
-    #!/usr/bin/bash
-    # Control plane custom resource definition creation.
-    $CRDS_FILE="/admin/crds"
-    if [ -s $CRDS_FILE ]; then
-      echo "$CRDS_FILE Detected this file, currently adding CRDs..."
-      kubectl apply -f $CRDS_FILE
-    else
-      echo "$CRDS_FILE The file was not found. Please check the directory path 
or other possible reasons."
-    fi
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/custom/jobs/jobs-crds.yaml 
b/manifests/charts/admin/templates/custom/jobs/jobs-crds.yaml
deleted file mode 100644
index b330dd78..00000000
--- a/manifests/charts/admin/templates/custom/jobs/jobs-crds.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-{{- $jobs := .Values.jobs }}
-apiVersion: batch/v1
-kind: Job
-metadata:
-  name: {{ template "job.name" . }}-crds
-  namespace: {{ template "job.namespace" . }}
-  labels:
-  {{- include "job.labels" . | nindent 4 }}
-  {{- with $jobs.labels }}
-  {{- toYaml . | nindent 4 }}
-  {{- end }}
-  annotations:
-    "helm.sh/hook": "pre-upgrade,pre-install"
-    "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
-  {{- with $jobs.annotations }}
-  {{- toYaml . | nindent 4 }}
-  {{- end }}
-spec:
-  template:
-    metadata:
-      name: {{ template "job.name" . }}-crds
-      namespace: {{ template "job.namespace" . }}
-    spec:
-      restartPolicy: {{ $jobs.restartPolicy }}
-      containers:
-      - name: kubectl
-        image: {{ $jobs.image.registry }}:{{ $jobs.image.tag }}
-        imagePullPolicy: {{ $jobs.image.pullPolicy }}
-        volumeMounts:
-        - name: scripts
-          mountPath: /scripts/install_crds.sh
-          subPath: install_crds.sh
-      volumes:
-      - name: scripts
-        configMap:
-          name: {{ template "job.name" . }}-crds-scripts
-          defaultMode: 0755
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/custom/jobs/jobs-scripts.yaml 
b/manifests/charts/admin/templates/custom/jobs/jobs-scripts.yaml
new file mode 100644
index 00000000..e0cdb24a
--- /dev/null
+++ b/manifests/charts/admin/templates/custom/jobs/jobs-scripts.yaml
@@ -0,0 +1,67 @@
+{{- $jobs := .Values.jobs }}
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ template "job.name" . }}-crds
+  namespace: {{ template "job.namespace" . }}
+  labels:
+  {{- include "job.labels" . | nindent 4 }}
+  {{- with $jobs.labels }}
+  {{- toYaml . | nindent 4 }}
+  {{- end }}
+  annotations:
+    "helm.sh/hook": "pre-upgrade,pre-install"
+    "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
+  {{- with $jobs.annotations }}
+  {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  template:
+    metadata:
+      name: {{ template "job.name" . }}-crds
+      namespace: {{ template "job.namespace" . }}
+    spec:
+      restartPolicy: {{ $jobs.restartPolicy }}
+      containers:
+        - name: kubectl
+          image: {{ $jobs.image.registry }}:{{ $jobs.image.tag }}
+          imagePullPolicy: {{ $jobs.image.pullPolicy }}
+          volumeMounts:
+            - name: scripts
+              mountPath: /scripts/install_crds.sh
+              subPath: install_crds.sh
+      volumes:
+        - name: scripts
+          configMap:
+            name: {{ template "job.name" . }}-crds-scripts
+            defaultMode: 0755
+---
+{{- $jobs := .Values.jobs }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "job.name" . }}-crds-scripts
+  namespace: {{ template "job.namespace" . }}
+  labels:
+  {{- include "job.labels" . | nindent 4 }}
+  {{- with $jobs.labels }}
+  {{- toYaml . | nindent 4 }}
+  {{- end }}
+  annotations:
+    "helm.sh/hook": "pre-install"
+    "helm.sh/hook-weight": "1"
+    "helm.sh/hook-delete-policy": "before-hook-creation"
+  {{- with $jobs.annotations }}
+  {{- toYaml . | nindent 4 }}
+  {{- end }}
+data:
+  install_crds.sh: |-
+    #!/usr/bin/bash
+    # Control plane custom resource definition creation.
+    $CRDS_FILE="/admin/crds"
+    if [ -s $CRDS_FILE ]; then
+      echo "$CRDS_FILE Detected this file, currently adding CRDs..."
+      kubectl apply -f $CRDS_FILE
+    else
+      echo "$CRDS_FILE The file was not found. Please check the directory path 
or other possible reasons."
+    fi
\ No newline at end of file
diff --git a/manifests/charts/admin/templates/register/nacos/nacos-cm.yaml 
b/manifests/charts/admin/templates/register/nacos/nacos-configmap.yaml
similarity index 100%
rename from manifests/charts/admin/templates/register/nacos/nacos-cm.yaml
rename to manifests/charts/admin/templates/register/nacos/nacos-configmap.yaml
diff --git a/manifests/charts/admin/templates/register/nacos/nacos-svc.yaml 
b/manifests/charts/admin/templates/register/nacos/nacos-service.yaml
similarity index 100%
rename from manifests/charts/admin/templates/register/nacos/nacos-svc.yaml
rename to manifests/charts/admin/templates/register/nacos/nacos-service.yaml
diff --git a/manifests/charts/admin/templates/register/nacos/nacos-sts.yaml 
b/manifests/charts/admin/templates/register/nacos/nacos-statefulset.yaml
similarity index 100%
rename from manifests/charts/admin/templates/register/nacos/nacos-sts.yaml
rename to manifests/charts/admin/templates/register/nacos/nacos-statefulset.yaml
diff --git a/manifests/charts/admin/templates/register/zk/zk-cm.yaml 
b/manifests/charts/admin/templates/register/zookeeper/zookeeper-configmap.yaml
similarity index 100%
rename from manifests/charts/admin/templates/register/zk/zk-cm.yaml
rename to 
manifests/charts/admin/templates/register/zookeeper/zookeeper-configmap.yaml
diff --git a/manifests/charts/admin/templates/register/zk/zk-svc.yaml 
b/manifests/charts/admin/templates/register/zookeeper/zookeeper-service.yaml
similarity index 100%
rename from manifests/charts/admin/templates/register/zk/zk-svc.yaml
rename to 
manifests/charts/admin/templates/register/zookeeper/zookeeper-service.yaml
diff --git a/manifests/charts/admin/templates/register/zk/zk-sts.yaml 
b/manifests/charts/admin/templates/register/zookeeper/zookeeper-statefulset.yaml
similarity index 100%
rename from manifests/charts/admin/templates/register/zk/zk-sts.yaml
rename to 
manifests/charts/admin/templates/register/zookeeper/zookeeper-statefulset.yaml
diff --git a/manifests/charts/base/templates/crds.yaml 
b/manifests/charts/base/templates/crds.yaml
index 25ce230e..e52c03e0 100644
--- a/manifests/charts/base/templates/crds.yaml
+++ b/manifests/charts/base/templates/crds.yaml
@@ -14,11 +14,8 @@
 # limitations under the License.
 
 {{- $file := .Files }}
-{{- $crds := .Values.enableCRD }}
-{{- if $crds }}
 {{- range $path, $_ := .Files.Glob  "files/**.yaml" }}
 {{- $file.Get $path }}
 {{- end -}}
-{{- end -}}
 
 

Reply via email to