Skip to content

Commit

Permalink
Merge pull request #1862 from yuvipanda/traefik-labels
Browse files Browse the repository at this point in the history
Allow adding extra labels to the traefik pod
  • Loading branch information
consideRatio committed Oct 21, 2020
2 parents 49536ae + 5215bf7 commit d1cd6a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jupyterhub/schema.yaml
Expand Up @@ -799,6 +799,13 @@ properties:
description: |
Configure the traefik proxy used to terminate TLS when 'autohttps' is enabled
properties:
labels:
type: object
description: |
Extra labels to add to the traefik pod.
See the [Kubernetes docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
to learn more about labels.
extraEnv:
type: object
description: |
Expand Down
3 changes: 3 additions & 0 deletions jupyterhub/templates/proxy/autohttps/deployment.yaml
Expand Up @@ -17,6 +17,9 @@ spec:
labels:
{{- include "jupyterhub.matchLabels" . | nindent 8 }}
hub.jupyter.org/network-access-proxy-http: "true"
{{- if .Values.proxy.traefik.labels }}
{{- .Values.proxy.traefik.labels | toYaml | trimSuffix "\n" | nindent 8 }}
{{- end }}
annotations:
# Only force a restart through a change to this checksum when the static
# configuration is changed, as the dynamic can be updated after start.
Expand Down
2 changes: 2 additions & 0 deletions tools/templates/lint-and-validate-values.yaml
Expand Up @@ -128,6 +128,8 @@ proxy:
value: "mock-taint-to-tolerates-value"
effect: "NoExecute"
traefik:
labels:
hub.jupyter.org/test-label: mock
resources:
requests:
cpu: 200m
Expand Down

0 comments on commit d1cd6a9

Please sign in to comment.