-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David J. M. Karlsen <[email protected]>
- Loading branch information
1 parent
a865cb5
commit 86dcb55
Showing
1 changed file
with
0 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1 @@ | ||
Anchore admission controller is now installed. | ||
|
||
Create a validating webhook resources to start enforcement using the included script: | ||
|
||
./files/get_validating_webhook_config.sh <releasename> | ||
kubectl apply -f validating-webhook.yaml | ||
|
||
|
||
KUBE_CA=$(kubectl config view --minify=true --flatten -o json | jq '.clusters[0].cluster."certificate-authority-data"' -r) | ||
cat > validating-webhook.yaml <<EOF | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
name: {{ template "anchore-admission-controller.fullname" . }}.admission.anchore.io | ||
webhooks: | ||
- name: {{ template "anchore-admission-controller.fullname" . }}.admission.anchore.io | ||
clientConfig: | ||
service: | ||
namespace: default | ||
name: kubernetes | ||
path: /apis/admission.anchore.io/v1beta1/imagechecks | ||
caBundle: $KUBE_CA | ||
rules: | ||
- operations: | ||
- CREATE | ||
apiGroups: | ||
- "" | ||
apiVersions: | ||
- "*" | ||
resources: | ||
- pods | ||
failurePolicy: Fail | ||
# Uncomment this and customize to exclude specific namespaces from the validation requirement | ||
# namespaceSelector: | ||
# matchExpressions: | ||
# - key: exclude.admission.anchore.io | ||
# operator: NotIn | ||
# values: ["true"] | ||
EOF | ||
|
||
|
||
|
||
|