Skip to content
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

fix: failure when helmrepository and the helmrelease are in different namespaces #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nitishfy
Copy link
Member

Fixes #16

Signed-off-by: nitishfy <[email protected]>
@@ -64,6 +65,10 @@ with kubectl.`,
helmReleaseNamespace, _ := cmd.Flags().GetString("namespace")
confirmMigrate, _ := cmd.Flags().GetBool("confirm-migrate")

if helmReleaseName == "" || helmReleaseNamespace == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed. You can do this with cobra using MarkFlagsRequiredTogether.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use the MarkFlagsRequiredTogether, we'll get an error for command that doesn't require either of those flags such as mta scan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure when the helmrepository and the helmrelease are in different namespaces
3 participants