You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/04/21 05:57:12 UTC

[pulsar-helm-chart] 33/34: Make secret name consistent (#6739)

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

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git

commit 977999f9a068087ef98bc95a2b8cd148af392924
Author: Yong Zhang <zh...@gmail.com>
AuthorDate: Thu Apr 16 23:59:26 2020 +0800

    Make secret name consistent (#6739)
    
    * Make secret name consistent
    ---
    
    *Motivation*
    
    Make the secret name consistent. And all secret names should
    use the release name as the prefix.
    
    * Update ci script
    
    * Fix the file path
    
    * Fix path
    
    * Fix env
    
    Co-authored-by: Sijie Guo <si...@apache.org>
---
 pulsar/templates/_autorecovery.tpl             |  6 +++---
 pulsar/templates/_bookkeeper.tpl               |  6 +++---
 pulsar/templates/_broker.tpl                   |  6 +++---
 pulsar/templates/_toolset.tpl                  |  6 +++---
 pulsar/templates/proxy-statefulset.yaml        |  4 ++--
 pulsar/templates/tls-cert-internal-issuer.yaml |  6 +++---
 pulsar/templates/tls-certs-internal.yaml       | 14 +++++++-------
 pulsar/templates/toolset-statefulset.yaml      |  2 +-
 pulsar/templates/zookeeper-statefulset.yaml    |  4 ++--
 9 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/pulsar/templates/_autorecovery.tpl b/pulsar/templates/_autorecovery.tpl
index 3fb3f4b..1930c89 100644
--- a/pulsar/templates/_autorecovery.tpl
+++ b/pulsar/templates/_autorecovery.tpl
@@ -47,7 +47,7 @@ Define autorecovery tls certs volumes
 {{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
 - name: autorecovery-certs
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.autorecovery.cert_name }}"
+    secretName: "{{ .Release.Name }}-{{ .Values.tls.autorecovery.cert_name }}"
     items:
     - key: tls.crt
       path: tls.crt
@@ -55,7 +55,7 @@ Define autorecovery tls certs volumes
       path: tls.key
 - name: ca
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+    secretName: "{{ .Release.Name }}-ca-tls"
     items:
     - key: ca.crt
       path: ca.crt
@@ -77,4 +77,4 @@ bin/apply-config-from-env.py conf/bookkeeper.conf;
 until bin/bookkeeper shell whatisinstanceid; do
   sleep 3;
 done;
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/pulsar/templates/_bookkeeper.tpl b/pulsar/templates/_bookkeeper.tpl
index d828009..fa4dd9f 100644
--- a/pulsar/templates/_bookkeeper.tpl
+++ b/pulsar/templates/_bookkeeper.tpl
@@ -48,7 +48,7 @@ Define bookie tls certs volumes
 {{- if and .Values.tls.enabled (or .Values.tls.bookie.enabled .Values.tls.zookeeper.enabled) }}
 - name: bookie-certs
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.bookie.cert_name }}"
+    secretName: "{{ .Release.Name }}-{{ .Values.tls.bookie.cert_name }}"
     items:
     - key: tls.crt
       path: tls.crt
@@ -56,7 +56,7 @@ Define bookie tls certs volumes
       path: tls.key
 - name: ca
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+    secretName: "{{ .Release.Name }}-ca-tls"
     items:
     - key: ca.crt
       path: ca.crt
@@ -118,4 +118,4 @@ until bin/bookkeeper shell whatisinstanceid; do
   sleep 3;
 done;
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/pulsar/templates/_broker.tpl b/pulsar/templates/_broker.tpl
index cff94f9..bdc808f 100644
--- a/pulsar/templates/_broker.tpl
+++ b/pulsar/templates/_broker.tpl
@@ -54,7 +54,7 @@ Define broker tls certs volumes
 {{- if and .Values.tls.enabled (or .Values.tls.broker.enabled (or .Values.tls.bookie.enabled .Values.tls.zookeeper.enabled)) }}
 - name: broker-certs
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.broker.cert_name }}"
+    secretName: "{{ .Release.Name }}-{{ .Values.tls.broker.cert_name }}"
     items:
     - key: tls.crt
       path: tls.crt
@@ -62,7 +62,7 @@ Define broker tls certs volumes
       path: tls.key
 - name: ca
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+    secretName: "{{ .Release.Name }}-ca-tls"
     items:
     - key: ca.crt
       path: ca.crt
@@ -73,4 +73,4 @@ Define broker tls certs volumes
     defaultMode: 0755
 {{- end }}
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/pulsar/templates/_toolset.tpl b/pulsar/templates/_toolset.tpl
index 405fa71..82217c9 100644
--- a/pulsar/templates/_toolset.tpl
+++ b/pulsar/templates/_toolset.tpl
@@ -47,7 +47,7 @@ Define toolset tls certs volumes
 {{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
 - name: toolset-certs
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.toolset.cert_name }}"
+    secretName: "{{ .Release.Name }}-{{ .Values.tls.toolset.cert_name }}"
     items:
     - key: tls.crt
       path: tls.crt
@@ -55,7 +55,7 @@ Define toolset tls certs volumes
       path: tls.key
 - name: ca
   secret:
-    secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+    secretName: "{{ .Release.Name }}-ca-tls"
     items:
     - key: ca.crt
       path: ca.crt
@@ -66,4 +66,4 @@ Define toolset tls certs volumes
     defaultMode: 0755
 {{- end }}
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/pulsar/templates/proxy-statefulset.yaml b/pulsar/templates/proxy-statefulset.yaml
index c83c2e3..d974c0f 100644
--- a/pulsar/templates/proxy-statefulset.yaml
+++ b/pulsar/templates/proxy-statefulset.yaml
@@ -217,13 +217,13 @@ spec:
         {{- if .Values.tls.proxy.enabled }}
         - name: ca
           secret:
-            secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+            secretName: "{{ .Release.Name }}-ca-tls"
             items:
               - key: ca.crt
                 path: ca.crt
         - name: proxy-certs
           secret:
-            secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.proxy.cert_name }}"
+            secretName: "{{ .Release.Name }}-{{ .Values.tls.proxy.cert_name }}"
             items:
               - key: tls.crt
                 path: tls.crt
diff --git a/pulsar/templates/tls-cert-internal-issuer.yaml b/pulsar/templates/tls-cert-internal-issuer.yaml
index 5d924f4..bf006a1 100644
--- a/pulsar/templates/tls-cert-internal-issuer.yaml
+++ b/pulsar/templates/tls-cert-internal-issuer.yaml
@@ -34,7 +34,7 @@ metadata:
   name: "{{ template "pulsar.fullname" . }}-ca"
   namespace: {{ .Values.namespace }}
 spec:
-  secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+  secretName: "{{ .Release.Name }}-ca-tls"
   commonName: "{{ .Values.namespace }}.svc.cluster.local"
   usages:
     - server auth
@@ -57,6 +57,6 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   ca:
-    secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+    secretName: "{{ .Release.Name }}-ca-tls"
+{{- end }}
 {{- end }}
-{{- end }}
\ No newline at end of file
diff --git a/pulsar/templates/tls-certs-internal.yaml b/pulsar/templates/tls-certs-internal.yaml
index 5b249c0..1a20bbd 100644
--- a/pulsar/templates/tls-certs-internal.yaml
+++ b/pulsar/templates/tls-certs-internal.yaml
@@ -28,7 +28,7 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   # Secret names are always required.
-  secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.proxy.cert_name }}"
+  secretName: "{{ .Release.Name }}-{{ .Values.tls.proxy.cert_name }}"
   duration: "{{ .Values.tls.common.duration }}"
   renewBefore: "{{ .Values.tls.common.renewBefore }}"
   organization:
@@ -67,7 +67,7 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   # Secret names are always required.
-  secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.broker.cert_name }}"
+  secretName: "{{ .Release.Name }}-{{ .Values.tls.broker.cert_name }}"
   duration: "{{ .Values.tls.common.duration }}"
   renewBefore: "{{ .Values.tls.common.renewBefore }}"
   organization:
@@ -106,7 +106,7 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   # Secret names are always required.
-  secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.bookie.cert_name }}"
+  secretName: "{{ .Release.Name }}-{{ .Values.tls.bookie.cert_name }}"
   duration: "{{ .Values.tls.common.duration }}"
   renewBefore: "{{ .Values.tls.common.renewBefore }}"
   organization:
@@ -144,7 +144,7 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   # Secret names are always required.
-  secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.autorecovery.cert_name }}"
+  secretName: "{{ .Release.Name }}-{{ .Values.tls.autorecovery.cert_name }}"
   duration: "{{ .Values.tls.common.duration }}"
   renewBefore: "{{ .Values.tls.common.renewBefore }}"
   organization:
@@ -179,7 +179,7 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   # Secret names are always required.
-  secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.toolset.cert_name }}"
+  secretName: "{{ .Release.Name }}-{{ .Values.tls.toolset.cert_name }}"
   duration: "{{ .Values.tls.common.duration }}"
   renewBefore: "{{ .Values.tls.common.renewBefore }}"
   organization:
@@ -214,7 +214,7 @@ metadata:
   namespace: {{ .Values.namespace }}
 spec:
   # Secret names are always required.
-  secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.zookeeper.cert_name }}"
+  secretName: "{{ .Release.Name }}-{{ .Values.tls.zookeeper.cert_name }}"
   duration: "{{ .Values.tls.common.duration }}"
   renewBefore: "{{ .Values.tls.common.renewBefore }}"
   organization:
@@ -244,4 +244,4 @@ spec:
 {{- end }}
 
 {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/pulsar/templates/toolset-statefulset.yaml b/pulsar/templates/toolset-statefulset.yaml
index b15ad8d..715680c 100644
--- a/pulsar/templates/toolset-statefulset.yaml
+++ b/pulsar/templates/toolset-statefulset.yaml
@@ -99,7 +99,7 @@ spec:
       {{- if and .Values.tls.enabled (or .Values.tls.broker.enabled .Values.tls.proxy.enabled) }}
       - name: proxy-ca
         secret:
-          secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+          secretName: "{{ .Release.Name }}-ca-tls"
           items:
             - key: ca.crt
               path: ca.crt
diff --git a/pulsar/templates/zookeeper-statefulset.yaml b/pulsar/templates/zookeeper-statefulset.yaml
index 21a4553..dc78cfd 100644
--- a/pulsar/templates/zookeeper-statefulset.yaml
+++ b/pulsar/templates/zookeeper-statefulset.yaml
@@ -158,7 +158,7 @@ spec:
       {{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
       - name: zookeeper-certs
         secret:
-          secretName: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.zookeeper.cert_name }}"
+          secretName: "{{ .Release.Name }}-{{ .Values.tls.zookeeper.cert_name }}"
           items:
             - key: tls.crt
               path: tls.crt
@@ -166,7 +166,7 @@ spec:
               path: tls.key
       - name: ca
         secret:
-          secretName: "{{ template "pulsar.fullname" . }}-ca-tls"
+          secretName: "{{ .Release.Name }}-ca-tls"
           items:
             - key: ca.crt
               path: ca.crt