Skip to content
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

kubeadm: remove ClusterConfiguration.DNS.Type from v1beta3 #101547

Merged
merged 1 commit into from
May 15, 2021

Conversation

neolit123
Copy link
Member

What this PR does / why we need it:

Kubeadm no longer supports kube-dns and CoreDNS is the only
supported DNS server. Remove ClusterConfiguration.DNS.Type
from v1beta3 that is used to set the DNS server type.

Which issue(s) this PR fixes:

Fixes kubernetes/kubeadm#2398
xref kubernetes/kubeadm#1796

Special notes for your reviewer:

Does this PR introduce a user-facing change?

kubeadm: remove the field ClusterConfiguration.DNS.Type in v1beta3 since CoreDNS is the only supported DNS type.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 28, 2021
@neolit123
Copy link
Member Author

/kind deprecation cleanup
/priority important-soon
/triage accepted
/cc @fabriziopandini @SataQiu @pacoxu

@k8s-ci-robot k8s-ci-robot added kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 28, 2021
@neolit123
Copy link
Member Author

/hold
for review

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 28, 2021
@neolit123 neolit123 mentioned this pull request Apr 28, 2021
16 tasks
@pacoxu
Copy link
Member

pacoxu commented Apr 28, 2021

/retest

Copy link
Member

@pacoxu pacoxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123, pacoxu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pacoxu
Copy link
Member

pacoxu commented Apr 28, 2021

As node-local-dns is GAed since 1.18, is there a plan to add node-local-dns to ClusterConfiguration.DNS.Cache=true in kubeadm?

@neolit123
Copy link
Member Author

neolit123 commented Apr 28, 2021

@pacoxu

As node-local-dns is GAed since 1.18, is there a plan to add node-local-dns to ClusterConfiguration.DNS.Cache=true in kubeadm?

we had a few discussions about this in the past.
kubernetes/kubeadm#1220

as an addon, my main argument against it is that its not something that is exactly required for a cluster to work.
kubeadm tries to be minimal and only apply essentials and security defaults. the node local cache would be something that is like a "nice to have", but not essential, and today users can apply it on demand.

we also want to move CoreDNS and similar addons outside of kubeadm to operators or a different form of addon plugins.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2021
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 10, 2021
Kubeadm no longer supports kube-dns and CoreDNS is the only
supported DNS server. Remove ClusterConfiguration.DNS.Type
from v1beta3 that is used to set the DNS server type.
@neolit123
Copy link
Member Author

neolit123 commented May 10, 2021

@fabriziopandini i have updated the PR. looking for LGTM.

getting this right is difficult and other fuzzer magic did not help.

the scenario around DNS.Type unravels some limitations in the fuzzers + stock API machinery:

  • field exists in the old public API
  • field is removed in the latest public API
  • field must exists in the internal type, since validation is performed on internal types only and until the old public API is removed.

i argue that this model is flawed and it forces API maintainers to have their latest public API converters and internal APIs know about outdated fields (see cmd/kubeadm/app/apis/kubeadm/v1beta3/conversion.go).

if you are wondering, during fuzzing the Schema converters do execute the defaulting for v1beta2, which means DNS.Type receives CoreDNS if the value is "".

@fabriziopandini
Copy link
Member

/lgtm

We can eventually iterate on the fuzzer/internal types on separated PRs given that this isn't user facing.
IMO, what is really important in the long term, is that we find a way to untangle defaulting & the fuzzing logic

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2021
@neolit123
Copy link
Member Author

/hold cancel
/test pull-kubernetes-node-e2e-containerd

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 14, 2021
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

3 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 3f43b1e into kubernetes:master May 15, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove ClusterConfiguration.DNS.Type
5 participants