Skip to content

Commit bfcd1b3

Browse files
authored
Merge pull request #87 from tahmmee/master
K8S-2750: check tls.secretSource for custom certs
2 parents 4a48e24 + a567370 commit bfcd1b3

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

charts/couchbase-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: couchbase-operator
33
description: A Helm chart to deploy the Couchbase Autonomous Operator for easily deploying, managing, and maintaining Couchbase Clusters. Couchbase Server is a NoSQL document database with a distributed architecture for performance, scalability, and availability. It enables developers to build applications easier and faster by leveraging the power of SQL with the flexibility of JSON.
4-
version: 2.3.001
4+
version: 2.3.002
55
appVersion: 2.3.0
66
type: application
77
keywords:

charts/couchbase-operator/templates/_helpers.tpl

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,22 +350,36 @@ Get nodeToNodeEncryption value
350350
{{- end -}}
351351
352352
{{/*
353-
Name of tls operator secret
353+
Get or generate name of tls operator secret
354354
*/}}
355355
{{- define "couchbase-cluster.tls.operator-secret" -}}
356356
{{- if .Values.cluster.networking.tls -}}
357-
{{- .Values.cluster.networking.tls.static.operatorSecret -}}
357+
358+
{{/* secret may be legacy or native format */}}
359+
{{- if (include "couchbase-cluster.tls.is-legacy" .) -}}
360+
{{- .Values.cluster.networking.tls.static.operatorSecret -}}
361+
{{- else -}}
362+
{{- .Values.cluster.networking.tls.secretSource.clientSecretName -}}
363+
{{- end -}}
364+
358365
{{- else -}}
359366
{{- (printf "%s-operator-tls" (include "couchbase-cluster.fullname" .)) | trunc 63 | trimSuffix "-" -}}
360367
{{- end -}}
361368
{{- end -}}
362369
363370
{{/*
364-
Name of tls server secret
371+
Get or generate name of tls server secret
365372
*/}}
366373
{{- define "couchbase-cluster.tls.server-secret" -}}
367374
{{- if .Values.cluster.networking.tls -}}
368-
{{- .Values.cluster.networking.tls.static.serverSecret -}}
375+
376+
{{/* secret may be legacy or native format */}}
377+
{{- if (include "couchbase-cluster.tls.is-legacy" .) -}}
378+
{{- .Values.cluster.networking.tls.static.serverSecret -}}
379+
{{- else -}}
380+
{{- .Values.cluster.networking.tls.secretSource.serverSecretName -}}
381+
{{- end -}}
382+
369383
{{- else -}}
370384
{{- (printf "%s-server-tls" (include "couchbase-cluster.fullname" .)) | trunc 63 | trimSuffix "-" -}}
371385
{{- end -}}

0 commit comments

Comments
 (0)