Skip to content

Commit 0420b98

Browse files
committed
Argo Rollouts実装
1 parent ec3e2ff commit 0420b98

File tree

4 files changed

+43
-24
lines changed

4 files changed

+43
-24
lines changed

infra/k8s/web/templates/hpa.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ metadata:
77
{{- include "web.labels" . | nindent 4 }}
88
spec:
99
scaleTargetRef:
10-
apiVersion: apps/v1
11-
kind: Deployment
10+
apiVersion: argoproj.io/v1alpha1
11+
kind: Rollout
1212
name: {{ include "web.fullname" . }}
1313
minReplicas: {{ .Values.hpa.minReplicas }}
1414
maxReplicas: {{ .Values.hpa.maxReplicas }}

infra/k8s/web/templates/deployment.yaml renamed to infra/k8s/web/templates/rollout.yaml

+39-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
apiVersion: apps/v1
2-
kind: Deployment
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Rollout
33
metadata:
44
name: {{ include "web.fullname" . }}
55
labels:
66
{{- include "web.labels" . | nindent 4 }}
77
spec:
8-
revisionHistoryLimit: 5
8+
replicas: 1
99
strategy:
10-
type: {{ .Values.image.web.strategy }}
10+
blueGreen:
11+
activeService: {{ include "web.fullname" . }}-active
12+
previewService: {{ include "web.fullname" . }}-preview
13+
autoPromotionEnabled: false
14+
scaleDownDelaySeconds: 30
1115
selector:
1216
matchLabels:
1317
{{- include "web.selectorLabels" . | nindent 6 }}
@@ -65,3 +69,34 @@ spec:
6569
- name: misskey-default-conf-file
6670
configMap:
6771
name: misskey-default-config
72+
73+
---
74+
apiVersion: v1
75+
kind: Service
76+
metadata:
77+
name: {{ include "web.fullname" . }}-active
78+
labels:
79+
{{- include "web.labels" . | nindent 4 }}
80+
spec:
81+
type: ClusterIP
82+
selector:
83+
{{- include "web.selectorLabels" . | nindent 4 }}
84+
ports:
85+
- name: http
86+
port: {{ .Values.service.port }}
87+
targetPort: {{ .Values.service.port }}
88+
---
89+
apiVersion: v1
90+
kind: Service
91+
metadata:
92+
name: {{ include "web.fullname" . }}-preview
93+
labels:
94+
{{- include "web.labels" . | nindent 4 }}
95+
spec:
96+
type: ClusterIP
97+
selector:
98+
{{- include "web.selectorLabels" . | nindent 4 }}
99+
ports:
100+
- name: http
101+
port: {{ .Values.service.port }}
102+
targetPort: {{ .Values.service.port }}

infra/k8s/web/templates/service.yaml

-16
This file was deleted.

infra/k8s/web/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ hpa:
5656
resources:
5757
requests:
5858
cpu: 200m
59-
memory: 1500Mi
59+
memory: 1250Mi
6060
limits:
6161
cpu: 450m
62-
memory: 2Gi
62+
memory: 1500Mi
6363
livenessProbe:
6464
initialDelaySeconds: 80
6565
periodSeconds: 10

0 commit comments

Comments
 (0)