-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nginx-status-allow-cidrs
and service externalIPs to Helm chart
#398
Conversation
* Add nginxStatusAllowCidrs cli argument to deployment template * Add externalIPs to service template
* Add Note about nginxStatusAllowCidrs cli argument * Add Note about service externalIPs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (did not test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments
deployments/helm-chart/README.md
Outdated
`controller.nginxStatus.port` | Set the port where the NGINX stub_status or the NGINX Plus API is exposed. | 8080 | ||
`controller.reportIngressStatus.enable` | Update the address field in the status of Ingresses resources with an external address of the Ingress controller. You must also specify the source of the external address either through an external service via `controller.reportIngressStatus.externalService` or the `external-status-address` entry in the ConfigMap via `controller.config.entries`. **Note:** `controller.config.entries.external-status-address` takes precedence if both are set. | true | ||
`controller.reportIngressStatus.externalService` | Specifies the name of the service with the type LoadBalancer through which the Ingress controller is exposed externally. The external address of the service is used when reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | nginx-ingress | ||
`controller.reportIngressStatus.enableLeaderElection` | Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | true | ||
`controller.nginxStatusAllowCidrs` | Whitelist IPv4 IP/CIDR blocks to allow access to NGINX stub_status or the NGINX Plus API. Separate multiple IP/CIDR by commas. | 127.0.0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were you able to successfully pass multiple IP/CIDRs? For example, "192.168.1.3,10.0.0.0/8"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this example appears in the manifest in this format:
-nginx-status-allow-cidrs=192.168.1.3,10.0.0.0/8
nginxStatusAllowCidrs -> nginxStatus.allowCidrs * Update Helm documentation to match allowCidrs key change * Add missing template value to daemonset template * Update values to match allowCidrs key change
@@ -80,6 +80,9 @@ spec: | |||
- -external-service={{ .Values.controller.reportIngressStatus.externalService }} | |||
- -enable-leader-election={{ .Values.controller.reportIngressStatus.enableLeaderElection }} | |||
{{- end }} | |||
{{- if .Values.controller.nginxStatus.allowCidrs }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move it above, so it depends on {{- if .Values.controller.reportIngressStatus.enable }}
no need for a separate condition for {{- if .Values.controller.nginxStatus.allowCidrs }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for controller-deployment.yaml
Proposed changes
nginx-status-allow-cidrs
cli argument support to helm chart. Implemented in: Add CLI option-nginx-status-allow-cidrs
to allow easily restricting access to sensitive endpoints via CLI argument. #387Checklist
Before creating a PR, run through this checklist and mark each as complete.