-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: support helm dryrun=server #6691
feat: support helm dryrun=server #6691
Conversation
5f8dfdd
to
25a0bcd
Compare
@@ -52,6 +52,7 @@ type WatchOptions struct { | |||
SuppressOverrideValues bool | |||
MaxConcurrentReconciles int | |||
Selector metav1.LabelSelector | |||
DryrunOption string |
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.
Nit: CamelCase:
DryrunOption string | |
DryRunOption string |
@@ -66,6 +67,7 @@ func Add(mgr manager.Manager, options WatchOptions) error { | |||
ReconcilePeriod: options.ReconcilePeriod, | |||
OverrideValues: options.OverrideValues, | |||
SuppressOverrideValues: options.SuppressOverrideValues, | |||
DryrunOption: options.DryrunOption, |
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.
Same nit as above
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 think this change looks reasonable. Would you be open to adding some test cases (either unit or e2e) that utilizes this new option to perform an action that would be allowed by this change?
25a0bcd
to
9fd7159
Compare
Fixed the CamelCase and added a simple test case. |
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.
The changes look good to me but looks like there are some CI failures that need to be addressed. I think doing a make generate
and committing the changes should fix the failure
Signed-off-by: Sam Wang (holyspectral) <[email protected]>
9fd7159
to
9783314
Compare
Hi @everettraven I rebased to master branch and I can reproduce the error on my local. As your recommendation, I added these files in my latest commit and it seems to fix the issue. However, I'm not entirely sure about changing
Could you help to double confirm if it's okay? Thanks! |
@holyspectral Looks like that |
According to the DCO check one of the commits is missing a sign-off: https://github.com/operator-framework/operator-sdk/pull/6691/checks?check_run_id=23201517452 |
Signed-off-by: Sam Wang (holyspectral) <[email protected]>
33d64bf
to
ba5ee97
Compare
Thanks. The DCO error has been fixed now. |
Looks like there is still some error due to docs:
These are potentially related to #6664 since testdata/go/v3 is removed. |
Signed-off-by: Sam Wang (holyspectral) <[email protected]>
@everettraven can you help to take a look and rerun the test? Thanks! |
@everettraven It seems that changes from this PR aren't reflected at https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/ as the memcached_controller link is still pointing to v3. Is there any chance to update the docs? |
Description of the change:
This is to fix #5728.
In this PR, new helm option,
--dry-run=server
is introduced, solookup()
can be used with helm operator.This feature is disabled by default to keep backward compatibility. To enable this feature, specify this in watches.yaml
Motivation for the change:
lookup()
in helm is a very useful command. However, it's not supported byhelm xxx --dry-run
andhelm template
before 3.13. This causes issues in some tools, e.g., argocd and helm operator. This could cause repetitive reconcile or frequent certificate changes depending on howlookup()
is used.Starting in Helm 3.13, helm provides a new option dryrun=server (helm/helm#9426), which enabled users to contact API server when running helm. This way,
lookup()
can get result from API server and work as it's intended to be.Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs