-
-
Notifications
You must be signed in to change notification settings - Fork 271
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: add dry-run flag for sync and apply #1050
base: main
Are you sure you want to change the base?
Conversation
@yxxhero Thanks for your hard work, it would be better if you add some test cases. |
got it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This would be an useful feature. |
59bb9a8
to
9b2e9b5
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
9b2e9b5
to
44eba38
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
44eba38
to
7f77237
Compare
yep, it's very useful feature |
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.
If you can't finish the unitest of this, I'd do it, because it's creating some big problems not having access to the dry-run.
cmd/apply.go
Outdated
@@ -68,6 +68,7 @@ func NewApplyCmd(globalCfg *config.GlobalImpl) *cobra.Command { | |||
f.StringVar(&applyOptions.PostRenderer, "post-renderer", "", `pass --post-renderer to "helm template" or "helm upgrade --install"`) | |||
f.StringArrayVar(&applyOptions.PostRendererArgs, "post-renderer-args", nil, `pass --post-renderer-args to "helm template" or "helm upgrade --install"`) | |||
f.StringVar(&applyOptions.Cascade, "cascade", "", "pass cascade to helm exec, default: background") | |||
f.StringVar(&applyOptions.DryRyn, "dry-run", "", "pass dry-run to helm exec") |
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.
Isn't this a typo?
cmd/sync.go
Outdated
@@ -47,6 +47,7 @@ func NewSyncCmd(globalCfg *config.GlobalImpl) *cobra.Command { | |||
f.StringVar(&syncOptions.PostRenderer, "post-renderer", "", `pass --post-renderer to "helm template" or "helm upgrade --install"`) | |||
f.StringArrayVar(&syncOptions.PostRendererArgs, "post-renderer-args", nil, `pass --post-renderer-args to "helm template" or "helm upgrade --install"`) | |||
f.StringVar(&syncOptions.Cascade, "cascade", "", "pass cascade to helm exec, default: background") | |||
f.StringVar(&syncOptions.DryRyn, "dry-run", "", "pass dry-run to helm exec") |
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.
Isn't DryRyn a typo?
pkg/config/sync.go
Outdated
@@ -32,6 +32,8 @@ type SyncOptions struct { | |||
PostRendererArgs []string | |||
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background | |||
Cascade string | |||
// DryRun is for helm dry-run flag | |||
DryRyn 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.
Typo
pkg/config/sync.go
Outdated
|
||
// DryRun returns dry-run flag | ||
func (t *SyncImpl) DryRun() string { | ||
return t.SyncOptions.DryRyn |
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.
Typo
Yeah. Please feel free to do that. |
@hoangelos ping |
@yxxhero I can't push the UnitTest to this branch. It's saying I don't have rights to do that MREMCDBAFC2C:helmfile peter.halliday$ git push upstream add-dry-run-flag-for-sync-and-apply
ERROR: Permission to helmfile/helmfile.git denied to hoangelos.
fatal: Could not read from remote repository. |
@hoangelos oh. you can create a new PR for this. |
b06eff8
to
9135c51
Compare
73b60f0
to
7b8468c
Compare
2fba764
to
fb7c54e
Compare
@yxxhero just a question, what would happen with hooks in your implementation? Would they still execute in dry run mode? |
@felipecrs good question. I need to think more. |
Some ideas when dry run is on:
|
@felipecrs thanks so much. good ideas. |
fb7c54e
to
3b73c6f
Compare
I will follow the point 3. thanks so much. |
3b73c6f
to
6752cfe
Compare
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
bac765c
to
2ebdf9a
Compare
hi @yxxhero how is the status of this? |
WIP |
@yxxhero Hey, more data to throw: I just discovered that in
And Bitnami's mongoDB helm chart, that is one of the most problematic ones, started to work fine and smooth. So my question then is: what is the point of the the feature if it can be solved simply passing "--diff-args" ? |
see: #1024