|
64 | 64 | plusLicenseFileName = flag.String("plus-license-file-name", "", "File name containing the NGINX Plus JWT")
|
65 | 65 | plusUsageEndpoint = flag.String("plus-usage-endpoint", "", "Endpoint for reporting NGINX Plus usage")
|
66 | 66 | clusterName = flag.String("cluster-name", "kind", "Cluster name")
|
| 67 | + gkeProject = flag.String("gke-project", "", "GKE Project name") |
67 | 68 | )
|
68 | 69 |
|
69 | 70 | var (
|
|
84 | 85 | logs string
|
85 | 86 | )
|
86 | 87 |
|
| 88 | +var formatNginxPlusEdgeImagePath = "us-docker.pkg.dev/%s/nginx-gateway-fabric/nginx-plus" |
| 89 | + |
87 | 90 | const (
|
88 | 91 | releaseName = "ngf-test"
|
89 | 92 | ngfNamespace = "nginx-gateway"
|
@@ -206,18 +209,24 @@ func createNGFInstallConfig(cfg setupConfig, extraInstallArgs ...string) framewo
|
206 | 209 | Telemetry: cfg.telemetry,
|
207 | 210 | }
|
208 | 211 |
|
| 212 | + switch { |
209 | 213 | // if we aren't installing from the public charts, then set the custom images
|
210 |
| - if !strings.HasPrefix(cfg.chartPath, "oci://") { |
| 214 | + case !strings.HasPrefix(cfg.chartPath, "oci://"): |
211 | 215 | installCfg.NgfImageRepository = *ngfImageRepository
|
212 | 216 | installCfg.NginxImageRepository = *nginxImageRepository
|
213 | 217 | if *plusEnabled && cfg.nfr {
|
214 | 218 | installCfg.NginxImageRepository = *nginxPlusImageRepository
|
215 | 219 | }
|
216 | 220 | installCfg.ImageTag = *imageTag
|
217 | 221 | installCfg.ImagePullPolicy = *imagePullPolicy
|
218 |
| - } else if version == "edge" { |
| 222 | + case version == "edge": |
219 | 223 | chartVersion = "0.0.0-edge"
|
220 | 224 | installCfg.ChartVersion = chartVersion
|
| 225 | + if *plusEnabled && cfg.nfr { |
| 226 | + installCfg.NginxImageRepository = fmt.Sprintf(formatNginxPlusEdgeImagePath, *gkeProject) |
| 227 | + } |
| 228 | + case *plusEnabled && cfg.nfr: |
| 229 | + installCfg.NginxImageRepository = fmt.Sprintf(formatNginxPlusEdgeImagePath, *gkeProject) |
221 | 230 | }
|
222 | 231 |
|
223 | 232 | output, err := framework.InstallGatewayAPI(cfg.gwAPIVersion)
|
|
0 commit comments