Skip to content

Commit fe6a65b

Browse files
committed
fix review comments
1 parent 83267c5 commit fe6a65b

File tree

13 files changed

+18
-24
lines changed

13 files changed

+18
-24
lines changed

charts/nginx-gateway-fabric/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
207207
| `certGenerator.ttlSecondsAfterFinished` | How long to wait after the cert generator job has finished before it is removed by the job controller. | int | `30` |
208208
| `clusterDomain` | The DNS cluster domain of your Kubernetes cluster. | string | `"cluster.local"` |
209209
| `gateways` | A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference. | list | `[]` |
210-
| `nginx` | The nginx section contains the configuration for all NGINX data plane deployments installed by the NGINX Gateway Fabric control plane. | object | `{"autoscaling":{"enable":false},"config":{},"container":{"hostPorts":[],"lifecycle":{},"readinessProbe":{},"resources":{},"volumeMounts":[]},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","nginxOneConsole":{"dataplaneKeySecretName":"","endpointHost":"agent.connect.nginx.com","endpointPort":443,"skipVerify":false},"patches":[],"plus":false,"pod":{},"replicas":1,"service":{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"patches":[],"type":"LoadBalancer"},"usage":{"caSecretName":"","clientSSLSecretName":"","endpoint":"","enforceInitialReport":false,"resolver":"","secretName":"nplus-license","skipVerify":false}}` |
210+
| `nginx` | The nginx section contains the configuration for all NGINX data plane deployments installed by the NGINX Gateway Fabric control plane. | object | `{"autoscaling":{"enable":false},"config":{},"container":{"hostPorts":[],"lifecycle":{},"readinessProbe":{},"resources":{},"volumeMounts":[]},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","nginxOneConsole":{"dataplaneKeySecretName":"","endpointHost":"agent.connect.nginx.com","endpointPort":443,"skipVerify":false},"patches":[],"plus":false,"pod":{},"replicas":1,"service":{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"patches":[],"type":"LoadBalancer"},"usage":{"caSecretName":"","clientSSLSecretName":"","endpoint":"","enforceInitialReport":true,"resolver":"","secretName":"nplus-license","skipVerify":false}}` |
211211
| `nginx.autoscaling` | Autoscaling configuration for the NGINX data plane. | object | `{"enable":false}` |
212212
| `nginx.autoscaling.enable` | Enable or disable Horizontal Pod Autoscaler for the NGINX data plane. | bool | `false` |
213213
| `nginx.config` | The configuration for the data plane that is contained in the NginxProxy resource. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{}` |
@@ -241,7 +241,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
241241
| `nginx.usage.caSecretName` | The name of the Secret containing the NGINX Instance Manager CA certificate. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `""` |
242242
| `nginx.usage.clientSSLSecretName` | The name of the Secret containing the client certificate and key for authenticating with NGINX Instance Manager. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `""` |
243243
| `nginx.usage.endpoint` | The endpoint of the NGINX Plus usage reporting server. Default: product.connect.nginx.com | string | `""` |
244-
| `nginx.usage.enforceInitialReport` | Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced. | bool | `false` |
244+
| `nginx.usage.enforceInitialReport` | Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced. | bool | `true` |
245245
| `nginx.usage.resolver` | The nameserver used to resolve the NGINX Plus usage reporting endpoint. Used with NGINX Instance Manager. | string | `""` |
246246
| `nginx.usage.secretName` | The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"nplus-license"` |
247247
| `nginx.usage.skipVerify` | Disable client verification of the NGINX Plus usage reporting server certificate. | bool | `false` |

charts/nginx-gateway-fabric/templates/_helpers.tpl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,3 @@ Filters out empty fields from a struct.
110110
{{- $result | toYaml -}}
111111
{{- end -}}
112112
{{- end }}
113-
114-
{{/*
115-
Enforcing the initial NGINX Plus licensing report.
116-
*/}}
117-
{{- define "nginx-gateway.enforceInitialReport" -}}
118-
{{- if .Values.Usage.enforceInitialReport }}
119-
enforce_initial_report on;
120-
{{- else }}
121-
enforce_initial_report off;
122-
{{- end }}
123-
{{- end }}

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@
693693
"type": "string"
694694
},
695695
"enforceInitialReport": {
696-
"default": false,
696+
"default": true,
697697
"description": "Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced.",
698698
"required": [],
699699
"title": "enforceInitialReport",

charts/nginx-gateway-fabric/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ nginx:
338338
clientSSLSecretName: ""
339339

340340
# -- Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced.
341-
enforceInitialReport: false
341+
enforceInitialReport: true
342342

343343
# @schema
344344
# type: object

cmd/gateway/commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ func createControllerCommand() *cobra.Command {
8181
usageReportSkipVerifyFlag = "usage-report-skip-verify"
8282
usageReportClientSSLSecretFlag = "usage-report-client-ssl-secret" //nolint:gosec // not credentials
8383
usageReportCASecretFlag = "usage-report-ca-secret" //nolint:gosec // not credentials
84+
usageReportEnforceInitialReportFlag = "usage-report-enforce-initial-report"
8485
snippetsFiltersFlag = "snippets-filters"
8586
nginxSCCFlag = "nginx-scc"
86-
usageReportEnforceInitialReportFlag = "usage-report-enforce-initial-report"
8787
)
8888

8989
// flag values
@@ -494,7 +494,7 @@ func createControllerCommand() *cobra.Command {
494494
cmd.Flags().BoolVar(
495495
&usageReportEnforceInitialReport,
496496
usageReportEnforceInitialReportFlag,
497-
false,
497+
true,
498498
"Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced.",
499499
)
500500

cmd/gateway/commands_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func TestControllerCmdFlagValidation(t *testing.T) {
154154
"--usage-report-resolver=resolver.com",
155155
"--usage-report-ca-secret=ca-secret",
156156
"--usage-report-client-ssl-secret=client-secret",
157-
"--usage-report-enforce-initial-report=true",
157+
"--usage-report-enforce-initial-report",
158158
"--snippets-filters",
159159
"--nginx-scc=nginx-sscc-name",
160160
"--nginx-one-dataplane-key-secret=dataplane-key-secret",

deploy/experimental-nginx-plus/deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ spec:
271271
- --nginx-docker-secret=nginx-plus-registry-secret
272272
- --nginx-plus
273273
- --usage-report-secret=nplus-license
274+
- --usage-report-enforce-initial-report=true
274275
- --metrics-port=9113
275276
- --health-port=8081
276277
- --leader-election-lock-name=nginx-gateway-leader-election

deploy/nginx-plus/deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ spec:
267267
- --nginx-docker-secret=nginx-plus-registry-secret
268268
- --nginx-plus
269269
- --usage-report-secret=nplus-license
270+
- --usage-report-enforce-initial-report=true
270271
- --metrics-port=9113
271272
- --health-port=8081
272273
- --leader-election-lock-name=nginx-gateway-leader-election

deploy/snippets-filters-nginx-plus/deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ spec:
269269
- --nginx-docker-secret=nginx-plus-registry-secret
270270
- --nginx-plus
271271
- --usage-report-secret=nplus-license
272+
- --usage-report-enforce-initial-report=true
272273
- --metrics-port=9113
273274
- --health-port=8081
274275
- --leader-election-lock-name=nginx-gateway-leader-election

internal/controller/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ type UsageReportConfig struct {
125125
Resolver string
126126
// SkipVerify controls whether the nginx verifies the server certificate.
127127
SkipVerify bool
128-
// Enabled is the flag for toggling usage reporting on or off.
128+
// EnforceInitialReport is the flag for toggling usage reporting on or off.
129129
EnforceInitialReport bool
130130
}
131131

0 commit comments

Comments
 (0)