-
Notifications
You must be signed in to change notification settings - Fork 462
[baremetal & friends] Move api-int to /etc/hosts #2258
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
Conversation
Instead of relying on coredns to provide the api-int record, which requires our coredns to be deployed as a static pod so it will be available before the node tries to register with the api, we can put the api-int record in /etc/hosts. This way the node can register without coredns running and then coredns can be started at a later point in the deployment. This makes our coredns deployment much more flexible. Since I'm told we should not try to template all of /etc/hosts because other service may be trying to add entries to it as well, this change adds a systemd service and timer to ensure that the correct entry is in /etc/hosts. It will run once per minute and append the api-int line if it doesn't already find one there.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cybertron The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| match api.{{ .DNS.Spec.BaseDomain }} | ||
| fallthrough | ||
| } | ||
| template IN {{`{{ .Cluster.APIVIPRecordType }}`}} {{ .DNS.Spec.BaseDomain }} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall idea LGTM, I have two Qs.
-
I understand that you deleted api-int from CoreDNS to verify that we can break the Kubelet->coredns->Kubelet circular dependency and have a stable deployment without relying on CoreDNS for resolving api-int.
I wonder if it will be safer (for 4.7) to keep also api-int in CoreDns ? in case something went wrong with /etc/hosts . -
IIUC, the service setting api-int in /etc/hosts supposed to run on all on-prem platforms, so this PR changes the api-int resolution also for other on-prem platforms. if that is the case, maybe you should update the PR title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I considered that, but then we have multiple definitions of the api-int record which can get out of sync. If we're going to do this, I think I'd rather just make a clean switch over. I'm open to being convinced otherwise though.
-
Good point. I didn't want to introduce differences between the platforms when this should work on all of them.
Co-authored-by: Miciah Dashiel Butler Masters <mmasters@redhat.com>
|
@mandre @jcpowermac : friends.. PTAL |
|
/assign @patrickdillon cc: @rvanderp3 |
|
/test e2e-openstack |
OK a few things here. First just a note: we can use inotify to watch the file and avoid wakeups. (In Kubernetes this doesn't really matter because there's so much polling going on anyways...but it's exactly the kind of problem that becomes important in e.g. small scale IoT/edge type systems where you just want to run some containers on a single system in a CPU/power efficient way) Second...why does this have to be in shell script at all? Can't it be part of the MCD Go code? If we need this Third, as implemented today if the internal IP changes won't this result in multiple lines ending up in and the MCO code carefully only edits the latter section. |
|
@cybertron: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
After further discussion, we don't think /etc/hosts is a good place for this after all. If we pursue this, #2374 is likely a better option. |
Instead of relying on coredns to provide the api-int record, which
requires our coredns to be deployed as a static pod so it will be
available before the node tries to register with the api, we can
put the api-int record in /etc/hosts. This way the node can register
without coredns running and then coredns can be started at a later
point in the deployment. This makes our coredns deployment much more
flexible.
Since I'm told we should not try to template all of /etc/hosts because
other service may be trying to add entries to it as well, this
change adds a systemd service and timer to ensure that the correct
entry is in /etc/hosts. It will run once per minute and append the
api-int line if it doesn't already find one there.
- What I did
- How to verify it
- Description for the changelog