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

Move crds to crds dir for helm3 and installCRDs flag for supporting helm3 #289

Merged
merged 3 commits into from
Jun 22, 2021

Conversation

Evalle
Copy link
Contributor

@Evalle Evalle commented Aug 14, 2020

PR Summary

Special notes for the reviewer:
@aramase have moved crds to crds dir in charts/secrets-store-csi-driver should I do the same ing manifest-staging ?

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

Welcome @Evalle!

It looks like this is your first PR to kubernetes-sigs/secrets-store-csi-driver 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/secrets-store-csi-driver has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @Evalle. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 14, 2020
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 14, 2020
@aramase
Copy link
Member

aramase commented Aug 14, 2020

@Evalle Thank you for the PR. All the changes are to be made in manifest_staging/charts/secrets-store-csi-driver only. That contains the latest charts and yamls that will be moved to charts at the time of release so we can ensure all chart and yaml changes are tagged with a release. So could you update the PR to make the changes in manifest_changing instead?

Also, as I mentioned in the issue, we would need to add template/crds.yaml to make the charts work with helm2 as well. That blob would need to be under a conditional installCRDs, which users can set true for helm2 crd install. helm2 isn't aware of crds dir, so it would skip crd installation otherwise. Please feel free to ping on the issue or on slack if you have any questions.

@Evalle
Copy link
Contributor Author

Evalle commented Aug 15, 2020

@aramase thanks for the feedback. I've addressed your comment, could you please re-review? Thanks!

{{ $.Files.Get $path }}
---
{{- end }}
{{- end }}
Copy link
Member

Choose a reason for hiding this comment

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

nit: new line

Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

@Evalle Could you also add installCRDs to values file and set it to false by default. This flag needs to be added to the configuration table and a note in the readme on --set installCRDs=true if using helm2 to install the chart.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 18, 2020
@Evalle
Copy link
Contributor Author

Evalle commented Aug 18, 2020

@aramase everything is done except for

and a note in the readme on --set installCRDs=true if using helm2 to install the chart.

In which README.mdI should add it? There are three of them, two of which has a prerequisite Helm 3.0

Thanks

@Evalle Evalle requested a review from aramase August 18, 2020 13:26
@aramase aramase added this to the v0.0.14 milestone Aug 19, 2020
@aramase
Copy link
Member

aramase commented Aug 19, 2020

In which README.mdI should add it? There are three of them, two of which has a prerequisite Helm 3.0

@Evalle It would be in manifest_staging/charts/secrets-store-csi-driver/README.md. We need instructions for helm2 and how installCRDs=true needs to be set only for helm2.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 19, 2020
@Evalle
Copy link
Contributor Author

Evalle commented Aug 20, 2020

@aramase I've addressed all your comments, could you please re-review? Thx!

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 20, 2020
@ritazh
Copy link
Member

ritazh commented Aug 26, 2020

@Evalle can you pls also update https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/master/Makefile#L162 to cp the files to the new crds folder instead?

@ritazh
Copy link
Member

ritazh commented Aug 26, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 26, 2020
Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

@Evalle Are you interested in picking up this PR again? We're planning to include the move to helm3 in the next release v0.1.0. The helm charts will only be supported with helm3, so we no longer need the installCRDs flag and crds.yaml in the templates folder.

Essentially the required changes are:

  1. Move the 2 CRDs to crds directory
  2. Update the apiVersion from v1 to v2 in here.

Let us know if you would like to rebase and update this PR.

@aramase aramase modified the milestones: Stable, v0.1.0 Jun 14, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2021
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 18, 2021
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 18, 2021
@Evalle
Copy link
Contributor Author

Evalle commented Jun 18, 2021

Progress:

  • remove installCRDs flag
  • remove crds.yaml in the templates folder.
  • Move the 2 CRDs to crds directory - @aramase should I create the crds folder in the root? CRDs are in secrets-store-csi-driver/manifest_staging/charts/secrets-store-csi-driver/crds/ now
  • Update the apiVersion from v1 to v2

p.s. I'm going to rebase my commits after I'm done.

@aramase
Copy link
Member

aramase commented Jun 18, 2021

Move the 2 CRDs to crds directory - @aramase should I create the crds folder in the root? CRDs are in secrets-store-csi-driver/manifest_staging/charts/secrets-store-csi-driver/crds/ now

Looks like you've the crds directory setup correctly in the root.

@aramase
Copy link
Member

aramase commented Jun 18, 2021

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jun 18, 2021
Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

/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 18, 2021
@aramase
Copy link
Member

aramase commented Jun 18, 2021

/cc @tam7t

@k8s-ci-robot k8s-ci-robot requested a review from tam7t June 18, 2021 16:35
@tam7t
Copy link
Contributor

tam7t commented Jun 22, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Evalle, tam7t

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2021
@aramase
Copy link
Member

aramase commented Jun 22, 2021

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit 3cc6992 into kubernetes-sigs:master Jun 22, 2021
@ritazh
Copy link
Member

ritazh commented Jun 23, 2021

Thank you for completing this PR!

Has there been more discussion/thoughts around this concern? Perhaps a pre-upgrade hook? IMO, we should figure this out before cutting v0.1.0.

Helm will install the crds in the crds/ directory if the crds are not already installed. If the crds are installed, it will not validate that the version installed matches the served/stored versions specified in the manifests. On upgrade it doesn't touch the crds/ directory at all.

@aramase aramase changed the title Move crds to crds dir for helm3 and installCRDs flag for supporting h… Move crds to crds dir for helm3 and installCRDs flag for supporting helm3 Jul 22, 2021
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
Roadmap
To do
Development

Successfully merging this pull request may close these issues.

Move crds to crds dir for helm3
6 participants