Skip to content

Allow for configurable securityContext #1063

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

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ can run the following command:
docker buildx imagetools inspect ghcr.io/nginxinc/nginx-kubernetes-gateway:edge --format '{{ json (index .SBOM "linux/amd64").SPDX }}' | grype
```

## Troubleshooting

For troubleshooting help, see the [Troubleshooting](/docs/troubleshooting.md) document.

## Contacts

We’d like to hear your feedback! If you experience issues with our Gateway Controller, please [open a bug][bug] in
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
periodSeconds: 1
{{- end }}
securityContext:
allowPrivilegeEscalation: false
allowPrivilegeEscalation: {{ .Values.nginxGateway.securityContext.allowPrivilegeEscalation }}
capabilities:
add:
- KILL
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ nginxGateway:
tag: edge
pullPolicy: Always

securityContext:
## Some environments may need this set to true in order for the control plane to successfully reload NGINX.
allowPrivilegeEscalation: false

nginx:
## The NGINX image to use
image:
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ yourself.
- [CLI Help](cli-help.md): Describes the commands available in the `gateway` binary of `nginx-kubernetes-gateway`
container.
- [Monitoring](monitoring.md): Information on monitoring NGINX Kubernetes Gateway using Prometheus metrics.
- [Troubleshooting](troubleshooting.md): Troubleshooting guide for common or known issues.

### Directories

Expand Down
11 changes: 11 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Troubleshooting

This document contains common or known issues and how to troubleshoot them.

## failed to reload NGINX: failed to send the HUP signal to NGINX main: operation not permitted

Depending on your environment's configuration, the control plane may not have the proper permissions to reload
NGINX. If NGINX configuration is not applied and you see the above error in the `nginx-gateway` logs, you will need
to set `allowPrivilegeEscalation` to `true`. If using Helm, you can set the
`nginxGateway.securityContext.allowPrivilegeEscalation` value.
If using the manifests directly, you can update this field under the `nginx-gateway` container's `securityContext`.