Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shuijing198799 committed Feb 26, 2020
1 parent 3e2b2d5 commit 7888c78
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/tidb-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ config-file: |-
Encapsulate pump configmap data for consistent digest calculation
*/}}
{{- define "pump.tlsSecretName" -}}
{{ .Values.clusterName }}-{{ .Release.Namespace }}-pump
{{ .Values.clusterName }}-pump
{{- end -}}

{{- define "pump-configmap.data" -}}
Expand Down
7 changes: 5 additions & 2 deletions charts/tidb-drainer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{- end -}}

{{- define "drainer.tlsSecretName" -}}
{{ .Values.clusterName }}-{{ .Release.Namespace }}-drainer
{{ .Values.clusterName }}-drainer
{{- end -}}

{{/*
Expand All @@ -15,7 +15,10 @@ config-file: |-
{{ .Values.config | indent 2 }}
{{- end -}}
{{- if .Values.enableTLSCluster }}
{{ .Values.security | indent 2 }}
[security]
ssl-ca = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
ssl-cert = "/var/lib/drainer-tls/cert"
ssl-key = "/var/lib/drainer-tls/key"
{{- end -}}
{{- end -}}

Expand Down
6 changes: 0 additions & 6 deletions charts/tidb-drainer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ config: |
[syncer.to]
dir = "/data/pb"
security: |
[security]
ssl-ca = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
ssl-cert = "/var/lib/drainer-tls/cert.pem"
ssl-key = "/var/lib/drainer-tls/key.pem"
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down
8 changes: 4 additions & 4 deletions hack/create-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ usage() {
create-cert.sh
create certification for pump and drainer conponent
--namespace the namespace of component belongs
--component name of component (pump, drainer)
--cluster cluster name of component belongs
--namespace The namespace of the component
--component The name of the component (e.g. pump, drainer)
--cluster The TiDB cluster name of the component for
EOF
exit 1
}
Expand Down Expand Up @@ -61,7 +61,7 @@ if [ -z ${cluster} ]; then
fi

service=${cluster}-${component}
secret=${cluster}-${namespace}-${component}
secret=${cluster}-${component}

if [ ! -x "$(command -v openssl)" ]; then
echo "openssl not found"
Expand Down

0 comments on commit 7888c78

Please sign in to comment.