Skip to content

Commit dfeaaf9

Browse files
committed
Review feedback
1 parent 4d13c5c commit dfeaaf9

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

deploy/helm-chart/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ The following tables lists the configurable parameters of the NGINX Gateway Fabr
296296
| `nginx.image.repository` | The repository for the NGINX image. | ghcr.io/nginxinc/nginx-gateway-fabric/nginx |
297297
| `nginx.image.tag` | The tag for the NGINX image. | edge |
298298
| `nginx.image.pullPolicy` | The `imagePullPolicy` for the NGINX image. | Always |
299-
| `nginx.plus` | Is NGINX Plus enabled | false |
299+
| `nginx.plus` | Is NGINX Plus image being used | false |
300300
| `nginx.lifecycle` | The `lifecycle` of the nginx container. | {} |
301301
| `nginx.extraVolumeMounts` | Extra `volumeMounts` for the nginx container. | {} |
302302
| `terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric pod. | 30 |

docs/developer/quickstart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
123123
helm install my-release ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginxplus --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never --set nginx.plus=true -n nginx-gateway
124124
```
125125
126-
> For more information on helm configuration options see the Helm [README](../../deploy/helm-chart/README.md).
126+
> For more information on Helm configuration options see the Helm [README](../../deploy/helm-chart/README.md).
127127
128128
- To install with manifests:
129129

internal/mode/static/metrics/collectors/nginx.go

+2-18
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ const (
2323
nginxStatusSockTimeout = 10 * time.Second
2424
)
2525

26-
var (
27-
upstreamServerVariableLabels = []string{}
28-
upstreamServerPeerVariableLabelNames = []string{}
29-
streamUpstreamServerVariableLabels = []string{}
30-
streamUpstreamServerPeerVariableLabelNames = []string{}
31-
serverZoneVariableLabels = []string{}
32-
streamServerZoneVariableLabels = []string{}
33-
)
34-
3526
// NewNginxMetricsCollector creates an NginxCollector which fetches stats from NGINX over a unix socket
3627
func NewNginxMetricsCollector(constLabels map[string]string) (prometheus.Collector, error) {
3728
httpClient := getSocketClient(nginxStatusSock)
@@ -43,20 +34,13 @@ func NewNginxMetricsCollector(constLabels map[string]string) (prometheus.Collect
4334
return nginxCollector.NewNginxCollector(client, metrics.Namespace, constLabels), nil
4435
}
4536

46-
// NewNginxMetricsCollector creates an NginxCollector which fetches stats from NGINX over a unix socket
37+
// NewNginxPlusMetricsCollector creates an NginxCollector which fetches stats from NGINX Plus API over a unix socket
4738
func NewNginxPlusMetricsCollector(constLabels map[string]string) (prometheus.Collector, error) {
4839
plusClient, err := createPlusClient()
4940
if err != nil {
5041
return nil, err
5142
}
52-
variableLabelNames := nginxCollector.NewVariableLabelNames(
53-
upstreamServerVariableLabels,
54-
serverZoneVariableLabels,
55-
upstreamServerPeerVariableLabelNames,
56-
streamUpstreamServerVariableLabels,
57-
streamServerZoneVariableLabels,
58-
streamUpstreamServerPeerVariableLabelNames,
59-
)
43+
variableLabelNames := nginxCollector.VariableLabelNames{}
6044
return nginxCollector.NewNginxPlusCollector(plusClient, metrics.Namespace, variableLabelNames, constLabels), nil
6145
}
6246

0 commit comments

Comments
 (0)