From 72f083c44401420ba079c77699349dd9473fcb2f Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 11 Aug 2024 12:12:02 -0500 Subject: [PATCH] Add Argo Rollout --- kustomize/app/kustomization.yaml | 1 + kustomize/app/rollout.yaml | 52 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 kustomize/app/rollout.yaml diff --git a/kustomize/app/kustomization.yaml b/kustomize/app/kustomization.yaml index e16ea74..118e0cd 100644 --- a/kustomize/app/kustomization.yaml +++ b/kustomize/app/kustomization.yaml @@ -5,5 +5,6 @@ namespace: toy resources: - secret.yaml - deployment.yaml + - rollout.yaml - services.yaml - ingress.yaml diff --git a/kustomize/app/rollout.yaml b/kustomize/app/rollout.yaml new file mode 100644 index 0000000..d278c20 --- /dev/null +++ b/kustomize/app/rollout.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: toy +spec: + replicas: 5 + strategy: + canary: + steps: + - setWeight: 20 + - pause: {} + - setWeight: 40 + - pause: {duration: 10} + - setWeight: 60 + - pause: {duration: 10} + - setWeight: 80 + - pause: {duration: 10} + revisionHistoryLimit: 2 + selector: + matchLabels: + app: toy + template: + metadata: + labels: + app: toy + spec: + containers: + - name: toy + image: git.kill0.net/ryanc/toy:latest + ports: + - name: web + containerPort: 4567 + env: + - name: SESSION_SECRET + valueFrom: + secretKeyRef: + name: toy-session-secret + key: session_secret + optional: true + livenessProbe: + httpGet: + path: /livez + port: 4567 + initialDelaySeconds: 3 + periodSeconds: 3 + readinessProbe: + httpGet: + path: /readyz + port: 4567 + initialDelaySeconds: 5 + periodSeconds: 5