-
Notifications
You must be signed in to change notification settings - Fork 567
OCPBUGS-97830: Add wait-for-etcd init container to oauth-apiserver #8940
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,9 @@ func adaptDeployment(cpContext component.WorkloadContext, deployment *appsv1.Dep | |
| if err != nil { | ||
| return err | ||
| } | ||
| podspec.RemoveInitContainer("wait-for-etcd", &deployment.Spec.Template.Spec) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The placement works, but KAS keeps init container removal in its own self-documenting block with an explanatory comment ( Consider: // With managed etcd, we should wait for the known etcd client service name to
// at least resolve before starting up to avoid futile connection attempts and
// pod crashing. For unmanaged, make no assumptions.
if cpContext.HCP.Spec.Etcd.ManagementType == hyperv1.Unmanaged {
podspec.RemoveInitContainer("wait-for-etcd", &deployment.Spec.Template.Spec)
}Nit, not blocking — just consistency with KAS. |
||
| } | ||
|
|
||
| noProxy := []string{ | ||
| manifests.KubeAPIServerService("").Name, | ||
| etcdHostname, | ||
|
|
||
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.
Is the goal to check for DNS resolution or actual connectivity to the endpoint?
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.
DNS resolution, not connectivity. The failure mode is that oauth-apiserver tries to connect to
etcd-clientbefore the Service has a backing Endpoints object (DNS returns NXDOMAIN), then exits with "context deadline exceeded" after 20s. Once DNS resolves, kube-proxy rules handle L4 connectivity. This mirrors the existing kube-apiserverwait-for-etcdinit container which uses the samenslookupcheck.Also merged the duplicate
Unmanagedcondition checks indeployment.goper a coderabbit nit.AI-assisted response via Claude Code