From b045e939851a1f4e3cb1f9435226288620f1d9f4 Mon Sep 17 00:00:00 2001 From: TapTap Date: Tue, 20 Oct 2026 15:45:18 +0200 Subject: [PATCH] add homarr --- homarr/deployment.yaml | 31 +++++++++++++++++++++++++++++++ homarr/external-secret.yaml | 14 ++++++++++++++ homarr/ingress.yaml | 17 +++++++++++++++++ homarr/kustomization.yaml | 9 +++++++++ homarr/namespace.yaml | 4 ++++ homarr/service.yaml | 11 +++++++++++ 6 files changed, 86 insertions(+) create mode 100644 homarr/deployment.yaml create mode 100644 homarr/external-secret.yaml create mode 100644 homarr/ingress.yaml create mode 100644 homarr/kustomization.yaml create mode 100644 homarr/namespace.yaml create mode 100644 homarr/service.yaml diff --git a/homarr/deployment.yaml b/homarr/deployment.yaml new file mode 100644 index 0000000..8eb35bd --- /dev/null +++ b/homarr/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: homarr-deployment + labels: + app: homarr +spec: + replicas: 0 + selector: + matchLabels: + app: homarr + template: + metadata: + labels: + app: homarr + spec: + containers: + - name: homarr + image: ghcr.io/homarr-labs/homarr:latest + ports: + - containerPort: 80 + envFrom: + - secretRef: + name: homarr-secret + volumeMounts: + - name: homarr-volume + mountPath: /appdata + volumes: + - name: homarr-volume + hostPath: + path: /root/kubernetes/homarr/data/appdata diff --git a/homarr/external-secret.yaml b/homarr/external-secret.yaml new file mode 100644 index 0000000..f0408f0 --- /dev/null +++ b/homarr/external-secret.yaml @@ -0,0 +1,14 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: homarr-external-secret +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault-backend + target: + name: homarr-secret# name of the k8s Secret to be created + refreshPolicy: CreatedOnce + dataFrom: + - extract: + key: homarr diff --git a/homarr/ingress.yaml b/homarr/ingress.yaml new file mode 100644 index 0000000..dd62305 --- /dev/null +++ b/homarr/ingress.yaml @@ -0,0 +1,17 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: homarr-ingress +spec: + ingressClassName: "traefik" + rules: + - host: homarr.tap-tap.win + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: homarr-service + port: + number: 80 diff --git a/homarr/kustomization.yaml b/homarr/kustomization.yaml new file mode 100644 index 0000000..3a1b03a --- /dev/null +++ b/homarr/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: homarr +resources: + - namespace.yaml + - secret.yaml + - deployment.yaml + - service.yaml + - ingress.yaml \ No newline at end of file diff --git a/homarr/namespace.yaml b/homarr/namespace.yaml new file mode 100644 index 0000000..28f71f9 --- /dev/null +++ b/homarr/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: homarr \ No newline at end of file diff --git a/homarr/service.yaml b/homarr/service.yaml new file mode 100644 index 0000000..0b13d0f --- /dev/null +++ b/homarr/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: homarr-service +spec: + selector: + app: homarr + ports: + - protocol: TCP + port: 80 + targetPort: 7575