Merge pull request #6940 from subhamkrai/admission-controller-v1

ceph: update admission controller to v1 from v1beta1
This commit is contained in:
Travis Nielsen authored and GitHub committed 2021-01-21 10:53:06 -07:00
commit d6307f07d8
4 files changed
+9 -7

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ Using the above approach, the dev/admins will have the responsibility of rotatin
Below is an excerpt of what a ValidatingWebhookConfig looks like
```
apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: demo-webhook
+5 -2
View File
@@ -123,7 +123,10 @@ func (h *CephInstaller) CreateCephOperator(namespace string) (err error) {
return fmt.Errorf("failed to create namespace %q. %v", namespace, err)
}
}
if !utils.IsPlatformOpenShift() {
// disable admission controller for upgrade test as api version v1 require minimum v0.7 controller runtime and upgrade test still using
// older version of controller runtime.
if !utils.IsPlatformOpenShift() && namespace != "upgrade-ns-system" {
err = h.startAdmissionController(namespace)
if err != nil {
return fmt.Errorf("Failed to start admission controllers: %v", err)
@@ -515,7 +518,7 @@ func (h *CephInstaller) InstallRook(namespace, storeType string, usePVC bool, st
}
logger.Infof("installed rook operator and cluster : %s on k8s %s", namespace, h.k8sVersion)
if !utils.IsPlatformOpenShift() && h.k8shelper.VersionAtLeast("v1.15.0") {
if !utils.IsPlatformOpenShift() && h.k8shelper.VersionAtLeast("v1.15.0") && namespace != "upgrade-ns" {
if !h.k8shelper.IsPodInExpectedState("rook-ceph-admission-controller", onamespace, "Running") {
assert.Fail(h.T(), "admission controller is not running")
}
+3 -3
View File
@@ -1,4 +1,4 @@
apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: ${WEBHOOK_CONFIG_NAME}
@@ -16,7 +16,7 @@ webhooks:
namespace: ${NAMESPACE}
path: /validate-ceph-rook-io-v1-cephcluster
caBundle: ${CA_BUNDLE}
admissionReviewVersions: ["v1beta1"]
admissionReviewVersions: ["v1", "v1beta1"] # API server will try to use first version in the list which it supports.
sideEffects: None
timeoutSeconds: 5
- name: cephblockpool-wh-${SERVICE_NAME}-${NAMESPACE}.rook.io
@@ -31,6 +31,6 @@ webhooks:
namespace: ${NAMESPACE}
path: /validate-ceph-rook-io-v1-cephblockpool
caBundle: ${CA_BUNDLE}
admissionReviewVersions: ["v1beta1"]
admissionReviewVersions: ["v1", "v1beta1"] # API server will try to use first version in the list which it supports.
sideEffects: None
timeoutSeconds: 5
@@ -132,4 +132,3 @@ kubectl create secret generic ${secret} \
--from-file=tls.crt=${tmpdir}/server-cert.pem \
--dry-run -o yaml |
kubectl -n ${namespace} apply -f -