Helm과 함께 Argo Rollouts 사용하기
Argo Rollouts는 변경이 어떻게 만들어졌는지와 무관하게 Rollouts 리소스의 변경에 항상 응답해요.
출처: 문서
본문
Argo Rollouts는 변경이 어떻게 만들어졌는지와 무관하게 Rollouts 리소스의 변경에 항상 응답해요. 이 말은 Argo Rollouts가 배포를 관리하는 데 사용하는 모든 템플릿 솔루션과 호환된다는 뜻이에요.
Argo Rollouts 매니페스트는 Helm 패키지 관리자로 관리할 수 있어요. Helm 차트에 Rollout 리소스가 포함되어 있으면, 차트를 설치/업그레이드하는 즉시 Argo Rollouts가 인계받아 점진적 전달 프로세스를 시작해요.
다음은 Helm으로 관리되는 Rollout 예시예요.
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: {{ 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 }}
strategy:
blueGreen:
activeService: {{ template "helm-guestbook.fullname" . }}
previewService: {{ template "helm-guestbook.fullname" . }}-preview
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 }}
전체 예시는 https://github.com/argoproj/argo-rollouts/tree/master/examples/helm-blue-green 에서 확인할 수 있어요.