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

liujun pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git


The following commit(s) were added to refs/heads/refactor-with-go by this push:
     new dbea01aa Optimize controller templates and missing values (#1180)
dbea01aa is described below

commit dbea01aac1d9f1523f6b200a7658967884d7bec8
Author: mfordjody <[email protected]>
AuthorDate: Tue Jul 4 20:34:15 2023 +0800

    Optimize controller templates and missing values (#1180)
---
 .../charts/dubbo-admin/templates/deployment.yaml   | 62 +++++++++++++---------
 deploy/charts/dubbo-admin/values.yaml              | 10 ++++
 2 files changed, 46 insertions(+), 26 deletions(-)

diff --git a/deploy/charts/dubbo-admin/templates/deployment.yaml 
b/deploy/charts/dubbo-admin/templates/deployment.yaml
index f98a9dc5..2a0189c7 100644
--- a/deploy/charts/dubbo-admin/templates/deployment.yaml
+++ b/deploy/charts/dubbo-admin/templates/deployment.yaml
@@ -66,8 +66,10 @@ spec:
           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | 
default .Chart.Version }}"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           ports:
-            - name: {{ .Values.service.name }}
-              containerPort: {{ .Values.service.containerPort }}
+            {{- with .Values.service }}
+            - name: {{ .name }}
+              containerPort: {{ .containerPort }}
+            {{- end }}
           volumeMounts:
             - mountPath: /config
               name: application-properties
@@ -77,31 +79,37 @@ spec:
               readOnly: true
           livenessProbe:
             httpGet:
-              path: {{ .Values.livenessProbe.httpGet.path }}
-              port: {{ .Values.livenessProbe.httpGet.port }}
-            initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds 
}}
-            timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
-            periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
-            successThreshold: {{ .Values.livenessProbe.successThreshold }}
-            failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
+              {{- with .Values.livenessProbe }}
+              path: {{ .httpGet.path }}
+              port: {{ .httpGet.port }}
+            initialDelaySeconds: {{ .initialDelaySeconds }}
+            timeoutSeconds: {{ .timeoutSeconds }}
+            periodSeconds: {{ .periodSeconds }}
+            successThreshold: {{ .successThreshold }}
+            failureThreshold: {{ .failureThreshold }}
           readinessProbe:
             httpGet:
-              path: {{ .Values.livenessProbe.httpGet.path }}
-              port: {{ .Values.livenessProbe.httpGet.port }}
-            initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds 
}}
-            timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
-            periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
-            successThreshold: {{ .Values.readinessProbe.successThreshold }}
-            failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
+              path: {{ .httpGet.path }}
+              port: {{ .httpGet.port }}
+            initialDelaySeconds: {{ .initialDelaySeconds }}
+            {{- end }}
+            {{- with .Values.readinessProbe }}
+            timeoutSeconds: {{ .timeoutSeconds }}
+            periodSeconds: {{ .periodSeconds }}
+            successThreshold: {{ .successThreshold }}
+            failureThreshold: {{ .failureThreshold }}
+            {{- end }}
           startupProbe:
             httpGet:
-              path: {{ .Values.startupProbe.httpGet.path }}
-              port: {{ .Values.startupProbe.httpGet.port }}
-            initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
-            timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
-            periodSeconds: {{ .Values.startupProbe.periodSeconds }}
-            successThreshold: {{ .Values.startupProbe.successThreshold }}
-            failureThreshold: {{ .Values.startupProbe.failureThreshold }}
+              {{- with .Values.startupProbe }}
+              path: {{ .httpGet.path }}
+              port: {{ .httpGet.port }}
+            initialDelaySeconds: {{ .initialDelaySeconds }}
+            timeoutSeconds: {{ .timeoutSeconds }}
+            periodSeconds: {{ .periodSeconds }}
+            successThreshold: {{ .successThreshold }}
+            failureThreshold: {{ .failureThreshold }}
+            {{- end }}
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
       volumes:
@@ -111,9 +119,11 @@ spec:
         - name: storage
              {{- if .Values.persistence.enabled }}
           persistentVolumeClaim:
-            {{ if .Values.persistence.ClaimName }}
-            claimName: {{ .Values.persistence.ClaimName }}
+            {{- with .Values.persistence }}
+            {{ if .ClaimName }}
+            claimName: {{ .ClaimName }}
             {{- else -}}
-          emptyDir: {{ .Values.persistence.emptyDir }}
+          emptyDir: {{ .emptyDir }}
               {{- end -}}
               {{- end -}}
+              {{- end -}}
\ No newline at end of file
diff --git a/deploy/charts/dubbo-admin/values.yaml 
b/deploy/charts/dubbo-admin/values.yaml
index d3c8afd7..d56280ec 100644
--- a/deploy/charts/dubbo-admin/values.yaml
+++ b/deploy/charts/dubbo-admin/values.yaml
@@ -33,6 +33,16 @@ rbac:
 
 replicas: 1
 
+labels: {}
+
+annotations: {}
+
+nodeSelector: {}
+
+affinity: {}
+
+tolerations: {}
+
 ## serviceAccount
 serviceAccount:
   enabled: true

Reply via email to