From 51b2dc6e040232384b2799916d9723970fbdf74e Mon Sep 17 00:00:00 2001 From: this-is-tobi Date: Wed, 4 Oct 2023 21:54:25 +0200 Subject: [PATCH] feat: :sparkles: control ingressClassName with dsc --- roles/argocd/templates/values.yaml.j2 | 16 +++++++++++++++- roles/console-dso/templates/values.yaml.j2 | 1 + roles/gitlab/templates/gitlab-instance.yaml.j2 | 1 + roles/harbor/templates/values.yaml.j2 | 1 + roles/keycloak/templates/values.yaml.j2 | 2 +- roles/nexus/templates/ingress.yml.j2 | 1 + roles/socle-config/files/crd-conf-dso.yaml | 3 +++ roles/sonarqube/templates/values.yaml.j2 | 2 +- roles/vault/templates/ingress.yaml.j2 | 1 + 9 files changed, 25 insertions(+), 3 deletions(-) diff --git a/roles/argocd/templates/values.yaml.j2 b/roles/argocd/templates/values.yaml.j2 index 2ae8dd97..cee1a288 100644 --- a/roles/argocd/templates/values.yaml.j2 +++ b/roles/argocd/templates/values.yaml.j2 @@ -86,4 +86,18 @@ extraDeploy: kind: ConfigMap metadata: name: argocd-rbac-cm - namespace: {{ dsc.argocd.namespace }} \ No newline at end of file + namespace: {{ dsc.ingress.className }} +applicationSet: + webhook: + ingress: + ingressClassName: {{ dsc.ingress.className }} +notifications: + webhook: + ingress: + ingressClassName: {{ dsc.ingress.className }} +server: + ingress: + ingressClassName: {{ dsc.ingress.className }} +server: + ingressGrpc: + ingressClassName: {{ dsc.ingress.className }} \ No newline at end of file diff --git a/roles/console-dso/templates/values.yaml.j2 b/roles/console-dso/templates/values.yaml.j2 index 22739916..683070d3 100644 --- a/roles/console-dso/templates/values.yaml.j2 +++ b/roles/console-dso/templates/values.yaml.j2 @@ -1,4 +1,5 @@ ingress: + ingressClassName: {{ dsc.ingress.className }} hosts: - {{ console_domain }} annotations: {{ dsc.ingress.annotations }} diff --git a/roles/gitlab/templates/gitlab-instance.yaml.j2 b/roles/gitlab/templates/gitlab-instance.yaml.j2 index a5e29bd7..abea705e 100644 --- a/roles/gitlab/templates/gitlab-instance.yaml.j2 +++ b/roles/gitlab/templates/gitlab-instance.yaml.j2 @@ -70,6 +70,7 @@ global: name: {{ gitlab_domain }} {% endif %} ingress: + class: {{ dsc.ingress.className }} annotations: {% for key, val in dsc.ingress.annotations.items() %} {{ key }}: {{ val }} diff --git a/roles/harbor/templates/values.yaml.j2 b/roles/harbor/templates/values.yaml.j2 index d8764230..e6ad3d44 100644 --- a/roles/harbor/templates/values.yaml.j2 +++ b/roles/harbor/templates/values.yaml.j2 @@ -19,6 +19,7 @@ expose: {% endif %} {% endif %} ingress: + className: {{ dsc.ingress.className }} hosts: core: {{ harbor_domain }} notary: {{ dsc.harbor.subDomain }}-notary{{ root_domain }} diff --git a/roles/keycloak/templates/values.yaml.j2 b/roles/keycloak/templates/values.yaml.j2 index db0b3caa..fdb4890b 100644 --- a/roles/keycloak/templates/values.yaml.j2 +++ b/roles/keycloak/templates/values.yaml.j2 @@ -112,7 +112,7 @@ service: ingress: enabled: true - ingressClassName: "" + ingressClassName: {{ dsc.ingress.className }} pathType: "Prefix" apiVersion: "" hostname: "{{ keycloak_domain }}" diff --git a/roles/nexus/templates/ingress.yml.j2 b/roles/nexus/templates/ingress.yml.j2 index eff8a8d6..d42c8da9 100644 --- a/roles/nexus/templates/ingress.yml.j2 +++ b/roles/nexus/templates/ingress.yml.j2 @@ -23,6 +23,7 @@ spec: secretName: nexus-tls-secret {% endif %} {% endif %} + ingressClassName: {{ dsc.ingress.className }} rules: - host: {{ nexus_domain }} http: diff --git a/roles/socle-config/files/crd-conf-dso.yaml b/roles/socle-config/files/crd-conf-dso.yaml index 5edf1e1d..183319a1 100644 --- a/roles/socle-config/files/crd-conf-dso.yaml +++ b/roles/socle-config/files/crd-conf-dso.yaml @@ -278,6 +278,9 @@ spec: default: {} description: Additionals annotations to add to all tools' ingresses type: object + className: + description: Ingress class name to use for all ingresses + type: string labels: x-kubernetes-preserve-unknown-fields: true default: {} diff --git a/roles/sonarqube/templates/values.yaml.j2 b/roles/sonarqube/templates/values.yaml.j2 index 96367d79..a2a9d34f 100644 --- a/roles/sonarqube/templates/values.yaml.j2 +++ b/roles/sonarqube/templates/values.yaml.j2 @@ -33,7 +33,7 @@ ingress: {% endfor %} # This property allows for reports up to a certain size to be uploaded to SonarQube nginx.ingress.kubernetes.io/proxy-body-size: "64m" - ingressClassName: "" + ingressClassName: {{ dsc.ingress.className }} labels: app: "sonar" {% if not dsc.ingress.tls.type == 'none' %} diff --git a/roles/vault/templates/ingress.yaml.j2 b/roles/vault/templates/ingress.yaml.j2 index 1c097273..1c18da9e 100644 --- a/roles/vault/templates/ingress.yaml.j2 +++ b/roles/vault/templates/ingress.yaml.j2 @@ -23,6 +23,7 @@ spec: secretName: vault-tls-secret {% endif %} {% endif %} + ingressClassName: {{ dsc.ingress.className }} rules: - host: {{ vault_domain }} http: