-
Notifications
You must be signed in to change notification settings - Fork 0
feat(coredns): migrate docker-provider CoreDNS from Deployment to HelmRelease #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
114 changes: 0 additions & 114 deletions
114
k8s/providers/docker/infrastructure/controllers/coredns/deployment.yaml
This file was deleted.
Oops, something went wrong.
109 changes: 109 additions & 0 deletions
109
k8s/providers/docker/infrastructure/controllers/coredns/helm-release.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # TODO(#14): CoreDNS Deployment -> HelmRelease. Docker-provider only — Talos's own | ||
| # CoreDNS is disabled via talos-local/cluster/disable-coredns.yaml (cluster.coreDNS.disabled: | ||
| # true) so this chart owns the whole stack (ServiceAccount + RBAC + Deployment + Service + | ||
| # ConfigMap + PDB). `coreDNS.disabled` skips Talos's CoreDNS bootstrap entirely on a fresh | ||
| # cluster (not just the Deployment) — verified against CodeRabbit's upstream research on | ||
| # #62 — so serviceAccount.create/rbac.create must stay true; the chart owns its own identity | ||
| # rather than assuming a preexisting Talos-created one. The Service is pinned to the kube-dns | ||
| # name + Talos's default kube-dns ClusterIP (10.96.0.10, from the 10.96.0.0/12 service | ||
| # subnet) so it adopts the address kubelet/kube-proxy already expect, instead of Talos's | ||
| # bootstrapped kube-dns Service. The hetzner provider is untouched (stays on Talos-managed | ||
| # CoreDNS + a Corefile patch). | ||
| apiVersion: helm.toolkit.fluxcd.io/v2 | ||
| kind: HelmRelease | ||
| metadata: | ||
| name: coredns | ||
| namespace: kube-system | ||
| labels: | ||
| helm.toolkit.fluxcd.io/helm-test: enabled | ||
| helm.toolkit.fluxcd.io/remediation: enabled | ||
| spec: | ||
| interval: 2m | ||
| timeout: 10m | ||
| install: | ||
| remediation: | ||
| retries: -1 | ||
| upgrade: | ||
| remediation: | ||
| retries: -1 | ||
| remediateLastFailure: true | ||
| chart: | ||
| spec: | ||
| chart: coredns | ||
| version: 1.46.0 | ||
| sourceRef: | ||
| kind: HelmRepository | ||
| name: coredns | ||
| # https://github.com/coredns/helm/blob/master/charts/coredns/values.yaml | ||
| values: | ||
| replicaCount: 2 | ||
| k8sAppLabelOverride: kube-dns | ||
| image: | ||
| repository: registry.k8s.io/coredns/coredns | ||
| tag: v1.14.3 | ||
| serviceAccount: | ||
| create: true | ||
| name: coredns | ||
| rbac: | ||
| create: true | ||
| service: | ||
| name: kube-dns | ||
| clusterIP: 10.96.0.10 | ||
| podDisruptionBudget: | ||
| minAvailable: 1 | ||
| resources: | ||
| limits: | ||
| memory: 170Mi | ||
| requests: | ||
| cpu: 100m | ||
| memory: 70Mi | ||
| priorityClassName: system-cluster-critical | ||
| nodeSelector: | ||
| kubernetes.io/os: linux | ||
| tolerations: | ||
| - key: CriticalAddonsOnly | ||
| operator: Exists | ||
| - effect: NoSchedule | ||
| key: node-role.kubernetes.io/control-plane | ||
| affinity: | ||
| podAntiAffinity: | ||
| preferredDuringSchedulingIgnoredDuringExecution: | ||
| - podAffinityTerm: | ||
| labelSelector: | ||
| matchExpressions: | ||
| - key: k8s-app | ||
| operator: In | ||
| values: | ||
| - kube-dns | ||
| topologyKey: kubernetes.io/hostname | ||
| weight: 100 | ||
| servers: | ||
| - zones: | ||
| - zone: . | ||
| port: 53 | ||
| plugins: | ||
| - name: errors | ||
| - name: health | ||
| configBlock: |- | ||
| lameduck 5s | ||
| - name: ready | ||
| - name: kubernetes | ||
| parameters: cluster.local in-addr.arpa ip6.arpa | ||
| configBlock: |- | ||
| pods insecure | ||
| fallthrough in-addr.arpa ip6.arpa | ||
| ttl 30 | ||
| - name: prometheus | ||
| parameters: :9153 | ||
| - name: forward | ||
| parameters: . /etc/resolv.conf | ||
| configBlock: |- | ||
| max_concurrent 1000 | ||
| - name: cache | ||
| parameters: 30 | ||
| configBlock: |- | ||
| disable success cluster.local | ||
| disable denial cluster.local | ||
| - name: loop | ||
| - name: reload | ||
| - name: loadbalance | ||
7 changes: 7 additions & 0 deletions
7
k8s/providers/docker/infrastructure/controllers/coredns/helm-repository.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: source.toolkit.fluxcd.io/v1 | ||
| kind: HelmRepository | ||
| metadata: | ||
| name: coredns | ||
| namespace: kube-system | ||
| spec: | ||
| url: https://coredns.github.io/helm |
5 changes: 2 additions & 3 deletions
5
k8s/providers/docker/infrastructure/controllers/coredns/kustomization.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../../../../bases/infrastructure/controllers/coredns/ | ||
| - deployment.yaml | ||
| - pod-disruption-budget.yaml | ||
| - helm-release.yaml | ||
| - helm-repository.yaml |
10 changes: 0 additions & 10 deletions
10
k8s/providers/docker/infrastructure/controllers/coredns/pod-disruption-budget.yaml
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| cluster: | ||
| coreDNS: | ||
| disabled: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.