feat(modjo-microservice): optional svc

This commit is contained in:
devthejo 2023-12-17 00:34:39 +01:00
parent 5da9021cc8
commit 1d9a2115c8
Signed by: devthejo
GPG key ID: C04215C627711F5C
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{{- if eq .Values.rollout.strategy.type "BlueGreen" -}} {{- if and .Values.service.enabled (eq .Values.rollout.strategy.type "BlueGreen") -}}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View file

@ -19,8 +19,10 @@ spec:
strategy: strategy:
{{- if eq .Values.rollout.strategy.type "BlueGreen" }} {{- if eq .Values.rollout.strategy.type "BlueGreen" }}
blueGreen: blueGreen:
{{- if .Values.service.enabled }}
activeService: {{ default (include "common.names.fullname" .) .Values.rollout.strategy.blueGreen.activeService | quote }} activeService: {{ default (include "common.names.fullname" .) .Values.rollout.strategy.blueGreen.activeService | quote }}
previewService: {{ default (include "common.names.suffixedName" (dict "root" . "suffix" "preview")) .Values.rollout.strategy.blueGreen.previewService | quote }} previewService: {{ default (include "common.names.suffixedName" (dict "root" . "suffix" "preview")) .Values.rollout.strategy.blueGreen.previewService | quote }}
{{- end }}
autoPromotionEnabled: {{ .Values.rollout.strategy.blueGreen.autoPromotionEnabled }} autoPromotionEnabled: {{ .Values.rollout.strategy.blueGreen.autoPromotionEnabled }}
previewReplicaCount: {{ .Values.rollout.strategy.blueGreen.previewReplicaCount }} previewReplicaCount: {{ .Values.rollout.strategy.blueGreen.previewReplicaCount }}
antiAffinity: antiAffinity:
@ -59,6 +61,7 @@ spec:
allowPrivilegeEscalation: false allowPrivilegeEscalation: false
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.service.enabled }}
ports: ports:
- name: http - name: http
containerPort: 4000 containerPort: 4000
@ -71,6 +74,7 @@ spec:
httpGet: httpGet:
path: / path: /
port: http port: http
{{- end }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts: