From 2ec797d39aff101c3e0eaf62c571f75f58de8116 Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 29 Aug 2022 03:02:13 +0300 Subject: [PATCH] fix ingresses and external dns with ingressClass --- inventory/ghp/sample/group_vars/all/versions.yaml | 12 ++++++------ roles/external-dns/defaults/main.yaml | 6 +++++- roles/external-dns/tasks/main.yaml | 2 +- roles/external-ingress-nginx/defaults/main.yaml | 3 ++- roles/gitea/defaults/main.yaml | 9 +++++++-- roles/gitea/tasks/main.yaml | 2 +- roles/internal-dns/defaults/main.yaml | 6 +++++- roles/internal-dns/tasks/main.yaml | 2 +- roles/internal-ingress-nginx/defaults/main.yaml | 3 ++- roles/local-dns/defaults/main.yaml | 6 +++++- roles/local-dns/tasks/main.yaml | 2 +- roles/local-ingress-nginx/defaults/main.yaml | 3 ++- roles/service-dns/defaults/main.yaml | 4 ++++ roles/service-dns/tasks/main.yaml | 2 +- 14 files changed, 43 insertions(+), 19 deletions(-) diff --git a/inventory/ghp/sample/group_vars/all/versions.yaml b/inventory/ghp/sample/group_vars/all/versions.yaml index a8c72dc..61a8a1c 100644 --- a/inventory/ghp/sample/group_vars/all/versions.yaml +++ b/inventory/ghp/sample/group_vars/all/versions.yaml @@ -9,10 +9,10 @@ nfs_client_provisioner_ssd_version: 4.0.14 cert_manager_version: 1.8.2 # External-DNS -external_dns_version: 6.7.1 -local_dns_version: 6.7.1 -internal_dns_version: 6.7.1 -service_dns_version: 6.7.1 +external_dns_version: 6.8.1 +local_dns_version: 6.8.1 +internal_dns_version: 6.8.1 +service_dns_version: 6.8.1 # Ingress Nginx external_ingress_nginx_version: 4.2.0 @@ -38,7 +38,7 @@ drone_runner_kube_version: 0.1.9 # Gitea gitea_ingress_nginx_version: 4.2.0 -gitea_dns_version: 6.7.1 +gitea_dns_version: 6.8.1 gitea_version: 5.0.8 # Docker and Helm chart registries @@ -53,7 +53,7 @@ nextcloud_version: 3.0.4 # Email dovecot_version: 0.1.3 postfix_version: 0.1.2 -roundcube_version: 0.2.9 +roundcube_version: 0.3.0 rspamd_version: 0.2.0 # Pypi server diff --git a/roles/external-dns/defaults/main.yaml b/roles/external-dns/defaults/main.yaml index c75bd4d..3e5495b 100644 --- a/roles/external-dns/defaults/main.yaml +++ b/roles/external-dns/defaults/main.yaml @@ -1,6 +1,10 @@ external_dns_default_values: + image: + registry: registry.0xace.cc + repository: ghp/external-dns + tag: v0.7.6-663-gf76382a5 fullnameOverride: "{{ external_dns_name | default(namespace + '-external-dns') }}" - annotationFilter: "kubernetes.io/ingress.class={{ external_ingress_class }}" + ingressClass: "{{ external_ingress_class }}" domainFilters: ["{{ external_domain | default(domain) }}"] provider: rfc2136 rfc2136: diff --git a/roles/external-dns/tasks/main.yaml b/roles/external-dns/tasks/main.yaml index c498c20..1508e09 100644 --- a/roles/external-dns/tasks/main.yaml +++ b/roles/external-dns/tasks/main.yaml @@ -6,7 +6,7 @@ create_namespace: true release_namespace: "{{ external_dns_namespace | default(dns_namespace) | default(namespace) }}" release_name: "{{ external_dns_name | default(namespace + '-external-dns') }}" - chart_ref: "{{ external_dns_chart | default('bitnami/external-dns') }}" + chart_ref: "{{ external_dns_chart | default('ghp/external-dns') }}" chart_version: "{{ external_dns_version | default(omit) }}" release_values: "{{ external_dns_combined_values | from_yaml }}" wait: true diff --git a/roles/external-ingress-nginx/defaults/main.yaml b/roles/external-ingress-nginx/defaults/main.yaml index c9e64c3..cfc6372 100644 --- a/roles/external-ingress-nginx/defaults/main.yaml +++ b/roles/external-ingress-nginx/defaults/main.yaml @@ -12,6 +12,7 @@ external_ingress_nginx_default_values: service: loadBalancerIP: "{{ external_loadbalancer_ip | default(omit) }}" externalTrafficPolicy: Local - ingressClass: "{{ external_ingress_class }}" + electionID: "{{ external_ingress_class }}-leader" ingressClassResource: name: "{{ external_ingress_class }}" + controllerValue: "k8s.io/{{ external_ingress_class }}" diff --git a/roles/gitea/defaults/main.yaml b/roles/gitea/defaults/main.yaml index a285c6c..bad178f 100644 --- a/roles/gitea/defaults/main.yaml +++ b/roles/gitea/defaults/main.yaml @@ -121,16 +121,21 @@ gitea_ingress_nginx_default_values: ssh: ssh http: http https: https - ingressClass: "{{ gitea_ingress_class }}" + electionID: "{{ gitea_ingress_class }}-leader" ingressClassResource: name: "{{ gitea_ingress_class }}" + controllerValue: "k8s.io/{{ gitea_ingress_class }}" tcp: 22: "{{ gitea_namespace | default(namespace) }}/{{ namespace }}-gitea-ssh:22" gitea_dns_default_values: + image: + registry: registry.0xace.cc + repository: ghp/external-dns + tag: v0.7.6-663-gf76382a5 fullnameOverride: "{{ gitea_dns_name | default(namespace + '-gitea-internal-dns') }}" - annotationFilter: "kubernetes.io/ingress.class={{ gitea_ingress_class }}" + ingressClass: "{{ gitea_ingress_class }}" domainFilters: ["{{ domain }}"] provider: rfc2136 rfc2136: diff --git a/roles/gitea/tasks/main.yaml b/roles/gitea/tasks/main.yaml index 20145b8..fb8b01b 100644 --- a/roles/gitea/tasks/main.yaml +++ b/roles/gitea/tasks/main.yaml @@ -36,7 +36,7 @@ create_namespace: true release_namespace: "{{ gitea_dns_namespace | default(namespace) }}" release_name: "{{ gitea_dns_relase_name | default(namespace + '-gitea-internal-dns') }}" - chart_ref: "{{ gitea_dns_chart | default('bitnami/external-dns') }}" + chart_ref: "{{ gitea_dns_chart | default('ghp/external-dns') }}" chart_version: "{{ gitea_dns_version | default(omit) }}" release_values: "{{ gitea_dns_combined_values | from_yaml }}" wait: true diff --git a/roles/internal-dns/defaults/main.yaml b/roles/internal-dns/defaults/main.yaml index 510f603..b0e7317 100644 --- a/roles/internal-dns/defaults/main.yaml +++ b/roles/internal-dns/defaults/main.yaml @@ -1,6 +1,10 @@ internal_dns_default_values: + image: + registry: registry.0xace.cc + repository: ghp/external-dns + tag: v0.7.6-663-gf76382a5 fullnameOverride: "{{ internal_dns_name | default(namespace + '-internal-dns') }}" - annotationFilter: "kubernetes.io/ingress.class={{ internal_ingress_class }}" + ingressClass: "{{ internal_ingress_class }}" domainFilters: ["{{ internal_domain | default(domain) }}"] provider: rfc2136 rfc2136: diff --git a/roles/internal-dns/tasks/main.yaml b/roles/internal-dns/tasks/main.yaml index f2bc5c2..65124e3 100644 --- a/roles/internal-dns/tasks/main.yaml +++ b/roles/internal-dns/tasks/main.yaml @@ -6,7 +6,7 @@ create_namespace: true release_namespace: "{{ internal_dns_namespace | default(dns_namespace) | default(namespace) }}" release_name: "{{ internal_dns_name | default(namespace + '-internal-dns') }}" - chart_ref: "{{ internal_dns_chart | default('bitnami/external-dns') }}" + chart_ref: "{{ internal_dns_chart | default('ghp/external-dns') }}" chart_version: "{{ internal_dns_version | default(omit) }}" release_values: "{{ internal_dns_combined_values | from_yaml }}" wait: true diff --git a/roles/internal-ingress-nginx/defaults/main.yaml b/roles/internal-ingress-nginx/defaults/main.yaml index 598c872..111f7aa 100644 --- a/roles/internal-ingress-nginx/defaults/main.yaml +++ b/roles/internal-ingress-nginx/defaults/main.yaml @@ -6,6 +6,7 @@ internal_ingress_nginx_default_values: enabled: false service: loadBalancerIP: "{{ internal_loadbalancer_ip | default(omit) }}" - ingressClass: "{{ internal_ingress_class }}" + electionID: "{{ internal_ingress_class }}-leader" ingressClassResource: name: "{{ internal_ingress_class }}" + controllerValue: "k8s.io/{{ internal_ingress_class }}" diff --git a/roles/local-dns/defaults/main.yaml b/roles/local-dns/defaults/main.yaml index ae865e6..cdab1fc 100644 --- a/roles/local-dns/defaults/main.yaml +++ b/roles/local-dns/defaults/main.yaml @@ -1,6 +1,10 @@ local_dns_default_values: + image: + registry: registry.0xace.cc + repository: ghp/external-dns + tag: v0.7.6-663-gf76382a5 fullnameOverride: "{{ local_dns_name | default(namespace + '-local-dns') }}" - annotationFilter: "kubernetes.io/ingress.class={{ local_ingress_class }}" + ingressClass: "{{ local_ingress_class }}" domainFilters: ["{{ local_domain }}"] provider: rfc2136 rfc2136: diff --git a/roles/local-dns/tasks/main.yaml b/roles/local-dns/tasks/main.yaml index 2ed06c8..4bfc130 100644 --- a/roles/local-dns/tasks/main.yaml +++ b/roles/local-dns/tasks/main.yaml @@ -6,7 +6,7 @@ create_namespace: true release_namespace: "{{ local_dns_namespace | default(dns_namespace) | default(namespace) }}" release_name: "{{ local_dns_name | default(namespace + '-local-dns') }}" - chart_ref: "{{ local_dns_chart | default('bitnami/external-dns') }}" + chart_ref: "{{ local_dns_chart | default('ghp/external-dns') }}" chart_version: "{{ local_dns_version | default(omit) }}" release_values: "{{ local_dns_combined_values | from_yaml }}" wait: true diff --git a/roles/local-ingress-nginx/defaults/main.yaml b/roles/local-ingress-nginx/defaults/main.yaml index 2fb6d13..e34cf49 100644 --- a/roles/local-ingress-nginx/defaults/main.yaml +++ b/roles/local-ingress-nginx/defaults/main.yaml @@ -6,6 +6,7 @@ local_ingress_nginx_default_values: enabled: false service: loadBalancerIP: "{{ local_loadbalancer_ip | default(omit) }}" - ingressClass: "{{ local_ingress_class }}" + electionID: "{{ local_ingress_class }}-leader" ingressClassResource: name: "{{ local_ingress_class }}" + controllerValue: "k8s.io/{{ local_ingress_class }}" diff --git a/roles/service-dns/defaults/main.yaml b/roles/service-dns/defaults/main.yaml index 2741a1a..573f749 100644 --- a/roles/service-dns/defaults/main.yaml +++ b/roles/service-dns/defaults/main.yaml @@ -1,4 +1,8 @@ service_dns_default_values: + image: + registry: registry.0xace.cc + repository: ghp/external-dns + tag: v0.7.6-663-gf76382a5 fullnameOverride: "{{ service_dns_name | default(namespace + '-service-dns') }}" domainFilters: ["{{ service_domain | default(domain) }}"] sources: ['service'] diff --git a/roles/service-dns/tasks/main.yaml b/roles/service-dns/tasks/main.yaml index 15b5836..498cbb3 100644 --- a/roles/service-dns/tasks/main.yaml +++ b/roles/service-dns/tasks/main.yaml @@ -6,7 +6,7 @@ create_namespace: true release_namespace: "{{ service_dns_namespace | default(dns_namespace) | default(namespace) }}" release_name: "{{ service_dns_name | default(namespace + '-service-dns') }}" - chart_ref: "{{ service_dns_chart | default('bitnami/external-dns') }}" + chart_ref: "{{ service_dns_chart | default('ghp/external-dns') }}" chart_version: "{{ service_dns_version | default(omit) }}" release_values: "{{ service_dns_combined_values | from_yaml }}" wait: true