fix: consistency .Values.rollout.enabled

This commit is contained in:
devthejo 2023-12-17 11:44:19 +01:00
parent dbd6ed2be0
commit a31d897ce5
Signed by: devthejo
GPG key ID: C04215C627711F5C
4 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{{- if and (eq .Values.kind "Rollout") (eq .Values.rollout.strategy.type "BlueGreen") .Values.preview.ingress.enabled -}} {{- if and .Values.rollout.enabled (eq .Values.rollout.strategy.type "BlueGreen") .Values.preview.ingress.enabled -}}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:

View file

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

View file

@ -1,5 +1,5 @@
apiVersion: {{ eq .Values.kind "Rollout" | ternary "argoproj.io/v1alpha1" "apps/v1" }} apiVersion: {{ .Values.rollout.enabled | ternary "argoproj.io/v1alpha1" "apps/v1" }}
kind: {{ .Values.kind }} kind: {{ .Values.rollout.enabled | ternary "Rollout" "Deployment" }}
metadata: metadata:
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
@ -17,7 +17,7 @@ spec:
selector: selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
strategy: strategy:
{{- if eq .Values.kind "Rollout" }} {{- if .Values.rollout.enabled }}
{{- if eq .Values.rollout.strategy.type "BlueGreen" }} {{- if eq .Values.rollout.strategy.type "BlueGreen" }}
blueGreen: blueGreen:
activeService: {{ default (include "common.names.fullname" .) .Values.rollout.strategy.blueGreen.activeService | quote }} activeService: {{ default (include "common.names.fullname" .) .Values.rollout.strategy.blueGreen.activeService | quote }}

View file

@ -1,7 +1,6 @@
fullnameOverride: "" fullnameOverride: ""
nameOverride: "" nameOverride: ""
kind: Rollout
exposed: true exposed: true
image: image:
@ -104,6 +103,7 @@ deployment:
strategy: {} strategy: {}
rollout: rollout:
enabled: false
strategy: strategy:
type: "BlueGreen" type: "BlueGreen"
blueGreen: blueGreen: