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

Add KubernetesCluster tag to provisioned volumes when cluster-id set #932

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Jun 11, 2021

Is this a bug fix or adding new feature?

What is this PR about? / Why do we need it? users (namely kops) may have policies ocnfigured for their KCM such that KCM can only attach/detach/create/delete volumes with this tag. If user enables migration, CSI provisions volume, and then user later disables migration, the tag must bep resent so that KCM can attach/detach/create/delete it. Details:#927 (comment)

What testing is done?
TODO: I'll do a manual test to sanity check the tag actually shows up. we don't have an automatic tagging e2e test , could be useful (i.e. a test that sets extraTags, clusterID, and checks tags are present in AWS API)

  • manual test

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wongma7

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 11, 2021
@wongma7 wongma7 mentioned this pull request Jun 11, 2021
6 tasks
@coveralls
Copy link

coveralls commented Jun 11, 2021

Coverage Status

Coverage increased (+0.008%) to 79.586% when pulling 3c8119f on wongma7:legacytag into 54f1649 on kubernetes-sigs:master.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 11, 2021
@jsafrane
Copy link
Contributor

lgtm. You mention manual tests in TODO and then I see it checked below. Did it succeed?

@wongma7
Copy link
Contributor Author

wongma7 commented Jun 16, 2021

yep, set k8s-tag-cluster-id to my name and KubernetesCluster tag was added

@nckturner
Copy link

Its not clear to me if this affects all kops users, or just a subset. Can we document this somewhere other than code comments so that users know when they need to set --k8s-tag-cluster-id (unless its already clear in existing documentation, I did not look very hard).

@wongma7
Copy link
Contributor Author

wongma7 commented Jun 16, 2021

@nckturner kops needs to set this argument for every CSI installation , or the user has to set it right after installation. IF they don't set it, then volume tags for CSI driver-provisioned volumes won't match tags for in-tree driver-provisioned volumes and if the user has tag-based IAM policies then things will break. only kops/the user knows what the cluster name is. We dont have any migration-related documentation at all, when we do this will need to be part of it

@nckturner
Copy link

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 16, 2021
@nckturner
Copy link

Sounds good, we can add as a part of migration documentation which there is already an issue for: #480

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants