Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Adding support for dynamic tolerations (alpha/beta) and nodeSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
djsly committed Jun 29, 2017
1 parent bdac1af commit 6bcd73c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/traefik/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 2 additions & 0 deletions stable/traefik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
11 changes: 11 additions & 0 deletions stable/traefik/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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" . }}
Expand Down Expand Up @@ -89,3 +96,7 @@ spec:
emptyDir: {}
{{- end }}
{{- end }}
{{- if and (.Values.tolerations) (ge .Capabilities.KubeVersion.Minor "6") }}
tolerations:
{{ toYaml .Values.tolerations | indent 6 }}
{{- end }}
7 changes: 7 additions & 0 deletions stable/traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bcd73c

Please sign in to comment.