From d1f976f83a4bd993cff97bc543d9a2e42f057725 Mon Sep 17 00:00:00 2001 From: icurfer Date: Tue, 3 Dec 2024 07:17:47 +0000 Subject: [PATCH] init --- base/kustomization.yaml | 5 +++++ base/rollout.yaml | 33 +++++++++++++++++++++++++++++++++ base/service.yaml | 12 ++++++++++++ overlays/dev/image-patch.yaml | 16 ++++++++++++++++ overlays/dev/kustomization.yaml | 9 +++++++++ 5 files changed, 75 insertions(+) create mode 100644 base/kustomization.yaml create mode 100644 base/rollout.yaml create mode 100644 base/service.yaml create mode 100644 overlays/dev/image-patch.yaml create mode 100644 overlays/dev/kustomization.yaml diff --git a/base/kustomization.yaml b/base/kustomization.yaml new file mode 100644 index 0000000..d836fe6 --- /dev/null +++ b/base/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - rollout.yaml + - service.yaml \ No newline at end of file diff --git a/base/rollout.yaml b/base/rollout.yaml new file mode 100644 index 0000000..7fa8b6c --- /dev/null +++ b/base/rollout.yaml @@ -0,0 +1,33 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: rollouts-demo +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: rollouts-demo + template: + metadata: + labels: + app: rollouts-demo + spec: + containers: + - name: rollouts-demo + image: argoproj/rollouts-demo:blue + ports: + - name: http + containerPort: 8080 + protocol: TCP \ No newline at end of file diff --git a/base/service.yaml b/base/service.yaml new file mode 100644 index 0000000..200ce40 --- /dev/null +++ b/base/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: rollouts-demo +spec: + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app: rollouts-demo \ No newline at end of file diff --git a/overlays/dev/image-patch.yaml b/overlays/dev/image-patch.yaml new file mode 100644 index 0000000..d34bf22 --- /dev/null +++ b/overlays/dev/image-patch.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: rollouts-demo +spec: + revisionHistoryLimit: 2 + selector: + matchLabels: + app: rollouts-demo + template: + metadata: + labels: + app: rollouts-demo + spec: + containers: + - name: rollouts-demo \ No newline at end of file diff --git a/overlays/dev/kustomization.yaml b/overlays/dev/kustomization.yaml new file mode 100644 index 0000000..0f8e60b --- /dev/null +++ b/overlays/dev/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: argoproj/rollouts-demo:blue + newTag: blue +resources: +- ../../base +patchesStrategicMerge: +- image-patch.yaml \ No newline at end of file