Skip to content

Commit 9f595ac

Browse files
committed
update chart manifest
Signed-off-by: josedev-union <[email protected]>
1 parent 2f81a42 commit 9f595ac

File tree

4 files changed

+57
-28
lines changed

4 files changed

+57
-28
lines changed

charts/opensearch-cluster/templates/cluster.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ spec:
5656
{{- with .tls.transport.secret }}
5757
secret: {{ . | toYaml | nindent 10 }}
5858
{{- end }}
59+
{{- if .tls.transport.enableHotReload }}
60+
enableHotReload: {{ .tls.transport.enableHotReload }}
61+
{{- end }}
5962
http:
6063
{{- if .tls.http.generate }}
6164
generate: {{ .tls.http.generate }}
@@ -66,6 +69,9 @@ spec:
6669
{{- with .tls.http.caSecret }}
6770
caSecret: {{ . | toYaml | nindent 10 }}
6871
{{- end }}
72+
{{- if .tls.http.enableHotReload }}
73+
enableHotReload: {{ .tls.http.enableHotReload }}
74+
{{- end }}
6975
{{- with .config }}
7076
config: {{ . | toYaml | nindent 6 }}
7177
{{- end }}

charts/opensearch-cluster/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ cluster:
323323
secret: {}
324324
# name: "secret-name"
325325

326+
# -- Enable hot reloading of TLS certificates.
327+
enableHotReload: false
328+
326329
transport:
327330
# -- DNs of certificates that should have admin access, mainly used for securityconfig updates via securityadmin.sh,
328331
# only used when existing certificates are provided
@@ -348,6 +351,8 @@ cluster:
348351
secret: {}
349352
# name: "secret-name"
350353

354+
# -- Enable hot reloading of TLS certificates.
355+
enableHotReload: false
351356

352357
# Opensearch Ingress configuration
353358
ingress:

charts/opensearch-operator/files/opensearch.opster.io_opensearchclusters.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,12 @@ spec:
33393339
enable:
33403340
description: Enable HTTPS for Dashboards
33413341
type: boolean
3342+
enableHotReload:
3343+
description: Enable hot reloading of TLS certificates. When
3344+
enabled, certificates are mounted as directories instead
3345+
of using subPath, allowing Kubernetes to update certificate
3346+
files when secrets are updated.
3347+
type: boolean
33423348
generate:
33433349
description: Generate certificate, if false secret must be
33443350
provided
@@ -6260,6 +6266,12 @@ spec:
62606266
type: string
62616267
type: object
62626268
x-kubernetes-map-type: atomic
6269+
enableHotReload:
6270+
description: Enable hot reloading of TLS certificates.
6271+
When enabled, certificates are mounted as directories
6272+
instead of using subPath, allowing Kubernetes to update
6273+
certificate files when secrets are updated.
6274+
type: boolean
62636275
generate:
62646276
description: If set to true the operator will generate
62656277
a CA and certificates for the cluster to use, if false
@@ -6308,6 +6320,12 @@ spec:
63086320
type: string
63096321
type: object
63106322
x-kubernetes-map-type: atomic
6323+
enableHotReload:
6324+
description: Enable hot reloading of TLS certificates.
6325+
When enabled, certificates are mounted as directories
6326+
instead of using subPath, allowing Kubernetes to update
6327+
certificate files when secrets are updated.
6328+
type: boolean
63116329
generate:
63126330
description: If set to true the operator will generate
63136331
a CA and certificates for the cluster to use, if false

opensearch-operator/pkg/helpers/helpers_test.go

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package helpers
22

33
import (
4-
opsterv1 "github.com/Opster/opensearch-k8s-operator/opensearch-operator/api/v1"
4+
opsterv1 "github.com/Opster/opensearch-k8s-operator/opensearch-operator/api/v1"
55
. "github.com/onsi/ginkgo/v2"
66
. "github.com/onsi/gomega"
77
corev1 "k8s.io/api/core/v1"
@@ -134,31 +134,31 @@ var _ = Describe("Helper Functions", func() {
134134
})
135135
})
136136

137-
Describe("MergeConfigs mutation behavior", func() {
138-
It("should merge the maps such that right is higher priority than left, and not mutate either argument when merging", func() {
139-
generalConfig := map[string]string{"http.compression": "true"}
140-
poolConfig := map[string]string{"node.data": "false"}
141-
142-
// Save a copy of the original
143-
original := map[string]string{"http.compression": "true"}
144-
145-
// Merge and check result
146-
merged := MergeConfigs(generalConfig, poolConfig)
147-
expected := map[string]string{"http.compression": "true", "node.data": "false"}
148-
Expect(merged).To(Equal(expected))
149-
150-
// Check that longLived was not mutated
151-
Expect(generalConfig).To(Equal(original))
152-
153-
// Merge again with a new config
154-
poolConfig2 := map[string]string{"node.master": "false", "http.compression": "false"}
155-
expected2 := map[string]string{"http.compression": "false", "node.master": "false"}
156-
merged2 := MergeConfigs(generalConfig, poolConfig2)
157-
Expect(merged2).To(Equal(expected2))
158-
159-
// Still not mutated
160-
Expect(generalConfig).To(Equal(original))
161-
})
162-
})
163-
137+
Describe("MergeConfigs mutation behavior", func() {
138+
It("should merge the maps such that right is higher priority than left, and not mutate either argument when merging", func() {
139+
generalConfig := map[string]string{"http.compression": "true"}
140+
poolConfig := map[string]string{"node.data": "false"}
141+
142+
// Save a copy of the original
143+
original := map[string]string{"http.compression": "true"}
144+
145+
// Merge and check result
146+
merged := MergeConfigs(generalConfig, poolConfig)
147+
expected := map[string]string{"http.compression": "true", "node.data": "false"}
148+
Expect(merged).To(Equal(expected))
149+
150+
// Check that longLived was not mutated
151+
Expect(generalConfig).To(Equal(original))
152+
153+
// Merge again with a new config
154+
poolConfig2 := map[string]string{"node.master": "false", "http.compression": "false"}
155+
expected2 := map[string]string{"http.compression": "false", "node.master": "false"}
156+
merged2 := MergeConfigs(generalConfig, poolConfig2)
157+
Expect(merged2).To(Equal(expected2))
158+
159+
// Still not mutated
160+
Expect(generalConfig).To(Equal(original))
161+
})
162+
})
163+
164164
})

0 commit comments

Comments
 (0)