Skip to content

Commit

Permalink
docs: add schema.yaml entries for networkPolicy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Oct 20, 2020
1 parent 540c408 commit 11d20af
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions jupyterhub/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,50 @@ properties:
pullSecrets:
- my-k8s-secret-with-image-registry-credentials
```
networkPolicy: &networkPolicy-spec
type: object
description: |
This configuration regards the creation and configuration of a k8s
_NetworkPolicy resource_.
properties:
enabled:
type: bool
description: |
Toggle the creation of the NetworkPolicy resource for this pod.
ingress:
type: list
description: |
Additional ingress rules to add.
egress:
type: list
description: |
Additional egress rules to add.
interNamespaceAccessLabels:
type: string
enum:
- accept
- ignore
description: |
This configuration option determines if both namespaces and pods
in other namespaces that have specific access labels, should be
accepted to allow ingress (set to `accept`), or, if the labels are
to be ignored when applied outside the local namespace (set to
`ignore`).
The available access labels for respective NetworkPolicy resources
are:
- `hub.jupyter.org/network-access-hub: "true"` (hub)
- `hub.jupyter.org/network-access-proxy-http: "true"` (proxy.chp, proxy.traefik)
- `hub.jupyter.org/network-access-proxy-api: "true"` (proxy.chp)
- `hub.jupyter.org/network-access-singleuser: "true"` (singleuser)
allowedIngressPorts:
type: list
description: |
A rule to allow ingress on these ports will be added no matter
what the origin of the request is. The default setting for
`proxy.chp` and `proxy.traefik`'s networkPolicy configuration is
`[http, https]`, while it is `[]` for other networkPolicies.
db:
type: object
properties:
Expand Down Expand Up @@ -535,6 +579,7 @@ properties:
Configure the configurable-http-proxy (chp) pod managed by jupyterhub to route traffic
both to itself and to user pods.
properties:
networkPolicy: *networkPolicy-spec
extraCommandLineFlags:
type: list
description: |
Expand Down Expand Up @@ -799,6 +844,7 @@ properties:
description: |
Configure the traefik proxy used to terminate TLS when 'autohttps' is enabled
properties:
networkPolicy: *networkPolicy-spec
extraEnv:
type: object
description: |
Expand Down Expand Up @@ -873,6 +919,7 @@ properties:
description: |
Options for customizing the environment that is provided to the users after they log in.
properties:
networkPolicy: *networkPolicy-spec
podNameTemplate:
type: string
description: |
Expand Down

0 comments on commit 11d20af

Please sign in to comment.