From 982120fe366720d2b0d8f0b7075b7d8bc50f7152 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 31 Dec 2022 00:16:17 +0100 Subject: [PATCH] feat(kustomization): Traefik can now be deployed using Kustomize Add kustomization files to traefik, for both ingresses. --- README.md | 7 +++---- kustomization.yaml | 1 + traefik/0-rbac/kustomization.yaml | 7 +++++++ traefik/1-traefik-external/kustomization.yaml | 7 +++++++ traefik/1-traefik-internal/kustomization.yaml | 7 +++++++ traefik/kustomization.yaml | 7 +++++++ 6 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 traefik/0-rbac/kustomization.yaml create mode 100644 traefik/1-traefik-external/kustomization.yaml create mode 100644 traefik/1-traefik-internal/kustomization.yaml create mode 100644 traefik/kustomization.yaml diff --git a/README.md b/README.md index 560601f..c742734 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,12 @@ longhorn - ~~Define namespaces through yaml files~~ - ~~Look into CockroachDB for redundant database~~ Judged too complicated, moving to a 1 to 1 relationship between services and databases - ~~Configure IP range accessibility through Traefik (Internal vs external services)~~ Impossible because of flannel ip-masq +- Schedule longhorn S3 backups +- Move to new naming conventions for files +- Move secrets to separate, private Git repository ? ## Notes ### Cluster base setup -Add node to the list of available load balancer -`kubectl label node svccontroller.k3s.cattle.io/enablelb=true` -NOTE: For development, don't forget to also add the `cp` to the LB list, in order to access local only services - Setup the cluster's backbone ``` kubectl apply -k . diff --git a/kustomization.yaml b/kustomization.yaml index 70a8162..fa61be0 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -8,3 +8,4 @@ resources: - res - https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml - longhorn + - traefik diff --git a/traefik/0-rbac/kustomization.yaml b/traefik/0-rbac/kustomization.yaml new file mode 100644 index 0000000..8b5fac2 --- /dev/null +++ b/traefik/0-rbac/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - clusterrole.yaml + - clusterrolebinding.yaml + - serviceaccount.yaml diff --git a/traefik/1-traefik-external/kustomization.yaml b/traefik/1-traefik-external/kustomization.yaml new file mode 100644 index 0000000..93baf7a --- /dev/null +++ b/traefik/1-traefik-external/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - pvc.yaml + - deployment.yaml + - service.yaml diff --git a/traefik/1-traefik-internal/kustomization.yaml b/traefik/1-traefik-internal/kustomization.yaml new file mode 100644 index 0000000..93baf7a --- /dev/null +++ b/traefik/1-traefik-internal/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - pvc.yaml + - deployment.yaml + - service.yaml diff --git a/traefik/kustomization.yaml b/traefik/kustomization.yaml new file mode 100644 index 0000000..0089a2d --- /dev/null +++ b/traefik/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - 0-rbac + - 1-traefik-internal + - 1-traefik-external