From 4edbe7449d5bc7ef7b116febfcf5ad0307dba594 Mon Sep 17 00:00:00 2001 From: "Charlie R.C" Date: Fri, 23 Jun 2017 05:19:28 +0800 Subject: [PATCH] add PodNodeSelector to admission-controllers (#3691) --- docs/admin/admission-controllers.md | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/admin/admission-controllers.md b/docs/admin/admission-controllers.md index 34c945655c..ba74a9a16e 100644 --- a/docs/admin/admission-controllers.md +++ b/docs/admin/admission-controllers.md @@ -257,6 +257,36 @@ storage classes and how to mark a storage class as default. This plug-in sets the default forgiveness toleration for pods, which have no forgiveness tolerations, to tolerate the taints `notready:NoExecute` and `unreachable:NoExecute` for 5 minutes. +### PodNodeSelector + +This plug-in defaults and limits what node selectors may be used within a namespace by reading a namespace annotation and a global configuration. + +#### Configuration File Format +PodNodeSelector uses the admission config file `--admission-control-config-file` to set configuration options for the behavior of the backend. + +Note that the configuration file format will move to a versioned file in a future release. + +This file may be json or yaml and has the following format: + +```yaml +podNodeSelectorPluginConfig: + clusterDefaultNodeSelector: + namespace1: + namespace2: +``` + +#### Configuration Annotation Format +PodNodeSelector uses the annotation key `scheduler.alpha.kubernetes.io/node-selector` to assign node selectors to namespaces. + +```yaml +apiVersion: v1 +kind: Namespace +metadata: + annotations: + scheduler.alpha.kubernetes.io/node-selector: + name: namespace3 +``` + ### PodSecurityPolicy This plug-in acts on creation and modification of the pod and determines if it should be admitted