-
Notifications
You must be signed in to change notification settings - Fork 247
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: install CRDs from a subchart #1922
base: master
Are you sure you want to change the base?
Changes from all commits
c60d355
e5ed797
cb5d03a
3f3ab44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
apiVersion: v2 | ||
name: crds | ||
version: 0.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# crds | ||
|
||
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also here |
||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| annotations | object | `{}` | Define annotations for CRDs | |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -- Define annotations for CRDs | ||
annotations: | ||
# example: ... |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,8 +150,10 @@ Chart parameters are available. | |
|
||
### General parameters | ||
|
||
| Name | Type | Default | Description | | ||
|-----------------------------------------------------|--------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Name | Type | Default | Description | | ||
| --------------------------------------------------- | ------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `crds.install` | bool | false | Toggle to install and upgrade CRDs from a subchart. Make sure to use it with `--skip-crds` to avoid conflicts. [More info about limitations on CRDs in Helm 3](https://helm.sh/docs/topics/charts/#limitations-on-crds) | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If i'm not mistaken, I think the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right about the flag 👍 The problem happens only when the chart is installed by the first time. In that scenario: (apologies for the oversimplification above) Otherwise, Helm will install CRDs from both places. Again, this only happens the first time. Helm won't care about the CRDs folder during upgrades (nor uninstall) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you keeping an additional copy of the CRD in the /crds directory only for the initial installation of the chart? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My take was make the new approach optional. That is, if you do nothing, then the CRDs get installed as they are now. I wonder if this is a good compromise, or if we should go the sub-chart with CRDs approach in one single shot. WDYT @fmuyassarov Regarding additional copies, all of them are automatically generated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was considering whether we should standardize on using only |
||
| `crds.annotations` | object | {} | Annotations to be added to all CRDs | | ||
| `image.repository` | string | `{{ site.container_image \| split: ":" \| first }}` | NFD image repository | | ||
| `image.tag` | string | `{{ site.release }}` | NFD image tag | | ||
| `image.pullPolicy` | string | `Always` | Image pull policy | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- with .Values.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} |
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.
Probably we want to put a version here not 0.0.0
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.
There's a drawback to use a version here: you need bump the version and
helm dependency update
with every release.The versioning usually makes sense when adding charts from other repos, with different lifecycles.
In our case, CRDs are always generated and copied under
crds
folder: https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/hack/update_codegen.sh#L44-L46There's a 1-1 match in the lifecycle for this chart. Thus, the
version: 0.0.0
makes the trick to avoid extra steps.