Skip to content

Commit d02b7a4

Browse files
committed
fix: image-pull-policy ignored
1 parent 1a0d076 commit d02b7a4

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

deployments/pulumi/pkg/config/config.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ func Load(ctx *pulumi.Context) (*Config, error) {
596596
}
597597
}
598598

599-
timeout, err := config.TryInt(ctx, "timeout")
599+
timeout, err := cfg.TryInt("timeout")
600600
if err != nil {
601601
if errors.Is(err, config.ErrMissingVar) {
602602
timeout = 60
@@ -606,22 +606,22 @@ func Load(ctx *pulumi.Context) (*Config, error) {
606606
}
607607

608608
storage := &Storage{}
609-
if err := config.GetObject(ctx, "storage", storage); err != nil {
609+
if err := cfg.GetObject("storage", storage); err != nil {
610610
if !errors.Is(err, config.ErrMissingVar) {
611611
return nil, err
612612
}
613613
return nil, errors.New("storage not defined")
614614
}
615615

616616
api := &API{}
617-
if err := config.GetObject(ctx, "api", api); err != nil {
617+
if err := cfg.GetObject("api", api); err != nil {
618618
if !errors.Is(err, config.ErrMissingVar) {
619619
return nil, err
620620
}
621621
}
622622

623623
monitoring := &Monitoring{}
624-
if err := config.GetObject(ctx, "monitoring", monitoring); err != nil {
624+
if err := cfg.GetObject("monitoring", monitoring); err != nil {
625625
if !errors.Is(err, config.ErrMissingVar) {
626626
return nil, err
627627
}
@@ -642,20 +642,21 @@ func Load(ctx *pulumi.Context) (*Config, error) {
642642
generator = nil
643643
}
644644

645-
namespace := config.Get(ctx, "namespace")
645+
namespace := cfg.Get("namespace")
646646
if namespace == "" {
647647
namespace = ctx.Stack()
648648
}
649649

650650
return &Config{
651651
Timeout: timeout,
652652
Common: Common{
653-
Debug: config.GetBool(ctx, "debug"),
654-
Namespace: namespace,
655-
Tag: config.Get(ctx, "version"),
656-
Monitoring: monitoring,
653+
Debug: cfg.GetBool("debug"),
654+
Namespace: namespace,
655+
Tag: cfg.Get("version"),
656+
Monitoring: monitoring,
657+
ImagePullPolicy: cfg.Get("image-pull-policy"),
657658
},
658-
InstallDevBox: config.GetBool(ctx, "install-dev-box"),
659+
InstallDevBox: cfg.GetBool("install-dev-box"),
659660
Storage: storage,
660661
API: api,
661662
Ingress: ingress,

0 commit comments

Comments
 (0)