diff --git a/helm-guestbook/templates/deployment.yaml b/deployment.yaml similarity index 100% rename from helm-guestbook/templates/deployment.yaml rename to deployment.yaml diff --git a/helm-guestbook/templates/rollout.yaml b/helm-guestbook/templates/rollout.yaml new file mode 100644 index 0000000..07d3714 --- /dev/null +++ b/helm-guestbook/templates/rollout.yaml @@ -0,0 +1,71 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: {{ template "helm-guestbook.fullname" . }} + namespace: {{ template "helm-guestbook.fullname" . }} + labels: + app: {{ template "helm-guestbook.name" . }} + chart: {{ template "helm-guestbook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + revisionHistoryLimit: 3 + selector: + matchLabels: + app: {{ template "helm-guestbook.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "helm-guestbook.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 80 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + readinessProbe: + httpGet: + path: / + port: http + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + minReadySeconds: 30 + strategy: + canary: #Indicates that the rollout should use the Canary strategy + maxSurge: "25%" + maxUnavailable: 0 + steps: + - setWeight: 10 + - pause: + duration: 1m # 1 minute + - setWeight: 20 + - pause: + duration: 1m # 1 minute + - setWeight: 50 + - pause: + duration: 1m # 1 minute + - setWeight: 10 + - pause: + duration: 1m # 1 minute \ No newline at end of file diff --git a/helm-guestbook/values.yaml b/helm-guestbook/values.yaml index 3f4286e..933ba70 100644 --- a/helm-guestbook/values.yaml +++ b/helm-guestbook/values.yaml @@ -2,7 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: 1 +replicaCount: 3 image: repository: gcr.io/heptio-images/ks-guestbook-demo