|
|
@@ -19,22 +19,6 @@ spec:
|
|
|
containers:
|
|
|
- name: {{ template "openshift-console-plugin.name" . }}
|
|
|
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:
|
|
|
- containerPort: {{ .Values.plugin.port }}
|
|
|
protocol: TCP
|