From 32da52c0f008b2609cf1657fa79f4f9444b45a95 Mon Sep 17 00:00:00 2001 From: Kenan Erdogan Date: Tue, 16 Jan 2024 23:27:03 +0100 Subject: [PATCH] [pgadmin4] make it possible to use https in container (#237) * user portName in container ports and make it possible to use https in container * Update Chart.yaml --------- Co-authored-by: Rowan Ruseler --- charts/pgadmin4/Chart.yaml | 2 +- charts/pgadmin4/templates/deployment.yaml | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/charts/pgadmin4/Chart.yaml b/charts/pgadmin4/Chart.yaml index f32e403b..e44ae5ad 100644 --- a/charts/pgadmin4/Chart.yaml +++ b/charts/pgadmin4/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: pgAdmin4 is a web based administration tool for PostgreSQL database name: pgadmin4 -version: 1.22.0 +version: 1.23.0 appVersion: "8.1" keywords: - pgadmin diff --git a/charts/pgadmin4/templates/deployment.yaml b/charts/pgadmin4/templates/deployment.yaml index e6391601..9238b5c0 100644 --- a/charts/pgadmin4/templates/deployment.yaml +++ b/charts/pgadmin4/templates/deployment.yaml @@ -86,40 +86,49 @@ spec: {{- toYaml .Values.args | nindent 12 }} {{- end }} ports: - - name: http + - name: {{ .Values.service.portName }} containerPort: {{ .Values.containerPorts.http }} protocol: TCP {{- if .Values.livenessProbe }} livenessProbe: httpGet: - port: http + port: {{ .Values.service.portName }} {{- if .Values.env.contextPath }} path: "{{ .Values.env.contextPath }}/misc/ping" {{- else }} path: /misc/ping {{- end }} + {{- if or (eq (.Values.service.portName | lower) "http") (eq (.Values.service.portName | lower) "https") }} + scheme: {{ upper .Values.service.portName }} + {{- end }} {{- .Values.livenessProbe | toYaml | nindent 12 }} {{- end }} {{- if .Values.startupProbe }} startupProbe: httpGet: - port: http + port: {{ .Values.service.portName }} {{- if .Values.env.contextPath }} path: "{{ .Values.env.contextPath }}/misc/ping" {{- else }} path: /misc/ping {{- end }} + {{- if or (eq (.Values.service.portName | lower) "http") (eq (.Values.service.portName | lower) "https") }} + scheme: {{ upper .Values.service.portName }} + {{- end }} {{- .Values.startupProbe | toYaml | nindent 12 }} {{- end }} {{- if .Values.readinessProbe }} readinessProbe: httpGet: - port: http + port: {{ .Values.service.portName }} {{- if .Values.env.contextPath }} path: "{{ .Values.env.contextPath }}/misc/ping" {{- else }} path: /misc/ping {{- end }} + {{- if or (eq (.Values.service.portName | lower) "http") (eq (.Values.service.portName | lower) "https") }} + scheme: {{ upper .Values.service.portName }} + {{- end }} {{- .Values.readinessProbe | toYaml | nindent 12 }} {{- end }} env: