Skip to content
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

🐛 cmd/Sync: remove serviceaccounts from default resource list #2150

Merged

Conversation

jmprusi
Copy link
Member

@jmprusi jmprusi commented Oct 7, 2022

Summary

Serviceaccounts are currently synced by default, but this shouldn't be the case as it will cause issue overriding downstream SAs.

Fixes #2146

@sttts
Copy link
Member

sttts commented Oct 7, 2022

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 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 Oct 7, 2022
@openshift-merge-robot openshift-merge-robot merged commit baee854 into kcp-dev:main Oct 7, 2022
@jmprusi
Copy link
Member Author

jmprusi commented Oct 7, 2022

/cherrypick release-0.9

@openshift-cherrypick-robot

@jmprusi: new pull request created: #2151

In response to this:

/cherrypick release-0.9
/cherrypick release-0.8

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.

@jmprusi
Copy link
Member Author

jmprusi commented Oct 7, 2022

/cherrypick release-0.8

@openshift-cherrypick-robot

@jmprusi: #2150 failed to apply on top of branch "release-0.8":

Applying: cmd/Sync: remove serviceaccounts from default resource list
Using index info to reconstruct a base tree...
M	pkg/cliplugins/workload/plugin/sync.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/cliplugins/workload/plugin/sync.go
CONFLICT (content): Merge conflict in pkg/cliplugins/workload/plugin/sync.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 cmd/Sync: remove serviceaccounts from default resource list
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-0.8

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.

@stevekuznetsov
Copy link
Contributor

@jmprusi can we please remember to link to the issues we're fixing with

Fixes #2146

@ncdc
Copy link
Member

ncdc commented Oct 7, 2022

FYI the Fixes text must be in the PR description. It will not be inspected in comments.

@ncdc
Copy link
Member

ncdc commented Oct 7, 2022

No need to pick back to 0.8. We do not maintain multiple previous versions - only the most recent.

@kasturinarra
Copy link
Contributor

@kasturinarra can you please help verify this ?

@kasturinarra
Copy link
Contributor

/label qe-approved

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 19, 2022

@kasturinarra: The label(s) qe-approved cannot be applied, because the repository doesn't have them.

In response to this:

/label qe-approved

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.

@kasturinarra
Copy link
Contributor

kasturinarra commented Oct 19, 2022

Detailed steps followed to verify the bug:

  1. Login to kcp env
  2. Go to home workspace using command 'kubectl kcp ws'
  3. create a worksapce using the command 'kubectl ws create qetest1'
  4. Now run the command 'kubectl kcp workload sync qecluster1 --syncer-image ghcr.io/kcp-dev/kcp/syncer:v0.9.1 -o - | KUBECONFIG=/home/knarra/Downloads/kubeconfig kubectl apply -f -' to add synctarget .
  5. Now check the secret and sa in the default namespace by running the commands below
    kubectl get sa -n default
    kubectl get secret -n default
  6. Verify that the default-token-* is synced to the compute cluster kcp-* namespace in compute cluster with a name called kcp-default-token-*
  7. Verify that the sa is not synced to the compute cluster kcp-* namespace in compute cluster and what ever default sa seen their is a different one. Plan is to not sync any sa downstream and dev has plans to remove these default ones as well.

However i do see that the syncer.yaml has --resources in the args as well as the syncer pod. will file a separate bug for this issue.

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.

bug: 'default' ServiceAccount has an invalid secret name on the compute synced namespace
7 participants