11credential :
2+ {{- $releaseNamespace := include "common.names.namespace" . }}
3+ {{- $clusterDomain := .Values.clusterDomain }}
24 {{- if (eq .Values.service.type "LoadBalancer") }}
35 - name : EXTERNAL_OPENSEARCH_HOST
46 valueFrom :
@@ -47,6 +49,7 @@ credential:
4749 jsonpath : ' { .spec.ports[?(@.name=="http")].port }'
4850 {{- end }}
4951
52+
5053 {{- if .Values.security.enabled }}
5154 - name : OPENSEARCH_PASSWORD
5255 valueFrom :
@@ -65,4 +68,53 @@ credential:
6568 secretKeyRef :
6669 name : {{ template "common.names.fullname" . }}
6770 jsonpath : ' { .data.logstash-password }'
68- {{- end }}
71+ {{- end }}
72+
73+
74+ {{- if (include "opensearch.createTlsSecret" .) }}
75+ {{ if not (include "opensearch.coordinating.enabled" .) }}
76+ - name : OPENSEARCH_DOMAIN
77+ value : {{ (printf "%s.%s.svc.%s" (include "opensearch.service.name" .) $releaseNamespace $clusterDomain) }}
78+
79+ - name : OPESEARCH_MASTER_CA_CRT
80+ valueFrom :
81+ secretKeyRef :
82+ name : {{ printf "%s-crt" (include "opensearch.master.fullname" .) }}
83+ jsonpath : ' { .data.ca\.crt }'
84+ {{- end }}
85+
86+ {{- if and (include "opensearch.data.enabled" .) (not .Values.security.tls.data.existingSecret) }}
87+ {{- $serviceName := include "opensearch.data.servicename" . }}
88+ - name : OPENSEARCH_DATA_DOMAIN
89+ value : {{ (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) }}
90+
91+ - name : OPESEARCH_DATA_CA_CRT
92+ valueFrom :
93+ secretKeyRef :
94+ name : {{ printf "%s-crt" (include "opensearch.data.fullname" .) }}
95+ jsonpath : ' { .data.ca\.crt }'
96+ {{- end }}
97+
98+ {{- if and (include "opensearch.coordinating.enabled" .) (not .Values.security.tls.coordinating.existingSecret) }}
99+ - name : OPENSEARCH_DOMAIN
100+ value : {{ (printf "%s.%s.svc.%s" (include "opensearch.service.name" .) $releaseNamespace $clusterDomain) }}
101+
102+ - name : OPESEARCH_COORDINATING_CA_CRT
103+ valueFrom :
104+ secretKeyRef :
105+ name : {{ printf "%s-crt" (include "opensearch.coordinating.fullname" .) }}
106+ jsonpath : ' { .data.ca\.crt }'
107+ {{- end }}
108+
109+ {{- if and (include "opensearch.ingest.enabled" .) (not .Values.security.tls.ingest.existingSecret) }}
110+ {{- $serviceName := include "opensearch.ingest.servicename" . }}
111+ - name : OPENSEARCH_INGEST_DOMAIN
112+ value : {{ (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) }}
113+
114+ - name : OPESEARCH_INGEST_CA_CRT
115+ valueFrom :
116+ secretKeyRef :
117+ name : {{ printf "%s-crt" (include "opensearch.ingest.fullname" .) }}
118+ jsonpath : ' { .data.ca\.crt }'
119+ {{- end }}
120+ {{- end }}
0 commit comments