-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat(helm): #471 - Expose rules and aggregateRule in ClusterRole #478
feat(helm): #471 - Expose rules and aggregateRule in ClusterRole #478
Conversation
Hi @grzesuav @AmitKumarDas , I am leaving this as a draft because I am thinking about adding tests for helm charts. I have used https://github.com/helm/chart-testing-action and think this would be a good addition to metacontroller repo. Thoughts? |
Codecov Report
@@ Coverage Diff @@
## master #478 +/- ##
=======================================
Coverage 49.27% 49.27%
=======================================
Files 56 56
Lines 4980 4980
=======================================
Hits 2454 2454
Misses 2275 2275
Partials 251 251
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@mjsmith1028 good idea. I thing what would be good is single "root" package ( |
4cb4c72
to
a242bd8
Compare
.github/workflows/test_release.yaml
Outdated
needs: ['setmatrix'] | ||
strategy: | ||
fail-fast: false | ||
# TODO: ask about skipping CRD versions v1beta because it is not in helm chart |
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.
Hi @grzesuav , I have added the github action helm chart testing for this PR. This will check for changes in the chart. If changes are found, deploy a kind cluster and run helm lint/install. It will test all the value files under the deploy/helm/ci directory. I created a symlink for default_values.yaml to values.yaml to make sure the default values are tested. One thing I noticed, is currently the helm chart only includes the v1 CRD and not the previous v1beta CRD. As a result, I removed the v1beta version for kind clusters from this test.
I am thinking either we deprecate the older version for k8s or update the charts in a manner to support both (outside scope of this ticket). Thoughts?
Please let me know if you have any feedback. I will remove from draft to ready for review once this TODO is addressed.
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.
hi, actually we can always run this test, as always at least metacontroller version in helm will change. Removing v1beta1 is ok, I need to fix other PR and set minimal version to 1.16, but will do it as breaking change
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.
Actually, referencing #485 I think I can conditionally add the CRD depending on the version of K8s. I'm going to give that a shot
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 don't think you are able to template in the crds directory.
As far as I know this is only possible in the templates directory.
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.
@roelvdberg Yep you are correct, I gave it a shot and no luck. Helm docs say the same. I started to look into using subcharts for the different CRD versions but it became unnecessarily complex. I will continue with ignoring k8s versions that do no support v1 in this PR because it does not break the existing setup. Thanks @grzesuav and @roelvdberg for feedback
As I understand, currently the helmtest does linting and tries to install chart on kind cluster, right ? I think it is worth to always run this test, as i.e. metacontroller code can change with some runtime option, and we forget to update the chart. In this case I would like to catch this behaviour |
You are right, this makes sense. I can take off the conditional testing 👍 |
74a0e5b
to
4d02352
Compare
Hi @grzesuav , this PR is ready for review and merge if you are comfortable. 👍 |
@mjsmith1028 can you rebase on latest master ? Cannot automatically merge |
…usterRole Signed-off-by: Mike Smith <10135646+mjsmith1028@users.noreply.github.com>
Signed-off-by: Mike Smith <10135646+mjsmith1028@users.noreply.github.com>
711a7bb
to
9016719
Compare
thanks @grzesuav , I just rebased :) |
🎉 This PR is included in version 2.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
#471 Is requesting to allow value overrides for
ClusterRole
rules. I also have a use case using aggregationRule so I have added them together in this PR.