File tree 2 files changed +17
-2
lines changed
charts/openshift-console-plugin/templates
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 15
15
default_type application/octet-stream;
16
16
keepalive_timeout 65;
17
17
server {
18
- listen {{ .Values.plugin.port }} ssl;
19
- listen [::]:{{ .Values.plugin.port }} ssl;
18
+ listen LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME ssl;
20
19
ssl_certificate /var/cert/tls.crt;
21
20
ssl_certificate_key /var/cert/tls.key;
22
21
root /usr/share/nginx/html;
Original file line number Diff line number Diff line change 19
19
containers :
20
20
- name : {{ template "openshift-console-plugin.name" . }}
21
21
image : {{ required "Plugin image must be specified!" .Values.plugin.image }}
22
+ command :
23
+ - /bin/sh
24
+ - -c
25
+ - |
26
+ if echo "$POD_IP" | grep -qE '^([0-9]{1,3}\.){3}[0-9]{1,3}$'; then
27
+ LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME="{{ .Values.plugin.port }}"
28
+ else
29
+ LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME="[::]:{{ .Values.plugin.port }}"
30
+ fi
31
+ sed "s/LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME/$LISTEN_ADDRESS_PORT_REPLACED_AT_RUNTIME/g" /etc/nginx/nginx.conf > /tmp/nginx.conf
32
+ exec nginx -c /tmp/nginx.conf -g 'daemon off;'
33
+ env :
34
+ - name : POD_IP
35
+ valueFrom :
36
+ fieldRef :
37
+ fieldPath : status.podIP
22
38
ports :
23
39
- containerPort : {{ .Values.plugin.port }}
24
40
protocol : TCP
You can’t perform that action at this time.
0 commit comments