Skip to content

e2e/clusterworkspacedeletion: use correct root shard system:master client for deletion checks #1570

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

sttts
Copy link
Member

@sttts sttts commented Jul 20, 2022

The deletion checks have to skip authorization because authz would lead to 403 on deleted workspaces, i.e. you cannot look into the logical cluster then. Hence, we need a system:master client. We have that wired for the root shard.

@openshift-ci openshift-ci bot requested review from davidfestal and ncdc July 20, 2022 06:08
@sttts
Copy link
Member Author

sttts commented Jul 20, 2022

/retest

@sttts
Copy link
Member Author

sttts commented Jul 20, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sttts

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2022
@ncdc
Copy link
Member

ncdc commented Jul 20, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2022
@@ -208,7 +208,7 @@ func TestWatchCacheEnabledForBuiltinTypes(t *testing.T) {
}
}

totalCacheHits, secretsCacheHit := collectCacheHitsFor(ctx, t, server.RootShardConfig(t), "/core/secrets")
totalCacheHits, secretsCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "/core/secrets")
Copy link
Contributor

Choose a reason for hiding this comment

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

mhm, wondering why the kcp-admin doesn't work here

Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't kcp-admin have access to the /metrics endpoint?

Copy link
Member Author

@sttts sttts Jul 20, 2022

Choose a reason for hiding this comment

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

kcp-admin against the root shard will work. Note: my change here is just a rename, not a change in behaviour of RootShardConfig/RootShardSystemMasterBaseConfig. I.e. am just pointing out that this is a system:master user (was also before the rename).

@sttts sttts force-pushed the sttts-e2e-clusterworkspacedeletion-root-clients branch from 7956913 to 12078ca Compare July 20, 2022 20:57
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2022

New changes are detected. LGTM label has been removed.

@sttts
Copy link
Member Author

sttts commented Jul 20, 2022

Pure rebase.

@sttts sttts added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2022
@stevekuznetsov
Copy link
Contributor

/lgtm
/retest

@openshift-merge-robot openshift-merge-robot merged commit d3717d2 into kcp-dev:main Jul 21, 2022
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants