-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Delete the federation namespace from fcp instead of individual objects #51768
Delete the federation namespace from fcp instead of individual objects #51768
Conversation
# performing a cascading deletion of all the resources in the | ||
# namespace. So we sleep a little longer than other resources | ||
# before retrying | ||
sleep 5 |
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.
Can we rather wait with a polled query on the ns; and bigger timeout which fails, if it could not delete the ns in that time.
Also I am curious as to why this was not done earlier. (probably some specific reason @madhusudancs )
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.
Can we rather wait with a polled query on the ns; and bigger timeout which fails, if it could not delete the ns in that time.
@irfanurrehman What Shashi has now is actually the preferred method in kubernetes.
Also I am curious as to why this was not done earlier. (probably some specific reason @madhusudancs )
It's mostly for historic reasons. We wanted to be super careful about what we were deleting in the federation-cluster
(now federation-system
) namespace in the pre-kubefed days. It just carried over to kubefed days.
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.
@madhusudan thanks for the clarifications. Seems ok to me.
/assign @madhusudancs |
sleep 2 | ||
kube::log::status "Removing namespace \"${FEDERATION_NAMESPACE}\" from \"${FEDERATION_KUBE_CONTEXT}\"" | ||
# Try deleting until the namespace is completely gone. | ||
while $host_kubectl --context="${FEDERATION_KUBE_CONTEXT}" delete namespace "${FEDERATION_NAMESPACE}" >/dev/null 2>&1; do |
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.
Do we really need to do this separately at all. Shouldn't the for loop below in line 91 take care of this?
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.
@madhusudancs, the for loop below does not include the federation control plane
context and only iterates over federated clusters. may be some resource are leftover, if we just delete the federation api-server and controllermanager pods, but do not delete the objects in the fcp.
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 see Ok, fair enough.
# performing a cascading deletion of all the resources in the | ||
# namespace. So we sleep a little longer than other resources | ||
# before retrying | ||
sleep 5 |
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.
Can we rather wait with a polled query on the ns; and bigger timeout which fails, if it could not delete the ns in that time.
@irfanurrehman What Shashi has now is actually the preferred method in kubernetes.
Also I am curious as to why this was not done earlier. (probably some specific reason @madhusudancs )
It's mostly for historic reasons. We wanted to be super careful about what we were deleting in the federation-cluster
(now federation-system
) namespace in the pre-kubefed days. It just carried over to kubefed days.
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.
/lgtm
/approve
sleep 2 | ||
kube::log::status "Removing namespace \"${FEDERATION_NAMESPACE}\" from \"${FEDERATION_KUBE_CONTEXT}\"" | ||
# Try deleting until the namespace is completely gone. | ||
while $host_kubectl --context="${FEDERATION_KUBE_CONTEXT}" delete namespace "${FEDERATION_NAMESPACE}" >/dev/null 2>&1; do |
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 see Ok, fair enough.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: madhusudancs, shashidharatd Associated issue: 50543 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@shashidharatd can you also please cherry pick this to 1.8? |
/retest Review the full test history for this PR. |
3 similar comments
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
@kubernetes/release-reviewers this is a bug fix. Is there anything else we need to do get this merged? cc @csbell |
/test pull-kubernetes-unit |
/retest Review the full test history for this PR. |
2 similar comments
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
@shashidharatd: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Automatic merge from submit-queue |
Cherrypick in #53372 |
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it:
This PR simplifies cleanup by deleting the entire namespace instead of individual objects.
This PR is linked to #50543. This may not solve the issue but instead to try an alternative.
Release note:
/assign @madhusudancs