core: remove caBundle value from webhook

now, we don't require caBundle values to verify in
webhook config.

Signed-off-by: subhamkrai <srai@redhat.com>
This commit is contained in:
subhamkrai committed 2022-03-09 09:11:02 +05:30
1 parent 7ef5a0462f
commit 536a73af64
3 files changed
-19

No files matched your search

@@ -111,7 +111,6 @@ echo "Successfully created Issuer and Certificate"
echo "Deploying webhook config"
< "${BASE_DIR}"/webhook-config.yaml \
"${BASE_DIR}"/webhook-patch-ca-bundle.sh | \
sed -e "s|\${NAMESPACE}|${NAMESPACE}|g" | \
sed -e "s|\${WEBHOOK_CONFIG_NAME}|${WEBHOOK_CONFIG_NAME}|g" | \
sed -e "s|\${SERVICE_NAME}|${SERVICE_NAME}|g" | \
-3
View File
@@ -16,7 +16,6 @@ webhooks:
name: ${SERVICE_NAME}
namespace: ${NAMESPACE}
path: /validate-ceph-rook-io-v1-cephcluster
caBundle: ${CA_BUNDLE}
admissionReviewVersions: ["v1", "v1beta1"] # API server will try to use first version in the list which it supports.
sideEffects: None
timeoutSeconds: 5
@@ -31,7 +30,6 @@ webhooks:
name: ${SERVICE_NAME}
namespace: ${NAMESPACE}
path: /validate-ceph-rook-io-v1-cephblockpool
caBundle: ${CA_BUNDLE}
admissionReviewVersions: ["v1", "v1beta1"] # API server will try to use first version in the list which it supports.
sideEffects: None
timeoutSeconds: 5
@@ -46,7 +44,6 @@ webhooks:
name: ${SERVICE_NAME}
namespace: ${NAMESPACE}
path: /validate-ceph-rook-io-v1-cephobjectstore
caBundle: ${CA_BUNDLE}
admissionReviewVersions: ["v1", "v1beta1"] # API server will try to use first version in the list which it supports.
sideEffects: None
timeoutSeconds: 5
-15
View File
@@ -1,15 +0,0 @@
#!/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
CA_BUNDLE=$(kubectl get configmap -n kube-system extension-apiserver-authentication -o=jsonpath='{.data.client-ca-file}' | base64 | tr -d '\n')
export CA_BUNDLE
if command -v envsubst >/dev/null 2>&1; then
envsubst
else
sed -e "s|\${CA_BUNDLE}|${CA_BUNDLE}|g"
fi