-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[bitnami/flux] Added Lookup Flag when Installing CRDs #28843
Conversation
Signed-off-by: Jackson Levitt <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Signed-off-by: Jackson Levitt <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Any Updates? |
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 @jl-beast,
Thanks for taking the time to create this PR. However, I can't accept this as the next version of the solution will overwrite your changes. There is a GitHub action that updates those crds based on the files in the upstream project. You can learn more about that here.
There are 2 options here:
- Update the "Conditional" line to only include one single if in those crd files
- Check how the upstream project enables that feature
…pdates. Signed-off-by: Jackson Levitt <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
I have reviewed and updated the conditionals. However, given that files may contain multiple different CRDs when downloaded from their remote release sources, this means that lookup must be attuned to selecting a particular one. For this purpose, I selected the first in file. This does however introduce additional risk, in that, if a kubernetes clusters include "Provider", but not "Alert" (for example), then it will attempt to install nonetheless with the setting. My thought, however, is that the cluster's operations with a deleted CRD for flux should already break it for each controller. That is likely a bigger concern for the cluster operator than lookup failing on a 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.
Could you investigate how this is done in the upstream chart and update the templates based on that?
@@ -434,6 +434,8 @@ spec: | |||
subresources: | |||
status: {} | |||
--- | |||
{{- end }} | |||
{{- if or (not .Values.imageReflectorController.lookupCRDs) (not (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" "imagerepositories.image.toolkit.fluxcd.io")) }} |
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.
As I mentioned before, this will be overwritten during the next release
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary. |
Description of the change
Added a flag to the values that allows a check to see if the CRDs already exist when installing the chart.
Benefits
Gives users more control over the install of the CRDs when installing Flux, preventing scenarios wherein you could not install flux because the CRDs already existed.
Possible drawbacks
Added Chart Complexity and Variance.
Applicable issues
Additional information
I locally tested both
helm install
andhelm template
, both with and without--dry-run=server
.I am not particularly certain what to do regarding the:
# Conditional: .Values.____.installCRDs
on the top of each CRD file, given that I added an additional if statement. Let me know if that is relevant.
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm