diff --git a/src/go/k8s/config/crd/kustomization.yaml b/src/go/k8s/config/crd/kustomization.yaml index ac7d33bf1a29..3f6b631bc341 100644 --- a/src/go/k8s/config/crd/kustomization.yaml +++ b/src/go/k8s/config/crd/kustomization.yaml @@ -1,29 +1,47 @@ # This kustomization.yaml is not intended to be run by itself, # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +#+kubebuilder:scaffold:crdkustomizeresource resources: - bases/redpanda.vectorized.io_clusters.yaml - bases/redpanda.vectorized.io_consoles.yaml - bases/cluster.redpanda.com_redpandas.yaml - bases/cluster.redpanda.com_topics.yaml -#+kubebuilder:scaffold:crdkustomizeresource - bases/toolkit.fluxcd.io/helm-controller.yaml - bases/toolkit.fluxcd.io/source-controller.yaml -patches: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -- path: patches/webhook_in_clusters.yaml -- path: patches/webhook_in_redpanda_consoles.yaml -- path: patches/webhook_in_cluster.redpanda.com_topics.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: +- path: patches/webhook_in_clusters.yaml +- path: patches/webhook_in_redpanda_consoles.yaml +- path: patches/webhook_in_cluster.redpanda.com_topics.yaml - path: patches/cainjection_in_clusters.yaml - path: patches/cainjection_in_redpanda_consoles.yaml - path: patches/cainjection_in_cluster.redpanda.com_topics.yaml #+kubebuilder:scaffold:crdkustomizecainjectionpatch +- path: patches/re-add-checksum-field_in_source.toolkit.fluxcd.io.yaml + target: + kind: CustomResourceDefinition + name: "^(buckets|helmcharts|helmrepositories).source.toolkit.fluxcd.io$" +- path: patches/re-add-checksum-field_in_gitrepositories.source.toolkit.fluxcd.io.yaml + target: + kind: CustomResourceDefinition + name: gitrepositories.source.toolkit.fluxcd.io +- path: patches/re-add-checksum-field_in_ocirepositories.source.toolkit.fluxcd.io.yaml + target: + kind: CustomResourceDefinition + name: ocirepositories.source.toolkit.fluxcd.io + + +# patches CRD to re-add removed fields from beta CRDs # the following config is for teaching kustomize how to do kustomization for CRDs. configurations: diff --git a/src/go/k8s/config/crd/patches/re-add-checksum-field_in_gitrepositories.source.toolkit.fluxcd.io.yaml b/src/go/k8s/config/crd/patches/re-add-checksum-field_in_gitrepositories.source.toolkit.fluxcd.io.yaml new file mode 100644 index 000000000000..38632d50ee96 --- /dev/null +++ b/src/go/k8s/config/crd/patches/re-add-checksum-field_in_gitrepositories.source.toolkit.fluxcd.io.yaml @@ -0,0 +1,14 @@ +--- +# The following patch adds the spec.versions.v1beta2.schema.openAPIV3Schema.properties.status.properties.artifact.properties.checksum property +# and the spec.versions.v1beta2.schema.openAPIV3Schema.properties.status.properties.includedArtifacts.items.properties.checksum property +# that was removed +- op: add + path: /spec/versions/1/schema/openAPIV3Schema/properties/status/properties/artifact/properties/checksum + value: + type: string + description: Checksum is the SHA256 checksum of the Artifact file (obsolete) +- op: add + path: /spec/versions/1/schema/openAPIV3Schema/properties/status/properties/includedArtifacts/items/properties/checksum + value: + type: string + description: Checksum is the SHA256 checksum of the Artifact file (obsolete) diff --git a/src/go/k8s/config/crd/patches/re-add-checksum-field_in_ocirepositories.source.toolkit.fluxcd.io.yaml b/src/go/k8s/config/crd/patches/re-add-checksum-field_in_ocirepositories.source.toolkit.fluxcd.io.yaml new file mode 100644 index 000000000000..0b586aaa3e82 --- /dev/null +++ b/src/go/k8s/config/crd/patches/re-add-checksum-field_in_ocirepositories.source.toolkit.fluxcd.io.yaml @@ -0,0 +1,8 @@ +--- +# The following patch adds the spec.versions.v1beta2.schema.openAPIV3Schema.properties.status.properties.artifact.properties.checksum property that was removed +# apiVersion: apiextensions.k8s.io/v1 +- op: replace + path: /spec/versions/0/schema/openAPIV3Schema/properties/status/properties/artifact/properties/checksum + value: + type: string + description: Checksum is the SHA256 checksum of the Artifact file (obsolete) diff --git a/src/go/k8s/config/crd/patches/re-add-checksum-field_in_source.toolkit.fluxcd.io.yaml b/src/go/k8s/config/crd/patches/re-add-checksum-field_in_source.toolkit.fluxcd.io.yaml new file mode 100644 index 000000000000..3d705dfe1bb8 --- /dev/null +++ b/src/go/k8s/config/crd/patches/re-add-checksum-field_in_source.toolkit.fluxcd.io.yaml @@ -0,0 +1,13 @@ +--- +# The following patch adds the spec.versions.v1beta2.schema.openAPIV3Schema.properties.status.properties.artifact.properties.checksum property that was removed +# apiVersion: apiextensions.k8s.io/v1 +- op: replace + path: /spec/versions/1/schema/openAPIV3Schema/properties/status/properties/artifact/properties/checksum + value: + type: string + description: Checksum is the SHA256 checksum of the Artifact file (obsolete) +- op: replace + path: /spec/versions/0/schema/openAPIV3Schema/properties/status/properties/artifact/properties/checksum + value: + type: string + description: Checksum is the SHA256 checksum of the Artifact file (obsolete)