From 01966cdbd577dc951d31e9b070cb66d43b6528e0 Mon Sep 17 00:00:00 2001 From: Matthias Hinrichs Date: Wed, 14 Jan 2026 15:12:33 +0100 Subject: [PATCH] =?UTF-8?q?F=C3=BCge=20neue=20ArgoCD-Anwendungen=20und=20K?= =?UTF-8?q?onfigurationen=20f=C3=BCr=20Homelab-Apps=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../argocd-project-homelab.yaml | 2 +- 07_bootstrap_argocd/homelab-apps.yaml | 28 ++++++++ 07_bootstrap_argocd/shared-gateway.yaml | 26 ++++++++ 09_homelab_apps/Chart.yaml | 3 + 09_homelab_apps/templates/databasus.yaml | 34 ++++++++++ 09_homelab_apps/templates/freshrss.yaml | 24 +++++++ 09_homelab_apps/templates/ghostfolio.yaml | 24 +++++++ 09_homelab_apps/templates/gitea-runners.yaml | 31 +++++++++ .../templates/homepage-dashboard.yaml | 21 ++++++ 09_homelab_apps/templates/n8n.yaml | 24 +++++++ 09_homelab_apps/templates/pgadmin.yaml | 24 +++++++ 09_homelab_apps/templates/rancher.yaml | 65 +++++++++++++++++++ 09_homelab_apps/values.yaml | 4 ++ 13 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 07_bootstrap_argocd/homelab-apps.yaml create mode 100644 07_bootstrap_argocd/shared-gateway.yaml create mode 100644 09_homelab_apps/Chart.yaml create mode 100644 09_homelab_apps/templates/databasus.yaml create mode 100644 09_homelab_apps/templates/freshrss.yaml create mode 100644 09_homelab_apps/templates/ghostfolio.yaml create mode 100644 09_homelab_apps/templates/gitea-runners.yaml create mode 100644 09_homelab_apps/templates/homepage-dashboard.yaml create mode 100644 09_homelab_apps/templates/n8n.yaml create mode 100644 09_homelab_apps/templates/pgadmin.yaml create mode 100644 09_homelab_apps/templates/rancher.yaml create mode 100644 09_homelab_apps/values.yaml diff --git a/07_bootstrap_argocd/argocd-project-homelab.yaml b/07_bootstrap_argocd/argocd-project-homelab.yaml index 00bb1e1..3ea5b81 100644 --- a/07_bootstrap_argocd/argocd-project-homelab.yaml +++ b/07_bootstrap_argocd/argocd-project-homelab.yaml @@ -4,7 +4,7 @@ metadata: name: homelab namespace: argocd spec: - description: Cluster-weite Infrastructure + description: Project for Homelab Applications destinations: - namespace: '*' server: https://kubernetes.default.svc diff --git a/07_bootstrap_argocd/homelab-apps.yaml b/07_bootstrap_argocd/homelab-apps.yaml new file mode 100644 index 0000000..a4a6c3d --- /dev/null +++ b/07_bootstrap_argocd/homelab-apps.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: homelab-apps + namespace: argocd +spec: + generators: + - git: + repoURL: https://git.hnrx.net/homelab/rke2-single-node.git + revision: HEAD + directories: + - path: 09_homelab_apps/* + template: + metadata: + name: '{{path.basename}}' + spec: + project: homelab + source: + repoURL: https://git.hnrx.net/homelab/rke2-single-node.git + path: '{{path}}' + helm: + valueFiles: + - values.yaml + destination: + server: https://kubernetes.default.svc + namespace: '{{path.basename}}' + syncPolicy: + automated: {prune: true, selfHeal: true} diff --git a/07_bootstrap_argocd/shared-gateway.yaml b/07_bootstrap_argocd/shared-gateway.yaml new file mode 100644 index 0000000..a73800a --- /dev/null +++ b/07_bootstrap_argocd/shared-gateway.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: Gateway +metadata: + name: shared-gateway + namespace: default + labels: + bgp.cilium.io/ip-pool: default # Damit bekommt das Gateway eine IP aus deinem Pool + annotations: + # Damit external-dns diesen Gateway findet und einen DNS-Eintrag erstellt + # (falls external-dns Gateway API unterstützt, was es tut) + cert-manager.io/cluster-issuer: cloudflare-cluster-issuer +spec: + gatewayClassName: envoy-gateway-class + listeners: + - name: https + hostname: "*.k8s.hnrx.net" + protocol: HTTPS + port: 443 + allowedRoutes: + namespaces: + from: All + tls: + mode: Terminate + certificateRefs: + - name: shared-gateway-tls \ No newline at end of file diff --git a/09_homelab_apps/Chart.yaml b/09_homelab_apps/Chart.yaml new file mode 100644 index 0000000..6b97175 --- /dev/null +++ b/09_homelab_apps/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v1 +name: argocd-homelab-apps +version: 0.1.0 diff --git a/09_homelab_apps/templates/databasus.yaml b/09_homelab_apps/templates/databasus.yaml new file mode 100644 index 0000000..3517878 --- /dev/null +++ b/09_homelab_apps/templates/databasus.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: databasus + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: databasus + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + path: . + repoURL: oci://ghcr.io/databasus/charts/databasus + targetRevision: 2.16.3 + helm: + values: | + persistence: + enabled: true + size: 10Gi + storageClassName: nfs-csi + route: + enabled: true + hostnames: + - databasus.k8s.hnrx.net + parentRefs: + - name: shared-gateway + namespace: default + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/09_homelab_apps/templates/freshrss.yaml b/09_homelab_apps/templates/freshrss.yaml new file mode 100644 index 0000000..f4fae09 --- /dev/null +++ b/09_homelab_apps/templates/freshrss.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: freshrss + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: freshrss + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + path: . + repoURL: https://git.hnrx.net/k8s/freshrss.git + targetRevision: main + directory: + recurse: true + exclude: 'renovate.json' + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/09_homelab_apps/templates/ghostfolio.yaml b/09_homelab_apps/templates/ghostfolio.yaml new file mode 100644 index 0000000..c608bc4 --- /dev/null +++ b/09_homelab_apps/templates/ghostfolio.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ghostfolio + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: ghostfolio + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + path: . + repoURL: https://git.hnrx.net/k8s/ghostfolio.git + targetRevision: main + directory: + recurse: true + exclude: 'renovate.json' + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/09_homelab_apps/templates/gitea-runners.yaml b/09_homelab_apps/templates/gitea-runners.yaml new file mode 100644 index 0000000..ccad39f --- /dev/null +++ b/09_homelab_apps/templates/gitea-runners.yaml @@ -0,0 +1,31 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: gitea-runners + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: {{ $.Values.spec.destination.namespace }} + server: {{ $.Values.spec.destination.server }} + project: default + source: + path: . + repoURL: https://git.hnrx.net/k8s/gitea_runners.git + targetRevision: main + kustomize: + namespace: {{ $.Values.spec.destination.namespace }} + patches: + - target: + kind: PhaseSecret + name: gitea-runner-secret + patch: |- + - op: replace + path: /spec/managedSecretReferences/0/secretNamespace + value: "{{ $.Values.spec.destination.namespace }}" + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/09_homelab_apps/templates/homepage-dashboard.yaml b/09_homelab_apps/templates/homepage-dashboard.yaml new file mode 100644 index 0000000..aaf2a31 --- /dev/null +++ b/09_homelab_apps/templates/homepage-dashboard.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: gethomepage + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: gethomepage + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + path: . + repoURL: https://git.hnrx.net/k8s/gethomepage-dashboard.git + targetRevision: main + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/09_homelab_apps/templates/n8n.yaml b/09_homelab_apps/templates/n8n.yaml new file mode 100644 index 0000000..9b5c66b --- /dev/null +++ b/09_homelab_apps/templates/n8n.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: n8n + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: n8n + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + path: . + repoURL: https://git.hnrx.net/k8s/n8n.git + targetRevision: main + directory: + recurse: true + exclude: 'renovate.json' + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/09_homelab_apps/templates/pgadmin.yaml b/09_homelab_apps/templates/pgadmin.yaml new file mode 100644 index 0000000..42e7f80 --- /dev/null +++ b/09_homelab_apps/templates/pgadmin.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: pgadmin + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: pgadmin + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + path: . + repoURL: https://git.hnrx.net/k8s/pgadmin.git + targetRevision: main + directory: + recurse: true + exclude: 'renovate.json' + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/09_homelab_apps/templates/rancher.yaml b/09_homelab_apps/templates/rancher.yaml new file mode 100644 index 0000000..c3b8f9f --- /dev/null +++ b/09_homelab_apps/templates/rancher.yaml @@ -0,0 +1,65 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: rancher + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + ignoreDifferences: + - group: apps + kind: Deployment + jsonPointers: ["/metadata/finalizers"] + destination: + namespace: cattle-system + server: {{ $.Values.spec.destination.server }} + project: homelab-apps + source: + repoURL: https://releases.rancher.com/server-charts/stable + chart: rancher + targetRevision: v2.13.1 + helm: + values: | + hostname: rancher.k8s.hnrx.net + replicas: 1 + bootstrapPassword: "admin123!" + agentTLSMode: system-store # Because we use external TLS with Let's Encrypt + ingress: + enabled: false + service: + type: ClusterIP + persistence: + enabled: true + size: 10Gi + storageClass: nfs-csi + tls: external + extraEnv: + - name: CATTLE_FEATURES + value: "continuous-delivery=false" + + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true + +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: rancher-route + namespace: cattle-system +spec: + parentRefs: + - name: shared-gateway # Ihr Envoy Gateway + namespace: default + hostnames: + - "rancher.k8s.hnrx.net" + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: rancher # Rancher Service Name + port: 80 # Rancher läuft auf Port 80 intern \ No newline at end of file diff --git a/09_homelab_apps/values.yaml b/09_homelab_apps/values.yaml new file mode 100644 index 0000000..4cd36b7 --- /dev/null +++ b/09_homelab_apps/values.yaml @@ -0,0 +1,4 @@ +spec: + destination: + server: https://kubernetes.default.svc + namespace: homelab-apps