REFACTOR(repo): migrate to Helm chart structure

- Add web-app Helm chart in charts/web-app/
- Replace individual deployment/service/ingress YAML with helm-values
- Update ArgoCD applications to use Helm chart with values files
- Reduces per-app files from 6 to 2 (argocd.yaml + helm-values.yaml)

Apps migrated: jaejadle, jaejadle-dev, joossam, joossam-dev,
jotion, jovies, portfolio, todo
This commit is contained in:
2026-01-06 01:04:43 +09:00
parent 5e0b33d44f
commit 128ab8cdb7
59 changed files with 962 additions and 968 deletions

View File

@@ -10,7 +10,13 @@ spec:
sources:
- repoURL: https://github.com/K3S-HOME/web-apps.git
targetRevision: main
path: jotion
path: charts/web-app
helm:
valueFiles:
- $values/jotion/helm-values.yaml
- repoURL: https://github.com/K3S-HOME/web-apps.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: jotion

View File

@@ -1,58 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jotion
labels:
app: jotion
spec:
replicas: 1
selector:
matchLabels:
app: jotion
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
revisionHistoryLimit: 3
template:
metadata:
labels:
app: jotion
spec:
imagePullSecrets:
- name: ghcr-secret
containers:
- name: jotion
image: ghcr.io/mayne0213/jotion:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
protocol: TCP
env:
- name: NODE_ENV
value: production
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: jotion-secrets
key: database-url
resources:
requests:
memory: 80Mi
cpu: 20m
limits:
memory: 200Mi
livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
restartPolicy: Always

View File

@@ -1,18 +0,0 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: jotion-secrets
spec:
refreshInterval: 1h
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: jotion-secrets
creationPolicy: Owner
deletionPolicy: Retain
data:
- secretKey: database-url
remoteRef:
key: jotion
property: DATABASE_URL

81
jotion/helm-values.yaml Normal file
View File

@@ -0,0 +1,81 @@
# Jotion Web App Helm Values
name: jotion
image:
registry: ghcr.io
repository: mayne0213/jotion
tag: latest
pullPolicy: Always
imagePullSecrets:
- name: ghcr-secret
replicaCount: 1
containerPort: 3000
service:
enabled: true
type: ClusterIP
port: 80
ingress:
enabled: true
className: traefik
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: jotion0213.kro.kr
paths:
- path: /
pathType: Prefix
- host: www.jotion0213.kro.kr
paths:
- path: /
pathType: Prefix
tls:
- secretName: jotion-tls
hosts:
- jotion0213.kro.kr
- www.jotion0213.kro.kr
resources:
requests:
memory: 80Mi
cpu: 20m
limits:
memory: 200Mi
healthCheck:
enabled: true
path: /api/health
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 5
env:
- name: NODE_ENV
value: production
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: jotion-secrets
key: database-url
externalSecret:
enabled: true
refreshInterval: 1h
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
creationPolicy: Owner
deletionPolicy: Retain
data:
- secretKey: database-url
remoteRef:
key: jotion
property: DATABASE_URL

View File

@@ -1,34 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jotion-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: traefik
tls:
- hosts:
- jotion0213.kro.kr
- www.jotion0213.kro.kr
secretName: jotion-tls
rules:
- host: jotion0213.kro.kr
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jotion
port:
number: 80
- host: www.jotion0213.kro.kr
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jotion
port:
number: 80

View File

@@ -1,8 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: jotion
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
- external-secret.yaml

View File

@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: jotion
labels:
app: jotion
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 3000
protocol: TCP
selector:
app: jotion