diff --git a/stable/traefik/Chart.yaml b/stable/traefik/Chart.yaml index 230cf4b0f755..8693b1f99972 100755 --- a/stable/traefik/Chart.yaml +++ b/stable/traefik/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: traefik -version: 1.5.0 +version: 1.6.0 appVersion: 1.3.1 description: A Traefik based Kubernetes ingress controller with Let's Encrypt support keywords: diff --git a/stable/traefik/README.md b/stable/traefik/README.md index afde8a00517b..d81df221928f 100644 --- a/stable/traefik/README.md +++ b/stable/traefik/README.md @@ -97,6 +97,8 @@ The following tables lists the configurable parameters of the Traefik chart and | `cpuLimit` | CPU limit per Traefik pod | `200m` | | `memoryLimit` | Memory limit per Traefik pod | `30Mi` | | `rbac.enabled` | Whether to enable RBAC with a specific cluster role and binding for Traefik | `false` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | List of node taints to tolerate | `[]` | | `ssl.enabled` | Whether to enable HTTPS | `false` | | `ssl.enforced` | Whether to redirect HTTP requests to HTTPS | `false` | | `ssl.defaultCert` | Base64 encoded default certficate | A self-signed certificate | diff --git a/stable/traefik/templates/deployment.yaml b/stable/traefik/templates/deployment.yaml index 10a57e7329c7..0156cf28e81d 100644 --- a/stable/traefik/templates/deployment.yaml +++ b/stable/traefik/templates/deployment.yaml @@ -15,6 +15,9 @@ spec: template: metadata: labels: + {{- if and (.Values.tolerations) (le .Capabilities.KubeVersion.Minor "5") }} + scheduler.alpha.kubernetes.io/tolerations: '{{ toJson .Values.tolerations }}' + {{- end }} app: {{ template "fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" @@ -26,6 +29,10 @@ spec: serviceAccountName: default {{- end }} terminationGracePeriodSeconds: 60 + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} containers: - image: {{ .Values.image }}:{{ .Values.imageTag }} name: {{ template "fullname" . }} @@ -89,3 +96,7 @@ spec: emptyDir: {} {{- end }} {{- end }} + {{- if and (.Values.tolerations) (ge .Capabilities.KubeVersion.Minor "6") }} + tolerations: +{{ toYaml .Values.tolerations | indent 6 }} + {{- end }} diff --git a/stable/traefik/values.yaml b/stable/traefik/values.yaml index 136050d6bc2d..29d8011f083e 100644 --- a/stable/traefik/values.yaml +++ b/stable/traefik/values.yaml @@ -7,6 +7,13 @@ cpuRequest: 100m memoryRequest: 20Mi cpuLimit: 100m memoryLimit: 30Mi +nodeSelector: {} + #key: value +tolerations: [] + #- key: "key" + #operator: "Equal|Exists" + #value: "value" + #effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" ssl: enabled: false enforced: false