-
Notifications
You must be signed in to change notification settings - Fork 153
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
helm repo source #263
helm repo source #263
Conversation
if params.HelmRepository != "" { | ||
source, err = generateSourceManifestHelm() | ||
if err != nil { | ||
return wrapError(err, "could not generate source manifest") |
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.
would it be possible to add something here to differentiate this error from the next one (both are the same) ?. Just for easy debugging in the future.
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 mean the error that happens depends on which path you choose. If you are adding a helm repo then you know the error was in helm.
return wrapError(err, "could not generate source manifest") | ||
} | ||
} else { | ||
source, err = generateSourceManifestGit() |
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.
huge favor, could you please help me make this function to use the new Chart field instead of Path. When I created it, I used Path
but it seems more accurate to use Chart
now.
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 talked with @jrryjcksn at least on whether or not i should use path. We agreed for helm-repository chart made sense but I didnt really ask about using chart for github.
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.
Looks like Flux asks the user for "chart" in either case so we should probably follow that lead.
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.
A couple of nits, otherwise LGTM
cmd/wego/add/cmd.go
Outdated
Cmd.Flags().StringVar(¶ms.Path, "path", "./", "Path of files within git repository") | ||
Cmd.Flags().StringVar(¶ms.Branch, "branch", "main", "Branch to watch within git repository") | ||
Cmd.Flags().StringVar(¶ms.DeploymentType, "deployment-type", "kustomize", "deployment type [kustomize, helm]") | ||
Cmd.Flags().StringVar(¶ms.Chart, "chart", "", "Specify chart for --helm-repository source") |
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.
Looks like this description is no longer accurate (at least the "--" part)
pkg/cmdimpl/add_test.go
Outdated
}, | ||
} | ||
|
||
fluxops.SetFluxHandler(fakeHandler) |
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 made a change in the other helm test in my stuff to not set the fake handler directly (using WithOverrides
instead) because it leaves the flux handler broken for other tests.
Added ability to add helm manifest through helm repo.
Unit tests and tested myself
Command looks like
wego app add . --url=https://grafana.github.io/helm-charts --name=graf1 --chart=loki