Skip to content

Commit

Permalink
Update webhook admissions
Browse files Browse the repository at this point in the history
  • Loading branch information
xeviknal committed Apr 9, 2019
1 parent 6cd2d3b commit 0aa262d
Showing 1 changed file with 5 additions and 39 deletions.
44 changes: 5 additions & 39 deletions docs/install/Knative-with-Minishift.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ minishift addons enable admin-user
# Allow the containers to be run with uid 0
minishift addons enable anyuid

# Enable Admission Controller Webhook
minishift addon enable admissions-webhook

# start minishift
minishift start
```
Expand All @@ -67,6 +70,8 @@ minishift start
that is usually after successful start of Minishift
- The [addon](https://docs.okd.io/latest/minishift/using/addons.html) **anyuid**
allows the `default` service account to run the application with uid `0`
- The [addon](https://docs.okd.io/latest/minishift/using/addons.html) **admissions-webhook**
allows cluster to register admissions webhooks

- The command `minishift profile set knative` is required every time you start
and stop minishift to make sure that you are on right `knative` minishift
Expand All @@ -86,45 +91,6 @@ minishift oc-env

## Preparing Knative Deployment

### Enable Admission Controller Webhook

To be able to deploy and run serverless Knative applications, its required that
you must enable the
[Admission Controller Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/).

Run the following command to make OpenShift (run via minishift) to be configured
for
[Admission Controller Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/):

```shell
# Enable admission controller webhooks
# The configuration stanzas below look weird and are just to workaround for:
# https://bugzilla.redhat.com/show_bug.cgi?id=1635918
minishift openshift config set --target=kube --patch '{
"admissionConfig": {
"pluginConfig": {
"ValidatingAdmissionWebhook": {
"configuration": {
"apiVersion": "apiserver.config.k8s.io/v1alpha1",
"kind": "WebhookAdmission",
"kubeConfigFile": "/dev/null"
}
},
"MutatingAdmissionWebhook": {
"configuration": {
"apiVersion": "apiserver.config.k8s.io/v1alpha1",
"kind": "WebhookAdmission",
"kubeConfigFile": "/dev/null"
}
}
}
}
}'

# wait until the kube-apiserver is restarted
until oc login -u admin -p admin; do sleep 5; done;
```

### Configuring a OpenShift project

1. Set up the project **myproject** for use with Knative applications.
Expand Down

0 comments on commit 0aa262d

Please sign in to comment.