From 203fa9365dcffd221684f91eb99e2b098b5527ac Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Thu, 16 Nov 2023 15:21:21 +0100 Subject: [PATCH] Add deprecation warnings for EventType v1beta1 (#7453) * Change structure of crd versions for ET Signed-off-by: Matthias Wessendorf * :lipstick: Add deprecation warning to v1beta1 resource version Signed-off-by: Matthias Wessendorf --------- Signed-off-by: Matthias Wessendorf --- config/core/resources/eventtype.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/config/core/resources/eventtype.yaml b/config/core/resources/eventtype.yaml index 3d1bc934f3c..1bc820cb582 100644 --- a/config/core/resources/eventtype.yaml +++ b/config/core/resources/eventtype.yaml @@ -23,9 +23,9 @@ spec: group: eventing.knative.dev versions: - &version - name: v1beta1 + name: v1beta2 served: true - storage: true + storage: false subresources: status: {} schema: @@ -155,9 +155,14 @@ spec: type: string jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" - <<: *version - name: v1beta2 + name: v1beta1 served: true - storage: false + storage: true + # This indicates the v1beta1 version of the custom resource is deprecated. + # API requests to this version receive a warning header in the server response. + deprecated: true + # This overrides the default warning returned to API clients making v1beta1 API requests. + deprecationWarning: "eventing.knative.dev/v1beta1 EventType is deprecated; see https://knative.dev/docs/eventing/event-registry/ for instructions to migrate to eventing.knative.dev/v1beta2 EventType" # v1beta1 schema is identical to the v1beta2 schema names: kind: EventType