From 1dc21471d92ac38b7c39f14f3b997c9c7bd762cf Mon Sep 17 00:00:00 2001 From: Andre Baptista Aguas Date: Tue, 1 Oct 2024 20:07:56 +0200 Subject: [PATCH] use upstream coredns chart instead of fork Signed-off-by: Andre Baptista Aguas --- Makefile | 2 -- chart/k8gb/Chart.lock | 8 ++--- chart/k8gb/Chart.yaml | 4 +-- chart/k8gb/README.md | 3 -- chart/k8gb/templates/coredns-cm.yaml | 30 ----------------- chart/k8gb/values.schema.json | 23 ------------- chart/k8gb/values.yaml | 33 ++++++++++++------- deploy/test/coredns-tcp-svc.yaml | 15 --------- .../examples/azure/k8gb/aks1-helm-values.yaml | 2 -- .../examples/azure/k8gb/aks2-helm-values.yaml | 2 -- .../windowsdns/k8gb/aks1-helm-values.yaml | 4 +-- .../windowsdns/k8gb/aks2-helm-values.yaml | 4 +-- 12 files changed, 30 insertions(+), 100 deletions(-) delete mode 100644 chart/k8gb/templates/coredns-cm.yaml delete mode 100644 deploy/test/coredns-tcp-svc.yaml diff --git a/Makefile b/Makefile index 3d062f4126..d3fbfc8512 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,6 @@ deploy-test-version: ## Upgrade k8gb to the test version on existing clusters @for c in $(CLUSTER_IDS); do \ $(MAKE) deploy-local-cluster CLUSTER_ID=$$c VERSION=$(SEMVER)-$(ARCH) CHART='./chart/k8gb' ;\ - kubectl apply -n k8gb -f ./deploy/test/coredns-tcp-svc.yaml ;\ done .PHONY: list-running-pods @@ -254,7 +253,6 @@ deploy-k8gb-with-helm: helm -n k8gb upgrade -i k8gb $(CHART) -f $(VALUES_YAML) \ --set $(call get-helm-args,$(CLUSTER_ID)) \ --set k8gb.reconcileRequeueSeconds=10 \ - --set k8gb.dnsZoneNegTTL=10 \ --set k8gb.imageTag=${VERSION:"stable"=""} \ --set k8gb.log.format=$(LOG_FORMAT) \ --set k8gb.log.level=$(LOG_LEVEL) \ diff --git a/chart/k8gb/Chart.lock b/chart/k8gb/Chart.lock index 01fab4ed9c..7b07ba2b66 100644 --- a/chart/k8gb/Chart.lock +++ b/chart/k8gb/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: coredns - repository: https://k8gb-io.github.io/coredns-helm - version: 1.15.3 -digest: sha256:6e8906f6d2e0772826658468a0ff436fe0b1f6b7e2daeb4a03b27edfedcba41c -generated: "2024-09-06T11:25:39.309536+02:00" + repository: https://coredns.github.io/helm + version: 1.34.0 +digest: sha256:4a8560d95d3584c274cc64034394da8b2b57f5372694186a9d0a5488a728a0ff +generated: "2024-10-01T20:03:17.515057+02:00" diff --git a/chart/k8gb/Chart.yaml b/chart/k8gb/Chart.yaml index a4465fcc9a..6615da7726 100644 --- a/chart/k8gb/Chart.yaml +++ b/chart/k8gb/Chart.yaml @@ -9,8 +9,8 @@ kubeVersion: ">= 1.19.0-0" dependencies: - name: coredns - repository: https://k8gb-io.github.io/coredns-helm - version: 1.15.3 + repository: https://coredns.github.io/helm + version: 1.34.0 home: https://www.k8gb.io/ sources: diff --git a/chart/k8gb/README.md b/chart/k8gb/README.md index 70e702634e..ff480402d7 100644 --- a/chart/k8gb/README.md +++ b/chart/k8gb/README.md @@ -89,12 +89,9 @@ For Kubernetes `< 1.19` use this chart and k8gb in version `0.8.8` or lower. | infoblox.wapiVersion | string | `"2.3.1"` | WAPI version | | istio.enabled | bool | `true` | install istio RBAC | | k8gb.clusterGeoTag | string | `"eu"` | used for places where we need to distinguish between different Gslb instances | -| k8gb.coredns.extraServerBlocks | string | `""` | Extra CoreDNS server blocks | -| k8gb.coredns.extra_plugins | list | `[]` | Extra CoreDNS plugins to be enabled | | k8gb.deployCrds | bool | `true` | whether it should also deploy the gslb and dnsendpoints CRDs | | k8gb.deployRbac | bool | `true` | whether it should also deploy the service account, cluster role and cluster role binding | | k8gb.dnsZone | string | `"cloud.example.com"` | dnsZone controlled by gslb | -| k8gb.dnsZoneNegTTL | int | `300` | Negative TTL for SOA record | | k8gb.edgeDNSServers | list | `["1.1.1.1"]` | host/ip[:port] format is supported here where port defaults to 53 | | k8gb.edgeDNSServers[0] | string | `"1.1.1.1"` | use this DNS server as a main resolver to enable cross k8gb DNS based communication | | k8gb.edgeDNSZone | string | `"example.com"` | main zone which would contain gslb zone to delegate | diff --git a/chart/k8gb/templates/coredns-cm.yaml b/chart/k8gb/templates/coredns-cm.yaml deleted file mode 100644 index b1ffcc6caa..0000000000 --- a/chart/k8gb/templates/coredns-cm.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.coredns.deployment.enabled }} -kind: ConfigMap -metadata: - labels: -{{ include "chart.labels" . | indent 4 }} - name: {{ .Release.Name }}-coredns -apiVersion: v1 -data: - Corefile: |- - {{ .Values.k8gb.dnsZone }}:5353 { - errors - health -{{- if .Values.k8gb.coredns.extra_plugins }} -{{- range .Values.k8gb.coredns.extra_plugins }} - {{ . }} -{{- end }} -{{- end }} - ready - prometheus 0.0.0.0:9153 - forward . /etc/resolv.conf - k8s_crd { - filter k8gb.absa.oss/dnstype=local - negttl {{ .Values.k8gb.dnsZoneNegTTL }} - loadbalance weight - } - } - {{- with .Values.k8gb.coredns.extraServerBlocks -}} - {{- tpl . $ | nindent 4 }} - {{- end }} -{{- end }} diff --git a/chart/k8gb/values.schema.json b/chart/k8gb/values.schema.json index 8eec0b7954..9ad7d263cd 100644 --- a/chart/k8gb/values.schema.json +++ b/chart/k8gb/values.schema.json @@ -270,10 +270,6 @@ "format": "idn-hostname", "minLength": 1 }, - "dnsZoneNegTTL": { - "type": "integer", - "minimum": 0 - }, "edgeDNSZone": { "format": "idn-hostname", "minLength": 1 @@ -300,9 +296,6 @@ "log": { "$ref": "#/definitions/k8gbLog" }, - "coredns": { - "$ref": "#/definitions/k8gbCoreDNS" - }, "splitBrainCheck": { "type": "boolean" }, @@ -360,22 +353,6 @@ }, "title": "Log" }, - "k8gbCoreDNS": { - "type": "object", - "additionalProperties": false, - "properties": { - "extra_plugins": { - "type": [ - "array", - "null" - ] - }, - "extraServerBlocks": { - "type": "string" - } - }, - "title": "k8gbCoredns" - }, "k8gbSecurityContext": { "type": "object", "additionalProperties": false, diff --git a/chart/k8gb/values.yaml b/chart/k8gb/values.yaml index 2cff9ad713..1a6403e938 100644 --- a/chart/k8gb/values.yaml +++ b/chart/k8gb/values.yaml @@ -14,9 +14,7 @@ k8gb: # -- whether it should also deploy the service account, cluster role and cluster role binding deployRbac: true # -- dnsZone controlled by gslb - dnsZone: "cloud.example.com" - # -- Negative TTL for SOA record - dnsZoneNegTTL: 300 + dnsZone: &dnsZone "cloud.example.com" # -- main zone which would contain gslb zone to delegate edgeDNSZone: "example.com" # main zone which would contain gslb zone to delegate # -- host/ip[:port] format is supported here where port defaults to 53 @@ -29,11 +27,6 @@ k8gb: extGslbClustersGeoTags: "us" # -- Reconcile time in seconds reconcileRequeueSeconds: 30 - coredns: - # -- Extra CoreDNS server blocks - extraServerBlocks: "" - # -- Extra CoreDNS plugins to be enabled - extra_plugins: [] log: # -- log format (simple,json) format: simple # log format (simple,json) @@ -86,9 +79,6 @@ externaldns: coredns: # -- service: refer to https://www.k8gb.io/docs/service_upgrade.html for upgrading CoreDNS service steps isClusterService: false - deployment: - # -- Skip CoreDNS creation and uses the one shipped by k8gb instead - skipConfig: true image: # -- CoreDNS CRD plugin image repository: absaoss/k8s_crd @@ -98,6 +88,27 @@ coredns: serviceAccount: create: true name: coredns + securityContext: + capabilities: + add: [] + servers: + - zones: + - zone: *dnsZone + port: 5353 + servicePort: 53 + plugins: + - name: errors + - name: health + - name: ready + - name: prometheus + parameters: 0.0.0.0:9153 + - name: forward + parameters: . /etc/resolv.conf + - name: k8s_crd + configBlock: |- + filter k8gb.absa.oss/dnstype=local + negttl 300 + loadbalance weight infoblox: # -- infoblox provider enabled diff --git a/deploy/test/coredns-tcp-svc.yaml b/deploy/test/coredns-tcp-svc.yaml deleted file mode 100644 index 1511b7ebf0..0000000000 --- a/deploy/test/coredns-tcp-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: k8gb-coredns-tcp -spec: - type: NodePort - selector: - app.kubernetes.io/instance: k8gb - app.kubernetes.io/name: coredns - ports: - - name: tcp-5353 - port: 53 - protocol: TCP - targetPort: 5353 - nodePort: 30053 diff --git a/docs/examples/azure/k8gb/aks1-helm-values.yaml b/docs/examples/azure/k8gb/aks1-helm-values.yaml index 852a2e1d0f..2cc4da2904 100644 --- a/docs/examples/azure/k8gb/aks1-helm-values.yaml +++ b/docs/examples/azure/k8gb/aks1-helm-values.yaml @@ -1,8 +1,6 @@ k8gb: # -- dnsZone controlled by gslb dnsZone: "demo.k8gb-kubeconeu2023.com" - # -- Negative TTL for SOA record - dnsZoneNegTTL: 300 # -- main zone which would contain gslb zone to delegate edgeDNSZone: "k8gb-kubeconeu2023.com" # main zone which would contain gslb zone to delegate # -- host/ip[:port] format is supported here where port defaults to 53 diff --git a/docs/examples/azure/k8gb/aks2-helm-values.yaml b/docs/examples/azure/k8gb/aks2-helm-values.yaml index 8caba904f6..5559921795 100644 --- a/docs/examples/azure/k8gb/aks2-helm-values.yaml +++ b/docs/examples/azure/k8gb/aks2-helm-values.yaml @@ -1,8 +1,6 @@ k8gb: # -- dnsZone controlled by gslb dnsZone: "demo.k8gb-kubeconeu2023.com" - # -- Negative TTL for SOA record - dnsZoneNegTTL: 300 # -- main zone which would contain gslb zone to delegate edgeDNSZone: "k8gb-kubeconeu2023.com" # main zone which would contain gslb zone to delegate # -- host/ip[:port] format is supported here where port defaults to 53 diff --git a/docs/examples/windowsdns/k8gb/aks1-helm-values.yaml b/docs/examples/windowsdns/k8gb/aks1-helm-values.yaml index 898c2052ae..b72fe55d0c 100644 --- a/docs/examples/windowsdns/k8gb/aks1-helm-values.yaml +++ b/docs/examples/windowsdns/k8gb/aks1-helm-values.yaml @@ -4,8 +4,6 @@ k8gb: deployRbac: true # -- dns zone that will be managed by CoreDNS dnsZone: "global.k8gb.local" - # -- Negative TTL for SOA record - dnsZoneNegTTL: 300 # -- main zone which would contain gslb zone to delegate edgeDNSZone: "k8gb.local" # -- host/ip[:port] format is supported here where port defaults to 53 @@ -80,4 +78,4 @@ rfc2136: gssTsigCreds: - kerberos-username: k8gb - kerberos-password: asdfkuj#f8guh1 - - kerberos-realm: k8gb.local \ No newline at end of file + - kerberos-realm: k8gb.local diff --git a/docs/examples/windowsdns/k8gb/aks2-helm-values.yaml b/docs/examples/windowsdns/k8gb/aks2-helm-values.yaml index 1f8a1176c4..ae19221993 100644 --- a/docs/examples/windowsdns/k8gb/aks2-helm-values.yaml +++ b/docs/examples/windowsdns/k8gb/aks2-helm-values.yaml @@ -4,8 +4,6 @@ k8gb: deployRbac: true # -- dns zone that will be managed by CoreDNS dnsZone: "global.k8gb.local" - # -- Negative TTL for SOA record - dnsZoneNegTTL: 300 # -- main zone which would contain gslb zone to delegate edgeDNSZone: "k8gb.local" # -- host/ip[:port] format is supported here where port defaults to 53 @@ -80,4 +78,4 @@ rfc2136: gssTsigCreds: - kerberos-username: k8gb - kerberos-password: asdfkuj#f8guh1 - - kerberos-realm: K8GB.LOCAL \ No newline at end of file + - kerberos-realm: K8GB.LOCAL