From 64edf557d692ccd02422de1678f4e76ad02dad72 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 31 Dec 2022 00:24:09 +0100 Subject: [PATCH] style(convention): Remove file naming convention The previously used file naming convention is no longer necessary as Kustomize already orders any request done to the fluster, without having to rely on the `--recursive` fly of the `apply` command. --- README.md | 20 +------------------ traefik/{0-rbac => rbac}/clusterrole.yaml | 0 .../{0-rbac => rbac}/clusterrolebinding.yaml | 0 traefik/{0-rbac => rbac}/kustomization.yaml | 0 traefik/{0-rbac => rbac}/serviceaccount.yaml | 0 .../deployment.yaml | 0 .../kustomization.yaml | 0 .../pvc.yaml | 0 .../service.yaml | 0 .../deployment.yaml | 4 ++-- .../kustomization.yaml | 0 .../pvc.yaml | 0 .../service.yaml | 2 +- 13 files changed, 4 insertions(+), 22 deletions(-) rename traefik/{0-rbac => rbac}/clusterrole.yaml (100%) rename traefik/{0-rbac => rbac}/clusterrolebinding.yaml (100%) rename traefik/{0-rbac => rbac}/kustomization.yaml (100%) rename traefik/{0-rbac => rbac}/serviceaccount.yaml (100%) rename traefik/{1-traefik-external => traefik-external}/deployment.yaml (100%) rename traefik/{1-traefik-external => traefik-external}/kustomization.yaml (100%) rename traefik/{1-traefik-external => traefik-external}/pvc.yaml (100%) rename traefik/{1-traefik-external => traefik-external}/service.yaml (100%) rename traefik/{1-traefik-internal => traefik-internal}/deployment.yaml (98%) rename traefik/{1-traefik-internal => traefik-internal}/kustomization.yaml (100%) rename traefik/{1-traefik-internal => traefik-internal}/pvc.yaml (100%) rename traefik/{1-traefik-internal => traefik-internal}/service.yaml (95%) diff --git a/README.md b/README.md index c742734..046e834 100644 --- a/README.md +++ b/README.md @@ -92,26 +92,8 @@ Cf : https://docs.k3s.io/advanced#auto-deploying-manifests ### Development domains To access a service publicly when developing, the domain name should be *.beta.halia.dev -To only expose a service internally, the domain name should be *.k3s.beta +To only expose a service internally, the domain name should be *.beta.entos ### Ingresses To split between external and internal services, two traefik ingresses are implemented through the `ingressclass` annotation. `traefik-external` will only allow external access to a given service, while `traefik-internal` restrict to an internal only access. - -### Naming convention -As the project grows in size, all files must be renamed the following norm for easier readability and maintability : -``` -{priority}-{optional-detail}-{service-name}.yaml -``` -The priority here gives an execution order when applying files in bulk. -This means that, for example, to avoid the `namespace doesn't exist` error, the following order can be followed : - -``` -- 0-namespace.yaml -- 1-pvc.yaml -- 2-deployment.yaml -- 2-service.yaml -- 2-ingress.yaml -``` - -This also applies to directories, this behaviour can be seen in the `traefik` directory, where RBAC are prioritized before other files, as they are the first dependency. diff --git a/traefik/0-rbac/clusterrole.yaml b/traefik/rbac/clusterrole.yaml similarity index 100% rename from traefik/0-rbac/clusterrole.yaml rename to traefik/rbac/clusterrole.yaml diff --git a/traefik/0-rbac/clusterrolebinding.yaml b/traefik/rbac/clusterrolebinding.yaml similarity index 100% rename from traefik/0-rbac/clusterrolebinding.yaml rename to traefik/rbac/clusterrolebinding.yaml diff --git a/traefik/0-rbac/kustomization.yaml b/traefik/rbac/kustomization.yaml similarity index 100% rename from traefik/0-rbac/kustomization.yaml rename to traefik/rbac/kustomization.yaml diff --git a/traefik/0-rbac/serviceaccount.yaml b/traefik/rbac/serviceaccount.yaml similarity index 100% rename from traefik/0-rbac/serviceaccount.yaml rename to traefik/rbac/serviceaccount.yaml diff --git a/traefik/1-traefik-external/deployment.yaml b/traefik/traefik-external/deployment.yaml similarity index 100% rename from traefik/1-traefik-external/deployment.yaml rename to traefik/traefik-external/deployment.yaml diff --git a/traefik/1-traefik-external/kustomization.yaml b/traefik/traefik-external/kustomization.yaml similarity index 100% rename from traefik/1-traefik-external/kustomization.yaml rename to traefik/traefik-external/kustomization.yaml diff --git a/traefik/1-traefik-external/pvc.yaml b/traefik/traefik-external/pvc.yaml similarity index 100% rename from traefik/1-traefik-external/pvc.yaml rename to traefik/traefik-external/pvc.yaml diff --git a/traefik/1-traefik-external/service.yaml b/traefik/traefik-external/service.yaml similarity index 100% rename from traefik/1-traefik-external/service.yaml rename to traefik/traefik-external/service.yaml diff --git a/traefik/1-traefik-internal/deployment.yaml b/traefik/traefik-internal/deployment.yaml similarity index 98% rename from traefik/1-traefik-internal/deployment.yaml rename to traefik/traefik-internal/deployment.yaml index c1893df..f89abab 100644 --- a/traefik/1-traefik-internal/deployment.yaml +++ b/traefik/traefik-internal/deployment.yaml @@ -107,8 +107,8 @@ spec: - "--accesslog=true" - "--entrypoints.websecure.http.tls=true" - "--entrypoints.websecure.http.tls.certresolver=letsencrypt" - - "--entrypoints.websecure.http.tls.domains[0].main=k3s.beta" - - "--entrypoints.websecure.http.tls.domains[0].sans=*.k3s.beta" + - "--entrypoints.websecure.http.tls.domains[0].main=beta.entos" + - "--entrypoints.websecure.http.tls.domains[0].sans=*.beta.entos" - "--certificatesresolvers.letsencrypt.acme.tlschallenge=true" - "--certificatesresolvers.letsencrypt.acme.dnschallenge=true" - "--certificatesresolvers.letsencrypt.acme.dnschallenge.provider=ovh" diff --git a/traefik/1-traefik-internal/kustomization.yaml b/traefik/traefik-internal/kustomization.yaml similarity index 100% rename from traefik/1-traefik-internal/kustomization.yaml rename to traefik/traefik-internal/kustomization.yaml diff --git a/traefik/1-traefik-internal/pvc.yaml b/traefik/traefik-internal/pvc.yaml similarity index 100% rename from traefik/1-traefik-internal/pvc.yaml rename to traefik/traefik-internal/pvc.yaml diff --git a/traefik/1-traefik-internal/service.yaml b/traefik/traefik-internal/service.yaml similarity index 95% rename from traefik/1-traefik-internal/service.yaml rename to traefik/traefik-internal/service.yaml index 793e10e..6a7e2ff 100644 --- a/traefik/1-traefik-internal/service.yaml +++ b/traefik/traefik-internal/service.yaml @@ -15,7 +15,7 @@ items: annotations: spec: type: LoadBalancer - loadBalancerIP: 10.10.0.64 + loadBalancerIP: 10.10.0.28 selector: app.kubernetes.io/name: traefik-inter app.kubernetes.io/instance: traefik-inter