From 1402048a44bebff507f8f733ccf2f4b8ab758f07 Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Mon, 9 Dec 2024 16:07:04 +0200 Subject: [PATCH] clean up config/crd --- config/crd/kustomization.yaml | 7 ++----- config/crd/patches/cainjection_in_k6s.yaml | 9 --------- config/crd/patches/webhook_in_k6s.yaml | 18 ------------------ 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 config/crd/patches/cainjection_in_k6s.yaml delete mode 100644 config/crd/patches/webhook_in_k6s.yaml diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 284cc795..ce0e84c8 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -3,7 +3,6 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: - - bases/k6.io_k6s.yaml - bases/k6.io_privateloadzones.yaml - bases/k6.io_testruns.yaml # +kubebuilder:scaffold:crdkustomizeresource @@ -11,15 +10,13 @@ resources: patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -# - patches/webhook_in_k6s.yaml -# - patches/webhook_in_k6tests.yaml +# - patches/webhook_in_testruns.yaml #- patches/webhook_in_privateloadzones.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD -# - patches/cainjection_in_k6s.yaml -# - patches/cainjection_in_k6tests.yaml +# - patches/cainjection_in_testruns.yaml #- patches/cainjection_in_privateloadzones.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch diff --git a/config/crd/patches/cainjection_in_k6s.yaml b/config/crd/patches/cainjection_in_k6s.yaml deleted file mode 100644 index 9c2fbc2d..00000000 --- a/config/crd/patches/cainjection_in_k6s.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# 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 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: k6s.k6.io diff --git a/config/crd/patches/webhook_in_k6s.yaml b/config/crd/patches/webhook_in_k6s.yaml deleted file mode 100644 index 55c6a590..00000000 --- a/config/crd/patches/webhook_in_k6s.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# The following patch enables conversion webhook for CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: k6s.k6.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