From c019735184a3e9c8c353f510653ee206c85a99c7 Mon Sep 17 00:00:00 2001 From: hanayo04 Date: Tue, 30 Jul 2024 14:10:23 +0900 Subject: [PATCH] add rollout --- php/templates/rollout.yaml | 28 ++++++++++++++++++++++++++++ php/values.yaml | 11 +++++++++++ 2 files changed, 39 insertions(+) create mode 100644 php/templates/rollout.yaml diff --git a/php/templates/rollout.yaml b/php/templates/rollout.yaml new file mode 100644 index 00000000..116327f1 --- /dev/null +++ b/php/templates/rollout.yaml @@ -0,0 +1,28 @@ +{{- $root := . -}} +{{- if .Values.rollout.enabled -}} +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: "{{ include "akka.containerName" . }}" + labels: + {{- include "php.labels" . | nindent 4 }} + {{- range $k, $v := .Values.labels }} + {{ $k }}: {{ $v | quote }} + {{- end }} +spec: + {{- if .Values.rollout.workloadRef.enabled }} + workloadRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "php.fullname" . }} + {{- else }} + template: + {{- toYaml .Values.rollout.template | nindent 4 }} + {{- end }} + {{- if and (not .Values.autoscalingRollout.enabled) (ne .Values.rollout.replicaCount nil) }} + replicas: {{ .Values.rollout.replicaCount }} + {{- end }} + revisionHistoryLimit: {{ .Values.rollout.revisionHistoryLimit }} + strategy: + {{- toYaml .Values.rollout.strategy | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/php/values.yaml b/php/values.yaml index 88884cfc..036bb047 100644 --- a/php/values.yaml +++ b/php/values.yaml @@ -464,3 +464,14 @@ fpm: # TEST test: enabled: true + +# Rollout configurations +rollout: + enabled: false + workloadRef: + enabled: false + template: {} + # If you want fix replicaCount, disable autoscalingRollout.enabled and uncomment the following line + #replicaCount: 3 + revisionHistoryLimit: 10 + strategy: {}