feat(make-space): add staging/prod overlays and arm64 Tekton CI

This commit is contained in:
dahyeon committed 2026-11-04 20:41:46 +09:00
1 parent 3d4d541d48
commit fcea6e7107
24 files changed
+1117

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
# make-space
- 환경: `overlays/staging`, `overlays/prod`
- 이미지: `registry.dahyeon.us/dahyeon/make-space` (linux/arm64)
- Harbor pull Secret: `harbor-registry`
- 앱 Secret: `make-space-secrets` (Infisical project `e60bd852-956a-454c-aaeb-65bd0cf418a9`)
앱 저장소의 `staging`/`prod` 브랜치 push → 해당 Tekton Pipeline → 환경별 GitOps 갱신 → Argo CD 자동 Sync.
+81
View File
@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: make-space
labels:
app.kubernetes.io/component: app
spec:
replicas: 0
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app.kubernetes.io/name: make-space
app.kubernetes.io/component: app
template:
metadata:
labels:
app.kubernetes.io/name: make-space
app.kubernetes.io/component: app
spec:
serviceAccountName: make-space
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/make-space
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
envFrom:
- configMapRef:
name: make-space-config
- secretRef:
name: make-space-secrets
ports:
- name: http
containerPort: 3000
protocol: TCP
startupProbe:
httpGet:
path: /health/live
port: http
periodSeconds: 5
failureThreshold: 24
livenessProbe:
httpGet:
path: /health/live
port: http
periodSeconds: 15
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /health/live
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: make-space
app.kubernetes.io/part-of: make-space
app.kubernetes.io/managed-by: kustomize
@@ -0,0 +1,10 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: make-space
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: make-space
app.kubernetes.io/component: app
+5
View File
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: make-space
automountServiceAccountToken: false
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: make-space
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: make-space
app.kubernetes.io/component: app
ports:
- name: http
port: 3000
targetPort: http
protocol: TCP
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: make-space-config
data:
APP_ENV: production
HOST: 0.0.0.0
PORT: "3000"
LEPTOS_OUTPUT_NAME: make-space
LEPTOS_SITE_ADDR: 0.0.0.0:3000
LEPTOS_SITE_ROOT: /app/site
LEPTOS_SITE_PKG_DIR: pkg
MONGODB_DB: make_space
MINIO_ENDPOINT: https://s3.dahyeon.us
MINIO_BUCKET: make-space-photos
MAX_PHOTOS_PER_SOURCE: "40"
MAX_PHOTOS_TOTAL: "120"
RUST_LOG: info,server=info,pipeline=info,providers=info
@@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: make-space
spec:
template:
metadata:
labels:
app.kubernetes.io/environment: prod
@@ -0,0 +1,21 @@
apiVersion: secrets.infisical.com/v1beta1
kind: InfisicalStaticSecret
metadata:
name: make-space-secrets
spec:
infisicalAuthRef:
name: infisical-auth
namespace: infisical
syncOptions:
refreshInterval: 60s
instantUpdates: false
sources:
- projectId: e60bd852-956a-454c-aaeb-65bd0cf418a9
environmentSlug: prod
secretPath: /
recursive: true
targets:
- name: make-space-secrets
namespace: make-space-prod
kind: Secret
creationPolicy: Owner
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: make-space
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: haproxy
tls:
- hosts:
- make-space.dahyeon.us
secretName: make-space-prod-tls
rules:
- host: make-space.dahyeon.us
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: make-space
port:
number: 3000
@@ -0,0 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: make-space-prod
resources:
- ../../base
- configmap.yaml
- infisical-secret.yaml
- ingress.yaml
images:
- name: registry.dahyeon.us/dahyeon/make-space
newName: registry.dahyeon.us/dahyeon/make-space
newTag: prod
replicas:
- name: make-space
count: 1
patches:
- path: deployment-patch.yaml
commonAnnotations:
make-space.dahyeon.us/source-revision: bootstrap
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: make-space-config
data:
APP_ENV: staging
HOST: 0.0.0.0
PORT: "3000"
LEPTOS_OUTPUT_NAME: make-space
LEPTOS_SITE_ADDR: 0.0.0.0:3000
LEPTOS_SITE_ROOT: /app/site
LEPTOS_SITE_PKG_DIR: pkg
MONGODB_DB: make_space
MINIO_ENDPOINT: https://s3.dahyeon.us
MINIO_BUCKET: make-space-photos
MAX_PHOTOS_PER_SOURCE: "40"
MAX_PHOTOS_TOTAL: "120"
RUST_LOG: info,server=debug,pipeline=debug,providers=debug
@@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: make-space
spec:
template:
metadata:
labels:
app.kubernetes.io/environment: staging
@@ -0,0 +1,21 @@
apiVersion: secrets.infisical.com/v1beta1
kind: InfisicalStaticSecret
metadata:
name: make-space-secrets
spec:
infisicalAuthRef:
name: infisical-auth
namespace: infisical
syncOptions:
refreshInterval: 60s
instantUpdates: false
sources:
- projectId: e60bd852-956a-454c-aaeb-65bd0cf418a9
environmentSlug: staging
secretPath: /
recursive: true
targets:
- name: make-space-secrets
namespace: make-space-staging
kind: Secret
creationPolicy: Owner
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: make-space
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: haproxy
tls:
- hosts:
- make-space-staging.dahyeon.us
secretName: make-space-staging-tls
rules:
- host: make-space-staging.dahyeon.us
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: make-space
port:
number: 3000
@@ -0,0 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: make-space-staging
resources:
- ../../base
- configmap.yaml
- infisical-secret.yaml
- ingress.yaml
images:
- name: registry.dahyeon.us/dahyeon/make-space
newName: registry.dahyeon.us/dahyeon/make-space
newTag: staging
replicas:
- name: make-space
count: 1
patches:
- path: deployment-patch.yaml
commonAnnotations:
make-space.dahyeon.us/source-revision: bootstrap