diff --git a/charts/portainer/templates/deployment.yaml b/charts/portainer/templates/deployment.yaml index 1d750c6..c1ac1bf 100644 --- a/charts/portainer/templates/deployment.yaml +++ b/charts/portainer/templates/deployment.yaml @@ -83,8 +83,43 @@ spec: port: 9443 scheme: HTTPS {{- else }} + {{- if .Values.enterpriseEdition.enabled }} + {{- if regexMatch "^[0-9]+\\.[0-9]+\\.[0-9]+$" .Values.enterpriseEdition.image.tag }} + {{- if eq (semver .Values.enterpriseEdition.image.tag | (semver "2.7.0").Compare) -1 }} + port: 9443 + scheme: HTTPS + {{- else }} port: 9000 scheme: HTTP + {{- end }} + {{- else }} + {{- if eq .Values.enterpriseEdition.image.tag "latest" }} + port: 9443 + scheme: HTTPS + {{- else }} + port: 9000 + scheme: HTTP + {{- end }} + {{- end}} + {{- else }} + {{- if regexMatch "^[0-9]+\\.[0-9]+\\.[0-9]+$" .Values.image.tag }} + {{- if eq (semver .Values.image.tag | (semver "2.6.0").Compare) -1 }} + port: 9443 + scheme: HTTPS + {{- else }} + port: 9000 + scheme: HTTP + {{- end}} + {{- else }} + {{- if eq .Values.image.tag "latest" }} + port: 9443 + scheme: HTTPS + {{- else }} + port: 9000 + scheme: HTTP + {{- end }} + {{- end }} + {{- end }} {{- end }} readinessProbe: httpGet: @@ -93,8 +128,43 @@ spec: port: 9443 scheme: HTTPS {{- else }} + {{- if .Values.enterpriseEdition.enabled }} + {{- if regexMatch "^[0-9]+\\.[0-9]+\\.[0-9]+$" .Values.enterpriseEdition.image.tag }} + {{- if eq (semver .Values.enterpriseEdition.image.tag | (semver "2.7.0").Compare) -1 }} + port: 9443 + scheme: HTTPS + {{- else }} port: 9000 scheme: HTTP + {{- end }} + {{- else }} + {{- if eq .Values.enterpriseEdition.image.tag "latest" }} + port: 9443 + scheme: HTTPS + {{- else }} + port: 9000 + scheme: HTTP + {{- end }} + {{- end}} + {{- else }} + {{- if regexMatch "^[0-9]+\\.[0-9]+\\.[0-9]+$" .Values.image.tag }} + {{- if eq (semver .Values.image.tag | (semver "2.6.0").Compare) -1 }} + port: 9443 + scheme: HTTPS + {{- else }} + port: 9000 + scheme: HTTP + {{- end}} + {{- else }} + {{- if eq .Values.image.tag "latest" }} + port: 9443 + scheme: HTTPS + {{- else }} + port: 9000 + scheme: HTTP + {{- end }} + {{- end }} + {{- end }} {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }}