Skip to content

Commit

Permalink
fix: explicit namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
acid-chicken committed May 22, 2024
1 parent 9ffb85a commit 9974d0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hariko/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func newCmd() *cobra.Command {
},
}, nil)
b := new(bytes.Buffer)
release, err := deploy(packageName, repositoryName, repositoryURL, b)
release, err := deploy(namespace, packageName, repositoryName, repositoryURL, b)
if err != nil {
discord(&discordgo.WebhookParams{
Embeds: []*discordgo.MessageEmbed{
Expand Down Expand Up @@ -229,7 +229,7 @@ func (r RESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig {
return &clientcmd.DefaultClientConfig
}

func deploy(packageName string, repositoryName string, repositoryURL string, log io.Writer) (*release.Release, error) {
func deploy(namespace string, packageName string, repositoryName string, repositoryURL string, log io.Writer) (*release.Release, error) {
p := getter.All(settings)
c := repo.Entry{
Name: repositoryName,
Expand Down Expand Up @@ -263,11 +263,11 @@ func deploy(packageName string, repositoryName string, repositoryURL string, log
return nil, err
}
actionConfig := new(action.Configuration)
actionConfig.Init(RESTClientGetter{}, settings.Namespace(), "configmap", func(format string, v ...interface{}) {
actionConfig.Init(RESTClientGetter{}, namespace, "configmap", func(format string, v ...interface{}) {
fmt.Fprintf(log, format+"\n", v...)
})
client := action.NewUpgrade(actionConfig)
client.Namespace = settings.Namespace()
client.Namespace = namespace
chartPath, err := client.LocateChart(repositoryName+"/"+packageName, settings)
if err != nil {
return nil, err
Expand Down

0 comments on commit 9974d0c

Please sign in to comment.