From e33c6d0a29267ea80dc346b43f3f761d8cec8e31 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Tue, 28 Apr 2026 23:00:09 +0700 Subject: [PATCH] feat(apps) add staging config --- apps/finance/actualbudget/staging.yaml | 41 ++++++++++++++ apps/khuedoan/blog/staging.yaml | 37 +++++++++++++ apps/khuedoan/homelab-docs/staging.yaml | 73 +++++++++++++++++++++++++ apps/khuedoan/notes/staging.yaml | 44 +++++++++++++++ apps/test/example/staging.yaml | 39 +++++++++++++ 5 files changed, 234 insertions(+) create mode 100644 apps/finance/actualbudget/staging.yaml create mode 100644 apps/khuedoan/blog/staging.yaml create mode 100644 apps/khuedoan/homelab-docs/staging.yaml create mode 100644 apps/khuedoan/notes/staging.yaml create mode 100644 apps/test/example/staging.yaml diff --git a/apps/finance/actualbudget/staging.yaml b/apps/finance/actualbudget/staging.yaml new file mode 100644 index 0000000..705de7b --- /dev/null +++ b/apps/finance/actualbudget/staging.yaml @@ -0,0 +1,41 @@ +defaultPodOptions: + labels: + istio.io/dataplane-mode: ambient +controllers: + main: + containers: + main: + image: + repository: docker.io/actualbudget/actual-server + tag: 25.12.1-alpine +service: + main: + controller: main + ports: + http: + port: 5006 + protocol: HTTP +ingress: + main: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: budget.staging.khuedoan.com + paths: + - path: / + pathType: Prefix + service: + identifier: main + port: http + tls: + - hosts: + - budget.staging.khuedoan.com + secretName: actualbudget-tls-certificate +persistence: + data: + accessMode: ReadWriteOnce + size: 1Gi + globalMounts: + - path: /data diff --git a/apps/khuedoan/blog/staging.yaml b/apps/khuedoan/blog/staging.yaml new file mode 100644 index 0000000..76816c0 --- /dev/null +++ b/apps/khuedoan/blog/staging.yaml @@ -0,0 +1,37 @@ +defaultPodOptions: + labels: + istio.io/dataplane-mode: ambient +controllers: + main: + replicas: 2 + strategy: RollingUpdate + containers: + main: + image: + repository: registry.registry.svc.cluster.local/khuedoan/blog + tag: 2c3e9c2aa204804e00db4234628f00cde03303a7 +service: + main: + controller: main + ports: + http: + port: 3000 + protocol: HTTP +ingress: + main: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: www.staging.khuedoan.com + paths: + - path: / + pathType: Prefix + service: + identifier: main + port: 3000 + tls: + - hosts: + - www.staging.khuedoan.com + secretName: blog-tls-certificate diff --git a/apps/khuedoan/homelab-docs/staging.yaml b/apps/khuedoan/homelab-docs/staging.yaml new file mode 100644 index 0000000..80b8daa --- /dev/null +++ b/apps/khuedoan/homelab-docs/staging.yaml @@ -0,0 +1,73 @@ +defaultPodOptions: + labels: + istio.io/dataplane-mode: ambient +controllers: + main: + containers: + nginx: + image: + repository: nginx + tag: latest + probes: + readiness: + enabled: true + custom: true + spec: + httpGet: + path: / + port: 80 + initialDelaySeconds: 3 + periodSeconds: 3 + build: + image: + repository: nixos/nix + tag: latest + workingDir: /usr/local/src + command: + - /bin/sh + - -c + args: + - | + nix-shell -p git --command 'git clone https://github.com/khuedoan/homelab .' + + while true; do + nix-shell -p python311Packages.mkdocs-material --command 'mkdocs build' + cp -RT ./site /usr/share/nginx/html + sleep 120 + nix-shell -p git --command 'git fetch origin' + nix-shell -p git --command 'git reset --hard origin/master' + done +service: + main: + controller: main + ports: + http: + port: 80 + protocol: HTTP +ingress: + main: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: homelab.staging.khuedoan.com + paths: + - path: / + pathType: ImplementationSpecific + service: + identifier: main + port: http + tls: + - hosts: + - homelab.staging.khuedoan.com + secretName: homelab-docs-tls-certificate +persistence: + source: + type: emptyDir + globalMounts: + - path: /usr/local/src + static: + type: emptyDir + globalMounts: + - path: /usr/share/nginx/html diff --git a/apps/khuedoan/notes/staging.yaml b/apps/khuedoan/notes/staging.yaml new file mode 100644 index 0000000..ce86be3 --- /dev/null +++ b/apps/khuedoan/notes/staging.yaml @@ -0,0 +1,44 @@ +defaultPodOptions: + labels: + istio.io/dataplane-mode: ambient +controllers: + main: + type: statefulset + containers: + main: + image: + repository: ghcr.io/silverbulletmd/silverbullet + tag: v2 + envFrom: + - secret: silverbullet +service: + main: + controller: main + ports: + http: + port: 3000 + protocol: HTTP +ingress: + main: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: notes.staging.khuedoan.com + paths: + - path: / + pathType: Prefix + service: + identifier: main + port: 3000 + tls: + - hosts: + - notes.staging.khuedoan.com + secretName: notes-tls-certificate +persistence: + data: + accessMode: ReadWriteOnce + size: 1Gi + globalMounts: + - path: /space diff --git a/apps/test/example/staging.yaml b/apps/test/example/staging.yaml new file mode 100644 index 0000000..23cf572 --- /dev/null +++ b/apps/test/example/staging.yaml @@ -0,0 +1,39 @@ +defaultPodOptions: + labels: + istio.io/dataplane-mode: ambient +controllers: + main: + replicas: 2 + strategy: RollingUpdate + containers: + main: + image: + repository: registry.registry.svc.cluster.local/example-service + tag: 828c31f942e8913ab2af53a2841c180586c5b7e1 + env: + EXAMPLE_SECRET: vault:secret/data/test/example#MANUALLY_CREATED_EXAMPLE_SECRET +service: + main: + controller: main + ports: + http: + port: 8080 + protocol: HTTP +ingress: + main: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: example.staging.khuedoan.com + paths: + - path: / + pathType: Prefix + service: + identifier: main + port: 8080 + tls: + - hosts: + - example.staging.khuedoan.com + secretName: example-tls-certificate -- 2.51.2