Skip to content

Commit

Permalink
K8S-2780: fix tls cert regeneration
Browse files Browse the repository at this point in the history
Upgrading tls cluster was failing because regeneration of certs/keys
did not include all of the information from previous version/release of
the chart.
  • Loading branch information
tahmmee committed Jul 12, 2022
1 parent b040ba8 commit 68cc563
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/couchbase-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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.30.3
version: 2.30.4
appVersion: 2.3.0
type: application
keywords:
Expand Down
4 changes: 3 additions & 1 deletion charts/couchbase-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,12 @@ Generate certificates for couchbase-cluster with native TLS formatting.
{{- define "couchbase-cluster.tls" -}}
{{- $serverSecret := (lookup "v1" "Secret" .Release.Namespace (include "couchbase-cluster.tls.server-secret" .)) -}}
{{- $clientSecret := (lookup "v1" "Secret" .Release.Namespace (include "couchbase-cluster.tls.operator-secret" .)) -}}
{{- $caSecret := (lookup "v1" "Secret" .Release.Namespace (include "couchbase-cluster.tls.ca-secret" .)) -}}
{{- if (and $serverSecret $clientSecret ) -}}
caCert: {{ index $caSecret.data "tls.crt" }}
serverCert: {{ index $serverSecret.data "tls.crt" }}
serverKey: {{ index $serverSecret.data "tls.key" }}
clientCert: {{ index $clientSecret.data "tls.pem" }}
clientCert: {{ index $clientSecret.data "tls.crt" }}
clientKey: {{ index $clientSecret.data "tls.key" }}
{{- else -}}
{{- $expiration := (.Values.tls.expiration | int) -}}
Expand Down

0 comments on commit 68cc563

Please sign in to comment.