diff --git a/cluster/core/kustomization.yaml b/cluster/core/kustomization.yaml index 3039154..5201770 100644 --- a/cluster/core/kustomization.yaml +++ b/cluster/core/kustomization.yaml @@ -1,4 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ./networking \ No newline at end of file +- ./networking +- ./storage \ No newline at end of file diff --git a/cluster/core/networking/traefik/kustomization.yaml b/cluster/core/networking/traefik/kustomization.yaml index 6ee2e3a..52bc2de 100644 --- a/cluster/core/networking/traefik/kustomization.yaml +++ b/cluster/core/networking/traefik/kustomization.yaml @@ -5,4 +5,4 @@ resources: - ./traefik-secrets.sops.yaml - ./helm-repository.yaml - ./helm-release.yaml -- ./dashboard-ingress.yaml +#- ./dashboard-ingress.yaml diff --git a/cluster/core/storage/kustomization.yaml b/cluster/core/storage/kustomization.yaml new file mode 100644 index 0000000..c85f8d1 --- /dev/null +++ b/cluster/core/storage/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./longhorn \ No newline at end of file diff --git a/cluster/core/storage/longhorn/helm.yaml b/cluster/core/storage/longhorn/helm.yaml new file mode 100644 index 0000000..57fa2cf --- /dev/null +++ b/cluster/core/storage/longhorn/helm.yaml @@ -0,0 +1,25 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: longhorn-charts + namespace: flux-system +spec: + interval: 1m + url: https://charts.longhorn.io +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: longhorn + namespace: longhorn-system +spec: + interval: 5m + chart: + spec: + chart: longhorn + version: '1.4.x' + sourceRef: + kind: HelmRepository + name: longhorn-charts + namespace: flux-system + interval: 1m \ No newline at end of file diff --git a/cluster/core/storage/longhorn/ingress.yaml b/cluster/core/storage/longhorn/ingress.yaml new file mode 100644 index 0000000..f57badb --- /dev/null +++ b/cluster/core/storage/longhorn/ingress.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: longhorn-ingress + namespace: longhorn-system + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure +spec: + rules: + - host: "longhorn.***REMOVED***" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: longhorn + port: + number: 80 \ No newline at end of file diff --git a/cluster/core/storage/longhorn/kustomization.yaml b/cluster/core/storage/longhorn/kustomization.yaml new file mode 100644 index 0000000..b104392 --- /dev/null +++ b/cluster/core/storage/longhorn/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./namespace.yaml +- ./helm.yaml +- ./ingress.yaml \ No newline at end of file diff --git a/cluster/core/storage/longhorn/namespace.yaml b/cluster/core/storage/longhorn/namespace.yaml new file mode 100644 index 0000000..2bb0005 --- /dev/null +++ b/cluster/core/storage/longhorn/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: longhorn-system \ No newline at end of file