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