diff --git a/deployments/helm-chart/Chart.yaml b/deployments/helm-chart/Chart.yaml index 1422cd51be..247ad1250c 100644 --- a/deployments/helm-chart/Chart.yaml +++ b/deployments/helm-chart/Chart.yaml @@ -1,5 +1,5 @@ name: nginx-ingress -version: 0.2.0 +version: 0.3.0 appVersion: edge description: NGINX Ingress Controller sources: diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index 476f515f83..b69e785374 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -71,7 +71,8 @@ Parameter | Description | Default `controller.defaultTLS.secret` | The secret with a TLS certificate and key for the default HTTPS server. The value must follow the following format: `/`. Used as an alternative to specifiying a certifcate and key using `controller.defaultTLS.cert` and `controller.defaultTLS.key` parameters. | None `controller.nodeSelector` | The node selector for pod assignment for the Ingress controller pods. | { } `controller.terminationGracePeriodSeconds` | The termination grace period of the Ingress controller pod. | 30 -`controller.tolerations` | The tolerations required for the IBM Cloud Private installation. | None +`controller.tolerations` | The tolerations of the Ingress controller pods. | [] +`controller.affinity` | The affinity of the Ingress controller pods. | { } `controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1 `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 diff --git a/deployments/helm-chart/templates/controller-daemonset.yaml b/deployments/helm-chart/templates/controller-daemonset.yaml index ceba609cf3..7fe9f2c5c9 100644 --- a/deployments/helm-chart/templates/controller-daemonset.yaml +++ b/deployments/helm-chart/templates/controller-daemonset.yaml @@ -28,13 +28,13 @@ spec: nodeSelector: {{ toYaml .Values.controller.nodeSelector | indent 8 }} {{- end }} -{{- if eq .Values.controller.tolerations "icp" }} +{{- if .Values.controller.tolerations }} tolerations: - - key: "dedicated" - operator: "Exists" - effect: "NoSchedule" - - key: "CriticalAddonsOnly" - operator: "Exists" +{{ toYaml .Values.controller.tolerations | indent 6 }} +{{- end }} +{{- if .Values.controller.affinity }} + affinity: +{{ toYaml .Values.controller.affinity | indent 8 }} {{- 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 5de7de071b..00932d441f 100644 --- a/deployments/helm-chart/templates/controller-deployment.yaml +++ b/deployments/helm-chart/templates/controller-deployment.yaml @@ -23,6 +23,18 @@ spec: prometheus.io/port: "{{ .Values.prometheus.port }}" {{- end }} spec: +{{- if .Values.controller.nodeSelector }} + nodeSelector: +{{ toYaml .Values.controller.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.controller.tolerations }} + tolerations: +{{ toYaml .Values.controller.tolerations | indent 6 }} +{{- end }} +{{- if .Values.controller.affinity }} + affinity: +{{ toYaml .Values.controller.affinity | indent 8 }} +{{- end }} serviceAccountName: {{ .Values.controller.serviceAccount.name }} hostNetwork: {{ .Values.controller.hostNetwork }} containers: diff --git a/deployments/helm-chart/values-icp.yaml b/deployments/helm-chart/values-icp.yaml index 2b30fdd24d..71b0b7ab37 100644 --- a/deployments/helm-chart/values-icp.yaml +++ b/deployments/helm-chart/values-icp.yaml @@ -4,7 +4,13 @@ controller: image: repository: mycluster.icp:8500/kube-system/nginx-plus-ingress tag: "edge" - nodeSelector: { beta.kubernetes.io/arch: "amd64", - proxy: "true" } + nodeSelector: + beta.kubernetes.io/arch: "amd64" + proxy: true terminationGracePeriodSeconds: 60 - tolerations: "icp" + tolerations: + - key: "dedicated" + operator: "Exists" + effect: "NoSchedule" + - key: "CriticalAddonsOnly" + operator: "Exists" diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index 0df41e79bb..b58eec0a75 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -17,7 +17,8 @@ controller: # secret: / nodeSelector: {} terminationGracePeriodSeconds: 30 - tolerations: "" + tolerations: [] + affinity: {} replicaCount: 1 ingressClass: nginx useIngressClassOnly: false