feat(blog): add staging and production CI/CD

This commit is contained in:
dahyeon committed 2026-11-17 18:47:40 +09:00
1 parent ca3817f8da
commit b44398719c
25 files changed
+1219 -2

No files matched your search

+81
View File
@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: blog
labels:
app.kubernetes.io/component: app
spec:
replicas: 0
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app.kubernetes.io/name: blog
app.kubernetes.io/component: app
template:
metadata:
labels:
app.kubernetes.io/name: blog
app.kubernetes.io/component: app
spec:
serviceAccountName: blog
automountServiceAccountToken: false
nodeSelector:
kubernetes.io/arch: arm64
imagePullSecrets:
- name: harbor-registry
terminationGracePeriodSeconds: 60
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: app
image: registry.dahyeon.us/dahyeon/blog
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
envFrom:
- configMapRef:
name: blog-config
- secretRef:
name: blog-secrets
ports:
- name: http
containerPort: 3000
protocol: TCP
startupProbe:
httpGet:
path: /healthz
port: http
periodSeconds: 5
failureThreshold: 24
livenessProbe:
httpGet:
path: /healthz
port: http
periodSeconds: 15
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /healthz
port: http
periodSeconds: 10
timeoutSeconds: 3
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: "2"
memory: 1Gi
+13
View File
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- services.yaml
- serviceaccount.yaml
- poddisruptionbudget.yaml
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/name: blog
app.kubernetes.io/part-of: blog
app.kubernetes.io/managed-by: kustomize
+10
View File
@@ -0,0 +1,10 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: blog
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: blog
app.kubernetes.io/component: app
+5
View File
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: blog
automountServiceAccountToken: false
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: blog
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: blog
app.kubernetes.io/component: app
ports:
- name: http
port: 3000
targetPort: http
protocol: TCP