-
Notifications
You must be signed in to change notification settings - Fork 126
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 cluster-only uninstall option and resource deletion handling #634
base: main
Are you sure you want to change the base?
Conversation
/ci |
Introduce a new flag `--clusterOnly` to the uninstall command, allowing direct uninstallation from the cluster without interacting with the git repository. Signed-off-by: Noam Gal <noam.gal@octopus.com>
Signed-off-by: Noam Gal <noam.gal@octopus.com>
Ensure that required flags are validated only when not fixed tests Signed-off-by: Noam Gal <noam.gal@octopus.com>
a3a0ccd
to
e18ec61
Compare
/ci |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #634 +/- ##
==========================================
- Coverage 40.66% 40.49% -0.18%
==========================================
Files 41 41
Lines 6730 6786 +56
==========================================
+ Hits 2737 2748 +11
- Misses 3879 3922 +43
- Partials 114 116 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Noam Gal <noam.gal@octopus.com>
|
||
var revision string | ||
if r != nil && repofs != nil { |
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.
return condition
RunE: func(cmd *cobra.Command, _ []string) error { | ||
kubeContextName, err := cmd.Flags().GetString("context") | ||
if err != nil { | ||
return fmt.Errorf("failed to get kube context name: %w", err) | ||
} | ||
|
||
if !clusterOnly { | ||
if cloneOpts.Repo == "" || cloneOpts.Auth.Password == "" { |
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.
check if cobra can handle this
Introduce a new flag
--clusterOnly
to the uninstall command, allowingdirect uninstallation from the cluster without interacting with the git
repository.
Signed-off-by: Noam Gal noam.gal@octopus.com