Skip to content

Commit df115ca

Browse files
committed
fix(opensearch-operator): make the DNS_BASE lookup nil-safe
Reading .Values.global.clusterDomain unguarded ends the render of the vendored chart on its own, because indexing a nil map is an error rather than an empty value, and only the parent supplies global. Rendering the subchart directory directly worked before the platform started feeding that key and stopped afterwards. The parenthesised form is what the surrounding default expects and what the same class of fix uses in the smee chart. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent ae79dcc commit df115ca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/system/opensearch-operator/charts/opensearch-operator/templates/opensearch-operator-controller-manager-deployment.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ spec:
8787
{{- toYaml .Values.manager.livenessProbe | nindent 10 }}
8888
env:
8989
- name: DNS_BASE
90-
value: {{ .Values.global.clusterDomain | default .Values.manager.dnsBase }}
90+
value: {{ (.Values.global).clusterDomain | default .Values.manager.dnsBase }}
9191
- name: PARALLEL_RECOVERY_ENABLED
9292
value: "{{ .Values.manager.parallelRecoveryEnabled }}"
9393
- name: PPROF_ENDPOINTS_ENABLED

‎packages/system/opensearch-operator/patches/leaderElection.diff‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ diff --git a/charts/opensearch-operator/templates/opensearch-operator-controller
4343
env:
4444
- name: DNS_BASE
4545
- value: {{ .Values.manager.dnsBase }}
46-
+ value: {{ .Values.global.clusterDomain | default .Values.manager.dnsBase }}
46+
+ value: {{ (.Values.global).clusterDomain | default .Values.manager.dnsBase }}
4747
- name: PARALLEL_RECOVERY_ENABLED
4848
value: "{{ .Values.manager.parallelRecoveryEnabled }}"
4949
- name: PPROF_ENDPOINTS_ENABLED

0 commit comments

Comments
 (0)