Add webhook information for OpenShift (#3663)

* Update index.md

* Updated re: linter and cr comments
This commit is contained in:
Brian Avery 2019-03-16 01:37:39 -04:00 committed by istio-bot
parent d3d376a2e4
commit ce2ddf4d26
1 changed files with 34 additions and 0 deletions

View File

@ -39,3 +39,37 @@ constraints as part of sidecar injection:
{{< text bash >}} {{< text bash >}}
$ oc adm policy add-scc-to-user privileged -z default -n <target-namespace> $ oc adm policy add-scc-to-user privileged -z default -n <target-namespace>
{{< /text >}} {{< /text >}}
## Automatic Injection
Webhook and certificate signing requests support must be enabled for [automatic injection](/docs/setup/kubernetes/additional-setup/sidecar-injection/#automatic-sidecar-injection) to work. Modify the master configuration file on the master node for the cluster as follows.
{{< tip >}}
By default, the master configuration file can be found in /etc/origin/master/master-config.yaml.
{{< /tip >}}
In the same directory as the master configuration file, create a file named master-config.patch with the following contents:
{{< text yaml >}}
admissionConfig:
pluginConfig:
MutatingAdmissionWebhook:
configuration:
apiVersion: apiserver.config.k8s.io/v1alpha1
kubeConfigFile: /dev/null
kind: WebhookAdmission
ValidatingAdmissionWebhook:
configuration:
apiVersion: apiserver.config.k8s.io/v1alpha1
kubeConfigFile: /dev/null
kind: WebhookAdmission
{{< /text >}}
In the same directory, execute:
{{< text bash >}}
$ cp -p master-config.yaml master-config.yaml.prepatch
$ oc ex config patch master-config.yaml.prepatch -p "$(cat master-config.patch)" > master-config.yaml
$ master-restart api
$ master-restart controllers
{{< /text >}}