ceph: adds scripts and components to support admission controllers

adds deploy.sh script to deploy validatingwebhookconfiguration and create secrets.
adds new command ceph admission-controller to start webhook servers.
adds validation for various rook custom resources

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
This commit is contained in:
Vineet Badrinath committed 2020-06-24 14:59:00 +05:30
1 parent 675c9673ca
commit ce1003aef8
27 files changed
+1088 -19

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Original script found at: https://github.com/morvencao/kube-mutating-webhook-tutorial/blob/master/deployment/webhook-patch-ca-bundle.sh
set -o errexit
set -o nounset
set -o pipefail
export CA_BUNDLE=$(kubectl get configmap -n kube-system extension-apiserver-authentication -o=jsonpath='{.data.client-ca-file}' | base64 | tr -d '\n')
if command -v envsubst >/dev/null 2>&1; then
envsubst
else
sed -e "s|\${CA_BUNDLE}|${CA_BUNDLE}|g"
fi