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

Remove deletion of coredns deployment. #7211

Merged

Conversation

dlouks
Copy link
Contributor

@dlouks dlouks commented Jan 25, 2021

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind bug

What this PR does / why we need it: Deleting the coredns deployment on every run using cluster.yml creates a brief DNS outage. From the testing I've done on new or existing clusters it doesn't seem to matter if the coredns deployment is deleted or this task is skipped, either way the deployment ends up configured the same way. Please let me know if I'm missing something as I can't find the reason this step is required.

Which issue(s) this PR fixes:

Fixes #6387

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

The `coredns` deployment will no longer be deleted on every ansible run using `cluster.yml`

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 25, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @dlouks. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 25, 2021
@champtar
Copy link
Contributor

I think you can delete the whole file

@dlouks
Copy link
Contributor Author

dlouks commented Jan 26, 2021

@champtar, I believe ensuring the kube-dns service doesn't exist is still needed as kubeadm will recreate the service on upgrade if it is able to (i.e. the IP kubeadm is trying to use for the kube-dns service isn't already in use)

@champtar
Copy link
Contributor

Why do we name our service differently ? Is it just legacy ? Can we cleanup that too ? (My opinion is to be as close to kubeadm as possible)

@dlouks
Copy link
Contributor Author

dlouks commented Jan 26, 2021

I completely agree. I dug into the history behind this and couldn't come to a clean answer to why it's different (see #7083). Having it be different results in gross work arounds like what's coming through in this PR - #6244

@LuckySB
Copy link
Contributor

LuckySB commented Jan 26, 2021

kubespray create own coredns deployment in this task

task in PR delete coredns created by kubeadm.
At the moment, the kubeadm does not create a coredns deployment,

kubeadm_init_phases_skip_default: [ "addon/coredns" ]

So, in principle, you can delete this task.
But in my opinion, it would be more correct to add a unique annotation to the deployment that creates by kubespray,
and remove the coredns deployment only if it does not have this unique annotation

@dlouks
Copy link
Contributor Author

dlouks commented Jan 26, 2021

@LuckySB, do you have issue with this annotation? createdby: 'kubespray'.

PR updated with this annotation.

@dlouks dlouks force-pushed the coredns-deploy-deleted-every-run branch from f23d96a to cce9e95 Compare January 26, 2021 18:33
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 26, 2021
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 26, 2021
@LuckySB
Copy link
Contributor

LuckySB commented Jan 27, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 27, 2021
Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlouks, floryut

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2021
@LuckySB
Copy link
Contributor

LuckySB commented Feb 9, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit 0cc1726 into kubernetes-sigs:master Feb 9, 2021
champtar pushed a commit to champtar/kubespray that referenced this pull request Feb 17, 2021
* Add unique annotation on coredns deployment and only remove existing deployment if annotation is missing.

* Ignore errors when gathering coredns deployment details to handle case where it doesn't exist yet

* Remove run_once, deletegate_to and add to when statement

(cherry picked from commit 0cc1726)
k8s-ci-robot pushed a commit that referenced this pull request Feb 22, 2021
* Add unique annotation on coredns deployment and only remove existing deployment if annotation is missing.

* Ignore errors when gathering coredns deployment details to handle case where it doesn't exist yet

* Remove run_once, deletegate_to and add to when statement

(cherry picked from commit 0cc1726)
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Apr 6, 2021
* Add unique annotation on coredns deployment and only remove existing deployment if annotation is missing.

* Ignore errors when gathering coredns deployment details to handle case where it doesn't exist yet

* Remove run_once, deletegate_to and add to when statement
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coredns Deployment Deleted on each kubespray cluster.yml run
5 participants