diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-07 22:54:35 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-07 22:54:35 +0200 |
| commit | 9d9976ec7d325aefc3386bb1298cea8052732703 (patch) | |
| tree | 3625cc557202ff86106683e3523cac8d71caf369 | |
| parent | f7624de03b894d31347ec15c9571e8cfe83903ff (diff) | |
Migrate remaining 4 apps: example-apache-volume-claim, registry, pushgateway, immich
Apps migrated in this commit:
- example-apache-volume-claim (test namespace, 2 replicas, 1 PVC)
- registry (infra namespace, Docker registry, 1 PVC)
- pushgateway (monitoring namespace, Prometheus metrics)
- immich (multi-component: server, postgres, valkey, ML)
Also:
- Deleted unused example-apache directory
- Updated all Justfiles with ArgoCD commands
- All apps synced and healthy
Progress: 16/22 active apps (73%)
Remaining apps (all in monitoring namespace):
- prometheus (kube-prometheus-stack)
- loki (umbrella chart)
- tempo
- grafana-ingress
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
| -rw-r--r-- | f3s/argocd-apps/example-apache-volume-claim.yaml | 28 | ||||
| -rw-r--r-- | f3s/argocd-apps/immich.yaml | 28 | ||||
| -rw-r--r-- | f3s/argocd-apps/pushgateway.yaml | 28 | ||||
| -rw-r--r-- | f3s/argocd-apps/registry.yaml | 28 | ||||
| -rw-r--r-- | f3s/example-apache-volume-claim/Justfile | 42 | ||||
| -rw-r--r-- | f3s/example-apache/Justfile | 12 | ||||
| -rw-r--r-- | f3s/example-apache/helm-chart/Chart.yaml | 5 | ||||
| -rw-r--r-- | f3s/example-apache/helm-chart/README.md | 11 | ||||
| -rw-r--r-- | f3s/example-apache/helm-chart/templates/apache-deployment.yaml | 21 | ||||
| -rw-r--r-- | f3s/example-apache/helm-chart/templates/apache-ingress.yaml | 40 | ||||
| -rw-r--r-- | f3s/example-apache/helm-chart/templates/apache-service.yaml | 16 | ||||
| -rw-r--r-- | f3s/immich/Justfile | 78 | ||||
| -rw-r--r-- | f3s/pushgateway/Justfile | 32 | ||||
| -rw-r--r-- | f3s/registry/Justfile | 39 |
14 files changed, 263 insertions, 145 deletions
diff --git a/f3s/argocd-apps/example-apache-volume-claim.yaml b/f3s/argocd-apps/example-apache-volume-claim.yaml new file mode 100644 index 0000000..e918e87 --- /dev/null +++ b/f3s/argocd-apps/example-apache-volume-claim.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: example-apache-volume-claim + namespace: cicd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://codeberg.org/snonux/conf.git + targetRevision: master + path: f3s/example-apache-volume-claim/helm-chart + destination: + server: https://kubernetes.default.svc + namespace: test + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=false + retry: + limit: 3 + backoff: + duration: 5s + factor: 2 + maxDuration: 1m diff --git a/f3s/argocd-apps/immich.yaml b/f3s/argocd-apps/immich.yaml new file mode 100644 index 0000000..6fac25b --- /dev/null +++ b/f3s/argocd-apps/immich.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: immich + namespace: cicd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://codeberg.org/snonux/conf.git + targetRevision: master + path: f3s/immich/helm-chart + destination: + server: https://kubernetes.default.svc + namespace: services + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=false + retry: + limit: 3 + backoff: + duration: 5s + factor: 2 + maxDuration: 1m diff --git a/f3s/argocd-apps/pushgateway.yaml b/f3s/argocd-apps/pushgateway.yaml new file mode 100644 index 0000000..46d69ca --- /dev/null +++ b/f3s/argocd-apps/pushgateway.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: pushgateway + namespace: cicd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://codeberg.org/snonux/conf.git + targetRevision: master + path: f3s/pushgateway/helm-chart + destination: + server: https://kubernetes.default.svc + namespace: monitoring + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=false + retry: + limit: 3 + backoff: + duration: 5s + factor: 2 + maxDuration: 1m diff --git a/f3s/argocd-apps/registry.yaml b/f3s/argocd-apps/registry.yaml new file mode 100644 index 0000000..2948233 --- /dev/null +++ b/f3s/argocd-apps/registry.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: registry + namespace: cicd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://codeberg.org/snonux/conf.git + targetRevision: master + path: f3s/registry/helm-chart + destination: + server: https://kubernetes.default.svc + namespace: infra + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=false + retry: + limit: 3 + backoff: + duration: 5s + factor: 2 + maxDuration: 1m diff --git a/f3s/example-apache-volume-claim/Justfile b/f3s/example-apache-volume-claim/Justfile index e8003e8..2cbadf1 100644 --- a/f3s/example-apache-volume-claim/Justfile +++ b/f3s/example-apache-volume-claim/Justfile @@ -1,12 +1,38 @@ NAMESPACE := "test" -RELEASE_NAME := "example-apache-volume-claim" -CHART_PATH := "./helm-chart" +APP_NAME := "example-apache-volume-claim" -install: - helm install {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} --create-namespace +status: + @echo "=== Pods ===" + @kubectl get pods -n {{NAMESPACE}} -l app=apache + @echo "" + @echo "=== Service ===" + @kubectl get svc -n {{NAMESPACE}} apache-service + @echo "" + @echo "=== Ingress ===" + @kubectl get ingress -n {{NAMESPACE}} apache-ingress + @echo "" + @echo "=== PVC ===" + @kubectl get pvc -n {{NAMESPACE}} example-apache-pvc + @echo "" + @echo "=== ArgoCD Status ===" + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo "" -upgrade: - helm upgrade {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} +logs lines="100": + kubectl logs -n {{NAMESPACE}} -l app=apache --tail={{lines}} -f -delete: - helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} +port-forward port="8080": + @echo "Forwarding apache to localhost:{{port}}" + kubectl port-forward -n {{NAMESPACE}} svc/apache-service {{port}}:80 + +sync: + @echo "Triggering ArgoCD sync..." + @kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite + @sleep 2 + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo "" + +argocd-status: + argocd app get {{APP_NAME}} --core + +restart: + @echo "Restarting apache..." + kubectl rollout restart -n {{NAMESPACE}} deployment/apache-deployment diff --git a/f3s/example-apache/Justfile b/f3s/example-apache/Justfile deleted file mode 100644 index 579b925..0000000 --- a/f3s/example-apache/Justfile +++ /dev/null @@ -1,12 +0,0 @@ -NAMESPACE := "test" -RELEASE_NAME := "example-apache" -CHART_PATH := "./helm-chart" - -install: - helm install {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} --create-namespace - -upgrade: - helm upgrade {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} - -delete: - helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} diff --git a/f3s/example-apache/helm-chart/Chart.yaml b/f3s/example-apache/helm-chart/Chart.yaml deleted file mode 100644 index 6d49643..0000000 --- a/f3s/example-apache/helm-chart/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v2 -name: apache -description: A Helm chart for deploying Apache -version: 0.1.0 -appVersion: "1.0" diff --git a/f3s/example-apache/helm-chart/README.md b/f3s/example-apache/helm-chart/README.md deleted file mode 100644 index 4eb16d4..0000000 --- a/f3s/example-apache/helm-chart/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Apache Helm Chart - -This chart deploys a simple Apache web server. - -## Installing the Chart - -To install the chart with the release name `my-release`, run the following command: - -```bash -helm install example-apache . --namespace test --create-namespace -```
\ No newline at end of file diff --git a/f3s/example-apache/helm-chart/templates/apache-deployment.yaml b/f3s/example-apache/helm-chart/templates/apache-deployment.yaml deleted file mode 100644 index 364de1d..0000000 --- a/f3s/example-apache/helm-chart/templates/apache-deployment.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Apache HTTP Server Deployment -apiVersion: apps/v1 -kind: Deployment -metadata: - name: apache-deployment -spec: - replicas: 1 - selector: - matchLabels: - app: apache - template: - metadata: - labels: - app: apache - spec: - containers: - - name: apache - image: httpd:latest - ports: - # Container port where Apache listens - - containerPort: 80 diff --git a/f3s/example-apache/helm-chart/templates/apache-ingress.yaml b/f3s/example-apache/helm-chart/templates/apache-ingress.yaml deleted file mode 100644 index aa575ed..0000000 --- a/f3s/example-apache/helm-chart/templates/apache-ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: apache-ingress - namespace: test - annotations: - spec.ingressClassName: traefik - traefik.ingress.kubernetes.io/router.entrypoints: web -spec: - rules: - - host: f3s.buetow.org - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: apache-service - port: - number: 80 - - host: standby.f3s.buetow.org - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: apache-service - port: - number: 80 - - host: www.f3s.buetow.org - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: apache-service - port: - number: 80 diff --git a/f3s/example-apache/helm-chart/templates/apache-service.yaml b/f3s/example-apache/helm-chart/templates/apache-service.yaml deleted file mode 100644 index 93b24ac..0000000 --- a/f3s/example-apache/helm-chart/templates/apache-service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: apache - name: apache-service -spec: - ports: - - name: web - port: 80 - protocol: TCP - # Expose port 80 on the service - targetPort: 80 - selector: - # Link this service to pods with the label app=apache - app: apache diff --git a/f3s/immich/Justfile b/f3s/immich/Justfile index c351bc8..467ae04 100644 --- a/f3s/immich/Justfile +++ b/f3s/immich/Justfile @@ -1,31 +1,61 @@ NAMESPACE := "services" -RELEASE_NAME := "immich" -CHART_NAME := "immich/immich" -VALUES_FILE := "./values.yaml" -CHART_PATH := "./helm-chart" +APP_NAME := "immich" -# Install the custom resources (PVs, PVCs, PostgreSQL, etc.) -install-resources: - kubectl apply -f {{CHART_PATH}}/templates/ --namespace {{NAMESPACE}} +status: + @echo "=== Pods ===" + @kubectl get pods -n {{NAMESPACE}} | grep immich + @echo "" + @echo "=== Services ===" + @kubectl get svc -n {{NAMESPACE}} | grep immich + @echo "" + @echo "=== Ingress ===" + @kubectl get ingress -n {{NAMESPACE}} immich-ingress + @echo "" + @echo "=== PVCs ===" + @kubectl get pvc -n {{NAMESPACE}} | grep immich + @echo "" + @echo "=== ArgoCD Status ===" + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo "" -# Install Immich using the official Helm chart with custom values -install: - helm install {{RELEASE_NAME}} {{CHART_NAME}} -f {{VALUES_FILE}} --namespace {{NAMESPACE}} --create-namespace +logs-server lines="100": + kubectl logs -n {{NAMESPACE}} -l app=immich-server --tail={{lines}} -f -# Upgrade Immich deployment -upgrade: - helm upgrade {{RELEASE_NAME}} {{CHART_NAME}} -f {{VALUES_FILE}} --namespace {{NAMESPACE}} +logs-ml lines="100": + kubectl logs -n {{NAMESPACE}} -l app=immich-machine-learning --tail={{lines}} -f -# Delete Immich deployment (keeps PVs and data) -delete: - helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} +logs-postgres lines="100": + kubectl logs -n {{NAMESPACE}} -l app=immich-postgres --tail={{lines}} -f -# Delete all resources including PVs (WARNING: This will delete all data!) -delete-all: - helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} - kubectl delete -f {{CHART_PATH}}/templates/ --namespace {{NAMESPACE}} +logs-valkey lines="100": + kubectl logs -n {{NAMESPACE}} -l app=immich-valkey --tail={{lines}} -f -# Show current deployment status -status: - kubectl get all -n {{NAMESPACE}} -l app.kubernetes.io/instance={{RELEASE_NAME}} - kubectl get pvc -n {{NAMESPACE}} | grep immich +port-forward port="2283": + @echo "Forwarding immich server to localhost:{{port}}" + kubectl port-forward -n {{NAMESPACE}} svc/immich-server {{port}}:2283 + +sync: + @echo "Triggering ArgoCD sync..." + @kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite + @sleep 2 + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo "" + +argocd-status: + argocd app get {{APP_NAME}} --core + +restart-server: + @echo "Restarting immich server..." + kubectl rollout restart -n {{NAMESPACE}} deployment/immich-server + +restart-ml: + @echo "Restarting immich machine learning..." + kubectl rollout restart -n {{NAMESPACE}} deployment/immich-machine-learning + +restart-postgres: + @echo "Restarting immich postgres..." + kubectl rollout restart -n {{NAMESPACE}} deployment/immich-postgres + +restart-valkey: + @echo "Restarting immich valkey..." + kubectl rollout restart -n {{NAMESPACE}} deployment/immich-valkey + +restart: restart-server restart-ml diff --git a/f3s/pushgateway/Justfile b/f3s/pushgateway/Justfile new file mode 100644 index 0000000..f043d51 --- /dev/null +++ b/f3s/pushgateway/Justfile @@ -0,0 +1,32 @@ +NAMESPACE := "monitoring" +APP_NAME := "pushgateway" + +status: + @echo "=== Pods ===" + @kubectl get pods -n {{NAMESPACE}} | grep pushgateway + @echo "" + @echo "=== Service ===" + @kubectl get svc -n {{NAMESPACE}} pushgateway + @echo "" + @echo "=== ArgoCD Status ===" + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo "" + +logs lines="100": + kubectl logs -n {{NAMESPACE}} -l app=pushgateway --tail={{lines}} -f + +port-forward port="9091": + @echo "Forwarding pushgateway to localhost:{{port}}" + kubectl port-forward -n {{NAMESPACE}} svc/pushgateway {{port}}:9091 + +sync: + @echo "Triggering ArgoCD sync..." + @kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite + @sleep 2 + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo "" + +argocd-status: + argocd app get {{APP_NAME}} --core + +restart: + @echo "Restarting pushgateway..." + kubectl rollout restart -n {{NAMESPACE}} deployment/pushgateway diff --git a/f3s/registry/Justfile b/f3s/registry/Justfile index 297d95a..d45838f 100644 --- a/f3s/registry/Justfile +++ b/f3s/registry/Justfile @@ -1,12 +1,35 @@ NAMESPACE := "infra" -RELEASE_NAME := "registry" -CHART_PATH := "./helm-chart" +APP_NAME := "registry" -install: - helm install {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} --create-namespace +status: + @echo "=== Pods ===" + @kubectl get pods -n {{NAMESPACE}} | grep registry + @echo "" + @echo "=== Service ===" + @kubectl get svc -n {{NAMESPACE}} docker-registry-service + @echo "" + @echo "=== PVC ===" + @kubectl get pvc -n {{NAMESPACE}} docker-registry-pvc + @echo "" + @echo "=== ArgoCD Status ===" + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo "" -upgrade: - helm upgrade {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} +logs lines="100": + kubectl logs -n {{NAMESPACE}} -l app=docker-registry --tail={{lines}} -f -delete: - helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} +port-forward port="5000": + @echo "Forwarding docker registry to localhost:{{port}}" + kubectl port-forward -n {{NAMESPACE}} svc/docker-registry-service {{port}}:5000 + +sync: + @echo "Triggering ArgoCD sync..." + @kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite + @sleep 2 + @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo "" + +argocd-status: + argocd app get {{APP_NAME}} --core + +restart: + @echo "Restarting docker registry..." + kubectl rollout restart -n {{NAMESPACE}} deployment/docker-registry |
