Skip to content
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
13 changes: 0 additions & 13 deletions charts/nginx-ingress/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -391,24 +391,14 @@ List of volumes for controller.
{{- if eq (include "nginx-ingress.readOnlyRootFilesystem" .) "true" }}
- name: nginx-etc
emptyDir: {}
{{- if .Values.controller.cache.enableShared }}
- name: nginx-cache
persistentVolumeClaim:
claimName: {{ .Values.controller.cache.sharedPVCName }}
{{- else }}
- name: nginx-cache
emptyDir: {}
{{- end }}
- name: nginx-lib
emptyDir: {}
- name: nginx-state
emptyDir: {}
- name: nginx-log
emptyDir: {}
{{- else if .Values.controller.cache.enableShared }}
- name: nginx-cache
persistentVolumeClaim:
claimName: {{ .Values.controller.cache.sharedPVCName }}
{{- end }}
{{- if .Values.controller.appprotect.v5 }}
{{ toYaml .Values.controller.appprotect.volumes }}
Expand Down Expand Up @@ -468,9 +458,6 @@ volumeMounts:
name: nginx-state
- mountPath: /var/log/nginx
name: nginx-log
{{- else if .Values.controller.cache.enableShared }}
- mountPath: /var/cache/nginx
name: nginx-cache
{{- end }}
Comment on lines 458 to 461
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the shared cache volume mount condition creates an inconsistency. The nginx-cache volume is still defined at line 394-395 but there's no corresponding volume mount for it when readOnlyRootFilesystem is false. This will result in an unused volume definition.

Copilot uses AI. Check for mistakes.
{{- if .Values.controller.appprotect.v5 }}
- name: app-protect-bd-config
Expand Down
10 changes: 0 additions & 10 deletions charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,6 @@ controller:
## See https://docs.nginx.com/nginx-ingress-controller/configuration/proxy-buffers-configuration/ for more details of which configuration options are affected
directiveAutoAdjust: false

## Cache configuration options
cache:
## Enables shared cache across multiple pods using an external persistent volume
## When enabled, the /var/cache/nginx directory will be mounted from a PVC instead of using emptyDir
## User must create and configure a PVC with appropriate access mode
enableShared: false

## The name of the PersistentVolumeClaim to use for shared cache, should match the name of the PVC created by the user
sharedPVCName: "nginx-shared-cache"

## A list of custom ports to expose on the NGINX Ingress Controller pod. Follows the conventional Kubernetes yaml syntax for container ports.
customPorts: []

Expand Down
Loading
Loading