mirror of https://github.com/apache/druid.git
helm: add Kubernetes discovery support (#13262)
The K8 discovery mechanism, enabled by the druid-kubernetes-extension, relies on each pod advertising its name and namespace on the env variables POD_NAME and POD_NAMESPACE [1]. Add env variables to all deployments/statefulsets. [1] https://druid.apache.org/docs/latest/development/extensions-core/kubernetes.html Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
This commit is contained in:
parent
32020247d1
commit
de7ef81dff
|
@ -52,6 +52,10 @@ spec:
|
|||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args: [ "broker" ]
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.name}}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
|
||||
{{- range $key, $val := .Values.broker.config }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
|
|
|
@ -52,6 +52,10 @@ spec:
|
|||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args: [ "coordinator" ]
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.name}}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
|
||||
{{- range $key, $val := .Values.coordinator.config }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
|
|
|
@ -95,6 +95,10 @@ spec:
|
|||
- name: druid
|
||||
args: [ "historical" ]
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.name}}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
|
||||
{{- range $key, $val := .Values.historical.config }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
|
|
|
@ -95,6 +95,10 @@ spec:
|
|||
- name: druid
|
||||
args: [ "middleManager" ]
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.name}}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
|
||||
{{- range $key, $val := .Values.middleManager.config }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
|
|
|
@ -52,6 +52,10 @@ spec:
|
|||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args: [ "overlord" ]
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.name}}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
|
||||
{{- range $key, $val := .Values.overlord.config }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
|
|
|
@ -52,6 +52,10 @@ spec:
|
|||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args: [ "router" ]
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.name}}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
|
||||
{{- range $key, $val := .Values.router.config }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
|
|
Loading…
Reference in New Issue