-
Notifications
You must be signed in to change notification settings - Fork 630
Use CRD & Webhook v1 APIs #3360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Copyright 2019 The Knative Authors | ||
| # Copyright 2020 The Knative Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
|
|
@@ -12,7 +12,7 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: brokers.eventing.knative.dev | ||
|
|
@@ -22,17 +22,38 @@ metadata: | |
| duck.knative.dev/addressable: "true" | ||
| spec: | ||
| group: eventing.knative.dev | ||
| preserveUnknownFields: false | ||
| validation: | ||
| openAPIV3Schema: | ||
| type: object | ||
| # this is a work around so we don't need to flush out the | ||
| # schema for each version at this time as well as ensure | ||
| # that different Broker Classes that might have different | ||
| # fields that are not in the Broker Spec will work. | ||
| # | ||
| # see issue: https://github.com/knative/serving/issues/912 | ||
| x-kubernetes-preserve-unknown-fields: true | ||
| versions: | ||
| - &version | ||
| name: v1alpha1 | ||
| served: false | ||
| storage: false | ||
| subresources: | ||
| status: {} | ||
| schema: | ||
| openAPIV3Schema: | ||
| type: object | ||
| # this is a work around so we don't need to flush out the | ||
| # schema for each version at this time | ||
| # | ||
| # see issue: https://github.com/knative/serving/issues/912 | ||
| x-kubernetes-preserve-unknown-fields: true | ||
| additionalPrinterColumns: | ||
| - name: Ready | ||
| type: string | ||
| jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" | ||
| - name: Reason | ||
| type: string | ||
| jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" | ||
| - name: URL | ||
| type: string | ||
| jsonPath: .status.address.url | ||
| - name: Age | ||
| type: date | ||
| jsonPath: .metadata.creationTimestamp | ||
| - << : *version | ||
| name: v1beta1 | ||
| served: true | ||
| storage: true | ||
| names: | ||
| kind: Broker | ||
| plural: brokers | ||
|
|
@@ -42,31 +63,11 @@ spec: | |
| - knative | ||
| - eventing | ||
| scope: Namespaced | ||
| subresources: | ||
| status: {} | ||
| conversion: | ||
| strategy: Webhook | ||
| webhookClientConfig: | ||
| service: | ||
| name: eventing-webhook | ||
| namespace: knative-eventing | ||
| additionalPrinterColumns: | ||
| - name: Ready | ||
| type: string | ||
| JSONPath: ".status.conditions[?(@.type==\"Ready\")].status" | ||
| - name: Reason | ||
| type: string | ||
| JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason" | ||
| - name: URL | ||
| type: string | ||
| JSONPath: .status.address.url | ||
| - name: Age | ||
| type: date | ||
| JSONPath: .metadata.creationTimestamp | ||
| versions: | ||
| - name: v1alpha1 | ||
| served: false | ||
| storage: false | ||
| - name: v1beta1 | ||
| served: true | ||
| storage: true | ||
| webhook: | ||
| conversionReviewVersions: ["v1", "v1beta1"] | ||
| clientConfig: | ||
| service: | ||
| name: eventing-webhook | ||
| namespace: knative-eventing | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like you can't drop the v1alpha1 for the brokers based on this from the failed upgrade tests:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this requires the storage migration job to be run before the upgrade I do this after the upgrade in serving which is technically wrong (we've never dropped a version yet so we didn't catch it) |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, we do that already with
everythingon the verbs ;-)but yeah 🙄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, it is fine :) Just some YAML magic that I didn't know before :)
Actually gets rid of some dupes, which is nice