FEAT(jotion): add jotion application

- Add ArgoCD Application definition
- Add deployment, service, ingress, external-secret
- Domain: jotion0213.kro.kr
- Vault secret path: secret/jotion
This commit is contained in:
2026-01-05 02:32:18 +09:00
parent f7afc55588
commit 9e8d538ab1
7 changed files with 167 additions and 0 deletions

35
jotion/argocd.yaml Normal file
View File

@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: jotion
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
sources:
- repoURL: https://github.com/K3S-HOME/web-apps.git
targetRevision: main
path: jotion
destination:
server: https://kubernetes.default.svc
namespace: jotion
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
revisionHistoryLimit: 10

56
jotion/deployment.yaml Normal file
View File

@@ -0,0 +1,56 @@
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:
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

@@ -0,0 +1,18 @@
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

34
jotion/ingress.yaml Normal file
View File

@@ -0,0 +1,34 @@
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

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

15
jotion/service.yaml Normal file
View File

@@ -0,0 +1,15 @@
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