forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 112
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
OCPBUGS-48177: UPSTREAM: <carry>: disable etcd readiness checks by default #2174
Open
ingvagabund
wants to merge
1
commit into
openshift:master
Choose a base branch
from
ingvagabund:exclude-etcd-readiness-by-default
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+34
−6
Open
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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
instead of this patch shouldn't we exclude the desired check directly from kas-o ? (xref: https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/bindata/assets/kube-apiserver/pod.yaml#L111)
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 have not properly checked though are all KA instances always exposed through service endpoints or a load balancer? Cloud provider LB health check paths are not expected to accept any queries/params like
?exclude=...
(AWS, Azure, GCP at least). Unless I misunderstood both openshit-apiserver and oauth-apiserver rely on k8s.io/apiserver/pkg/server code. I.e. https://github.com/openshift/openshift-apiserver/blob/master/go.mod#L197 and https://github.com/openshift/oauth-apiserver/blob/master/go.mod#L144.Is https://github.com/openshift/kubernetes-apiserver expected to be in sync with https://github.com/openshift/kubernetes?
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 am pretty sure it will work because we already exclude etcd from the liveness probe (xref: https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/bindata/assets/kube-apiserver/pod.yaml#L105)
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.
All right. So this will work for KA instances and https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/bindata/assets/kube-apiserver/svc.yaml. What about o-a and oauth-a? I was told they are added to a LB. Through:
which OpenShift relies on when creating the LBs. It seems to be a pattern to ignore/reject any such exclusion in the LB's health check paths: https://issues.redhat.com/browse/OCPBUGS-48177?focusedId=26397412&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-26397412.
So even though the
?exclude...
could be used for KA instances, it will not work for o-a/oauth-a. Also, disabling the checks in the code directly instead of at every place /readyz is accessed leaves no space for "forgotten" cases.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.
We could also exclude the desired checks directly from the operators, for example:
https://github.com/openshift/cluster-openshift-apiserver-operator/blob/master/bindata/v3.11.0/openshift-apiserver/deploy.yaml#L122
I don't think this is true. The extension API servers are proxied by the KAS.
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.
So you are saying we do not rely on https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/pkg/cloud/services/elb/loadbalancer.go#L212?
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.
We do but I think only for KAS.
We could verify it. Please create a cluster on AWS and then log in to the AWS console and check the setting for the LB.
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.
Me and Lukasz synced over a call to discuss this. Main points:
.spec.publishNotReadyAddresses
so only ready pods are added to a list ofAddresses
(the rest to notReadyAddresses)..Addreses
field so not ready pods are excluded./readyz
probes need to be updated to?exclude=etcd
./readyz
path is accessed directly (not via endpoints)/readyz
needs to be patched within kube-apiserver code as is done in this PR.