diff --git a/charts/couchbase-operator/Chart.yaml b/charts/couchbase-operator/Chart.yaml index b80c3f0..8a1b5ad 100644 --- a/charts/couchbase-operator/Chart.yaml +++ b/charts/couchbase-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: couchbase-operator 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. -version: 2.32.1 +version: 2.32.2 appVersion: 2.3.2 type: application keywords: diff --git a/charts/couchbase-operator/templates/_helpers.tpl b/charts/couchbase-operator/templates/_helpers.tpl index e367c91..4309722 100644 --- a/charts/couchbase-operator/templates/_helpers.tpl +++ b/charts/couchbase-operator/templates/_helpers.tpl @@ -280,27 +280,35 @@ Determine if tls legacy mode is enabled. Legacy TLS involves use of static secr {{/* legacy is explicitly set */}} {{- true -}} {{- else -}} - {{- $deprecatedClusterName := (include "couchbase-cluster.fullname" .) -}} - {{- $deprecatedClusterSpec := (lookup "couchbase.com/v2" "CouchbaseCluster" .Release.Namespace $deprecatedClusterName) -}} - {{- if $deprecatedClusterSpec -}} - {{- $deprecatedTLS := $deprecatedClusterSpec.spec.networking.tls -}} - {{- if $deprecatedTLS -}} - {{- if $deprecatedTLS.static -}} - {{/* legacy format is in use for legacy-style cluster */}} - {{- true -}} - {{- end -}} + {{/* check if request spec is in legacy format */}} + {{- $requestSpecTLS := .Values.cluster.networking.tls -}} + {{- if $requestSpecTLS -}} + {{- if $requestSpecTLS.static -}} + {{- true -}} {{- end -}} - {{- else -}} - {{- $clusterName := (include "couchbase-cluster.clustername" .) -}} - {{- $clusterSpec := (lookup "couchbase.com/v2" "CouchbaseCluster" .Release.Namespace $clusterName) -}} - {{- if $clusterSpec -}} - {{- $clusterTLS := $clusterSpec.spec.networking.tls -}} - {{- if $clusterTLS -}} - {{- if $clusterTLS.static -}} - {{/* legacy format is in use for cluster */}} + {{- else -}} + {{- $deprecatedClusterName := (include "couchbase-cluster.fullname" .) -}} + {{- $deprecatedClusterSpec := (lookup "couchbase.com/v2" "CouchbaseCluster" .Release.Namespace $deprecatedClusterName) -}} + {{- if $deprecatedClusterSpec -}} + {{- $deprecatedTLS := $deprecatedClusterSpec.spec.networking.tls -}} + {{- if $deprecatedTLS -}} + {{- if $deprecatedTLS.static -}} + {{/* legacy format is in use for legacy-style cluster */}} {{- true -}} {{- end -}} {{- end -}} + {{- else -}} + {{- $clusterName := (include "couchbase-cluster.clustername" .) -}} + {{- $clusterSpec := (lookup "couchbase.com/v2" "CouchbaseCluster" .Release.Namespace $clusterName) -}} + {{- if $clusterSpec -}} + {{- $clusterTLS := $clusterSpec.spec.networking -}} + {{- if $clusterTLS -}} + {{- if $clusterTLS.static -}} + {{/* legacy format is in use for cluster */}} + {{- true -}} + {{- end -}} + {{- end -}} + {{- end -}} {{- end -}} {{- end -}} {{- end -}}