|
@@ -19,6 +19,22 @@ spec:
|
|
|
containers:
|
|
containers:
|
|
|
- name: {{ template "openshift-console-plugin.name" . }}
|
|
- name: {{ template "openshift-console-plugin.name" . }}
|
|
|
image: {{ required "Plugin image must be specified!" .Values.plugin.image }}
|
|
image: {{ required "Plugin image must be specified!" .Values.plugin.image }}
|
|
|
|
|
+ command:
|
|
|
|
|
+ - /bin/sh
|
|
|
|
|
+ - -c
|
|
|
|
|
+ - |
|
|
|
|
|
+ if echo "$POD_IP" | grep -qE '^([0-9]{1,3}\.){3}[0-9]{1,3}$'; then
|
|
|
|
|
+ LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME="{{ .Values.plugin.port }}"
|
|
|
|
|
+ else
|
|
|
|
|
+ LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME="[::]:{{ .Values.plugin.port }}"
|
|
|
|
|
+ fi
|
|
|
|
|
+ sed "s/LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME/$LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME/g" /etc/nginx/nginx.conf > /tmp/nginx.conf
|
|
|
|
|
+ exec nginx -c /tmp/nginx.conf -g 'daemon off;'
|
|
|
|
|
+ env:
|
|
|
|
|
+ - name: POD_IP
|
|
|
|
|
+ valueFrom:
|
|
|
|
|
+ fieldRef:
|
|
|
|
|
+ fieldPath: status.podIP
|
|
|
ports:
|
|
ports:
|
|
|
- containerPort: {{ .Values.plugin.port }}
|
|
- containerPort: {{ .Values.plugin.port }}
|
|
|
protocol: TCP
|
|
protocol: TCP
|