From c3b463dc3032ee0fd001fb679821b53cb92f8ed4 Mon Sep 17 00:00:00 2001 From: Greg Snow Date: Tue, 7 Jan 2020 15:56:21 +0300 Subject: [PATCH 1/2] Add pod PriorityClass support --- deployments/helm-chart/README.md | 1 + deployments/helm-chart/templates/controller-daemonset.yaml | 3 +++ deployments/helm-chart/templates/controller-deployment.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index 2bb998c183..1aa08571b1 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -112,6 +112,7 @@ Parameter | Description | Default `controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true `controller.nginxStatus.port` | Set the port where the NGINX stub_status or the NGINX Plus API is exposed. | 8080 `controller.nginxStatus.allowCidrs` | 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 +`controller.priorityClassName` | The PriorityClass of the Ingress controller pods. | None `controller.service.create` | Creates a service to expose the Ingress controller pods. | true `controller.service.type` | The type of service to create for the Ingress controller. | LoadBalancer `controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local diff --git a/deployments/helm-chart/templates/controller-daemonset.yaml b/deployments/helm-chart/templates/controller-daemonset.yaml index 944ae4af85..1e18373fe1 100644 --- a/deployments/helm-chart/templates/controller-daemonset.yaml +++ b/deployments/helm-chart/templates/controller-daemonset.yaml @@ -38,6 +38,9 @@ spec: {{- if .Values.controller.affinity }} affinity: {{ toYaml .Values.controller.affinity | indent 8 }} +{{- end }} +{{- if .Values.controller.priorityClassName }} + priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} hostNetwork: {{ .Values.controller.hostNetwork }} containers: diff --git a/deployments/helm-chart/templates/controller-deployment.yaml b/deployments/helm-chart/templates/controller-deployment.yaml index 9fcf4beb78..642e4aac00 100644 --- a/deployments/helm-chart/templates/controller-deployment.yaml +++ b/deployments/helm-chart/templates/controller-deployment.yaml @@ -37,6 +37,9 @@ spec: {{- if .Values.controller.affinity }} affinity: {{ toYaml .Values.controller.affinity | indent 8 }} +{{- end }} +{{- if .Values.controller.priorityClassName }} + priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} serviceAccountName: {{ include "nginx-ingress.serviceAccountName" . }} hostNetwork: {{ .Values.controller.hostNetwork }} From 325c937519c5748440a1f3b9b0be608ff9e9e1ba Mon Sep 17 00:00:00 2001 From: Greg Snow Date: Tue, 7 Jan 2020 15:56:21 +0300 Subject: [PATCH 2/2] Add pod PriorityClass support --- deployments/helm-chart/README.md | 1 + deployments/helm-chart/templates/controller-daemonset.yaml | 3 +++ deployments/helm-chart/templates/controller-deployment.yaml | 3 +++ deployments/helm-chart/values.yaml | 3 +++ 4 files changed, 10 insertions(+) diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index 2bb998c183..1aa08571b1 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -112,6 +112,7 @@ Parameter | Description | Default `controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true `controller.nginxStatus.port` | Set the port where the NGINX stub_status or the NGINX Plus API is exposed. | 8080 `controller.nginxStatus.allowCidrs` | 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 +`controller.priorityClassName` | The PriorityClass of the Ingress controller pods. | None `controller.service.create` | Creates a service to expose the Ingress controller pods. | true `controller.service.type` | The type of service to create for the Ingress controller. | LoadBalancer `controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local diff --git a/deployments/helm-chart/templates/controller-daemonset.yaml b/deployments/helm-chart/templates/controller-daemonset.yaml index 944ae4af85..1e18373fe1 100644 --- a/deployments/helm-chart/templates/controller-daemonset.yaml +++ b/deployments/helm-chart/templates/controller-daemonset.yaml @@ -38,6 +38,9 @@ spec: {{- if .Values.controller.affinity }} affinity: {{ toYaml .Values.controller.affinity | indent 8 }} +{{- end }} +{{- if .Values.controller.priorityClassName }} + priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} hostNetwork: {{ .Values.controller.hostNetwork }} containers: diff --git a/deployments/helm-chart/templates/controller-deployment.yaml b/deployments/helm-chart/templates/controller-deployment.yaml index 9fcf4beb78..642e4aac00 100644 --- a/deployments/helm-chart/templates/controller-deployment.yaml +++ b/deployments/helm-chart/templates/controller-deployment.yaml @@ -37,6 +37,9 @@ spec: {{- if .Values.controller.affinity }} affinity: {{ toYaml .Values.controller.affinity | indent 8 }} +{{- end }} +{{- if .Values.controller.priorityClassName }} + priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} serviceAccountName: {{ include "nginx-ingress.serviceAccountName" . }} hostNetwork: {{ .Values.controller.hostNetwork }} diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index e63b21c5bf..05d4100d21 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -209,6 +209,9 @@ controller: ## The annotations of the Ingress Controller pod. annotations: {} + ## The PriorityClass of the ingress controller pods. + priorityClassName: + rbac: ## Configures RBAC. create: true