From 64afcbb6b8c2ac23aa5fde45a5d0e5f5ca54d20a Mon Sep 17 00:00:00 2001 From: Zenghui Shi Date: Mon, 23 Aug 2021 10:10:23 +0800 Subject: [PATCH] Use CRD v1 in SriovNetworkPoolConfig patches --- ...ainjection_in_sriovnetworkpoolconfigs.yaml | 3 +-- .../webhook_in_sriovnetworkpoolconfigs.yaml | 21 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/config/crd/patches/cainjection_in_sriovnetworkpoolconfigs.yaml b/config/crd/patches/cainjection_in_sriovnetworkpoolconfigs.yaml index 8410ee441..b84d31733 100644 --- a/config/crd/patches/cainjection_in_sriovnetworkpoolconfigs.yaml +++ b/config/crd/patches/cainjection_in_sriovnetworkpoolconfigs.yaml @@ -1,6 +1,5 @@ # The following patch adds a directive for certmanager to inject CA into the CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: diff --git a/config/crd/patches/webhook_in_sriovnetworkpoolconfigs.yaml b/config/crd/patches/webhook_in_sriovnetworkpoolconfigs.yaml index 4dd610c65..3a78bc4a2 100644 --- a/config/crd/patches/webhook_in_sriovnetworkpoolconfigs.yaml +++ b/config/crd/patches/webhook_in_sriovnetworkpoolconfigs.yaml @@ -1,17 +1,16 @@ -# The following patch enables conversion webhook for CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: sriovnetworkpoolconfigs.sriovnetwork.openshift.io spec: conversion: strategy: Webhook - webhookClientConfig: - # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, - # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) - caBundle: Cg== - service: - namespace: system - name: webhook-service - path: /convert + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1