From 172a9add674e8b3c6b0456e18009686eaa4f661c Mon Sep 17 00:00:00 2001 From: Jakob Karalus Date: Fri, 17 Mar 2017 15:55:13 +0100 Subject: [PATCH] Added example and docu for hostPort ranges --- docs/user-guide/pod-security-policy/index.md | 3 +++ docs/user-guide/pod-security-policy/psp.yaml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/docs/user-guide/pod-security-policy/index.md b/docs/user-guide/pod-security-policy/index.md index d3b40902ea..47548b64c2 100644 --- a/docs/user-guide/pod-security-policy/index.md +++ b/docs/user-guide/pod-security-policy/index.md @@ -111,6 +111,9 @@ to the volume sources that are defined when creating a volume: The recommended minimum set of allowed volumes for new PSPs are configMap, downwardAPI, emptyDir, persistentVolumeClaim, and secret. +### Host Network + - *HostPorts*, default `empty`. List of `HostPortRange`, defined by `min`(inclusive) and `max`(inclusive), which define the allowed host ports. + ## Admission _Admission control_ with `PodSecurityPolicy` allows for control over the creation of resources diff --git a/docs/user-guide/pod-security-policy/psp.yaml b/docs/user-guide/pod-security-policy/psp.yaml index a16c1f350d..b2cdded9e4 100644 --- a/docs/user-guide/pod-security-policy/psp.yaml +++ b/docs/user-guide/pod-security-policy/psp.yaml @@ -17,6 +17,12 @@ "fsGroup": { "rule": "RunAsAny" }, + "HostPorts": [ + { + "min": 8000, + "max": 8080 + } + ], "volumes": ["*"] } }