Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema: force labels and annotations to be strings #2283

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions jupyterhub/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ properties:
properties:
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: &labels-and-annotations-patternProperties
".*":
type: string
description: |
Annotations to apply to the PVC containing the sqlite database.

Expand Down Expand Up @@ -752,7 +755,8 @@ properties:
Password for the database when `hub.db.type` is mysql or postgres.
labels:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Extra labels to add to the hub pod.

Expand Down Expand Up @@ -900,7 +904,8 @@ properties:
The nodePort to deploy the hub service on.
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Kubernetes annotations to apply to the hub service.
extraPorts:
Expand Down Expand Up @@ -1013,7 +1018,8 @@ properties:
description: *jupyterhub-native-config-description
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
K8s annotations for the hub pod.
authenticatePrometheus:
Expand Down Expand Up @@ -1141,7 +1147,8 @@ properties:
properties:
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Kubernetes annotations to apply to the k8s ServiceAccount.

Expand Down Expand Up @@ -1285,15 +1292,17 @@ properties:
Default `LoadBalancer`. See `hub.service.type` for supported values.
labels:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Extra labels to add to the proxy service.

See the [Kubernetes docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
to learn more about labels.
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Annotations to apply to the service that is exposing the proxy.

Expand Down Expand Up @@ -1454,7 +1463,8 @@ properties:
properties:
labels:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Extra labels to add to the traefik pod.

Expand Down Expand Up @@ -1559,7 +1569,8 @@ properties:
serviceAccount: *serviceAccount
labels:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
K8s labels for the proxy pod.

Expand All @@ -1569,7 +1580,8 @@ properties:
```
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
K8s annotations for the proxy pod.

Expand Down Expand Up @@ -1847,14 +1859,16 @@ properties:
description: *kubespawner-native-config-description
extraAnnotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: *kubespawner-native-config-description
extraContainers:
type: array
description: *kubespawner-native-config-description
extraLabels:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: *kubespawner-native-config-description
extraPodConfig:
type: object
Expand Down Expand Up @@ -1961,7 +1975,8 @@ properties:
name to reference from the containers volumeMounts section.
extraLabels:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Configures `KubeSpawner.storage_extra_labels`. Note that these
labels are set on the PVC during creation only and won't be
Expand Down Expand Up @@ -2259,7 +2274,8 @@ properties:
for more details.
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Annotations to apply to the Ingress resource.

Expand Down Expand Up @@ -2292,7 +2308,8 @@ properties:
properties:
annotations:
type: object
additionalProperties: true
additionalProperties: false
patternProperties: *labels-and-annotations-patternProperties
description: |
Annotations to apply to the hook and continous image puller pods. One example use case is to
disable istio sidecars which could interfere with the image pulling.
Expand Down