Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ func init() {
createCmd.Flags().StringVarP(&platform.Repo, "repo", "", defaultRepo, "Repo URL")
createCmd.Flags().StringVarP(&platform.Values, "values", "", valuesFile, "Helm chart values.yaml template")

viper.BindPFlags(createCmd.LocalFlags()) //nolint:errcheck
_ = viper.BindPFlags(createCmd.LocalFlags())
}
2 changes: 1 addition & 1 deletion cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ func init() {
// optional flags
deployCmd.Flags().StringVarP(&deployTarget, "target", "t", "", "Target a specific project")

viper.BindPFlags(deployCmd.LocalFlags()) //nolint:errcheck
_ = viper.BindPFlags(deployCmd.LocalFlags())
}
2 changes: 1 addition & 1 deletion cmd/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func init() {
destroyCmd.Flags().BoolVarP(&purgeObj, "purge-obj", "", false, "Purge objects in APL buckets")
destroyCmd.Flags().BoolVarP(&purgeStk, "purge-stack", "", false, "Purge Pulumi stack data")

viper.BindPFlags(destroyCmd.LocalFlags()) //nolint:errcheck
_ = viper.BindPFlags(destroyCmd.LocalFlags())
}

func stackAction(ctx context.Context, st *MicroStack) {
Expand Down
15 changes: 10 additions & 5 deletions cmd/templates/infra/nodebalancer.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package app

import (
"slices"
"time"

utils "{{ .repo }}/utils"
Expand Down Expand Up @@ -48,11 +49,15 @@ func GetNodeBalancer(ctx *pulumi.Context, region, tag string, opt ...any) NodeBa
for range 5 {
result := searchNodeBalancer(ctx, nbinfo)
if len(result.Nodebalancers) > 0 {
nb.Id = result.Nodebalancers[0].Id
nb.Ipv4 = result.Nodebalancers[0].Ipv4
nb.Ipv6 = result.Nodebalancers[0].Ipv6

break
for idx, i := range result.Nodebalancers {
if slices.Contains(i.Tags, nbTag) {
nb.Id = result.Nodebalancers[idx].Id
nb.Ipv4 = result.Nodebalancers[idx].Ipv4
nb.Ipv6 = result.Nodebalancers[idx].Ipv6
break
}
time.Sleep(5 * time.Second)
}
}

time.Sleep(5 * time.Second)
Expand Down
Loading