Skip to content

Commit 635b3fc

Browse files
authored
Set NGINX Plus default image (#3919)
Problem: The default NGINX Plus image wasn't being set properly. Solution: Set the default if running Plus.
1 parent 4e3dc46 commit 635b3fc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/controller/provisioner/objects.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,9 @@ func (p *NginxProvisioner) buildNginxPodTemplateSpec(
11131113

11141114
func (p *NginxProvisioner) buildImage(nProxyCfg *graph.EffectiveNginxProxy) (string, corev1.PullPolicy) {
11151115
image := defaultNginxImagePath
1116+
if p.cfg.Plus {
1117+
image = defaultNginxPlusImagePath
1118+
}
11161119
tag := p.cfg.GatewayPodConfig.Version
11171120
pullPolicy := defaultImagePullPolicy
11181121

internal/controller/provisioner/objects_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ func TestBuildNginxResourceObjects_Plus(t *testing.T) {
498498
cfg: Config{
499499
GatewayPodConfig: &config.GatewayPodConfig{
500500
Namespace: ngfNamespace,
501+
Version: "1.0.0",
501502
},
502503
Plus: true,
503504
PlusUsageConfig: &config.UsageReportConfig{
@@ -611,6 +612,7 @@ func TestBuildNginxResourceObjects_Plus(t *testing.T) {
611612
Name: "nginx-plus-usage-certs",
612613
MountPath: "/etc/nginx/certs-bootstrap/",
613614
}))
615+
g.Expect(container.Image).To(Equal(fmt.Sprintf("%s:1.0.0", defaultNginxPlusImagePath)))
614616
}
615617

616618
func TestBuildNginxResourceObjects_DockerSecrets(t *testing.T) {

0 commit comments

Comments
 (0)