-
Notifications
You must be signed in to change notification settings - Fork 630
Pipeline Implementation #1239
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
Pipeline Implementation #1239
Changes from all commits
1bb44c5
30453b4
97ae552
f248e2d
d52c7a6
45c2bb2
e79d6c8
8ce3fde
6115fe0
c8de5f4
b4b30ac
2b25f22
a6cefac
4536614
6916782
beb2d0f
7c3b696
d1f9aeb
6f7f20d
f4326a8
3eeffe8
f46ac9f
336feb0
16512f3
7278ea2
17fca8e
6a51003
9f39d0a
a562380
d373826
59f9b16
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 |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # Copyright 2019 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. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: pipelines.messaging.knative.dev | ||
| labels: | ||
| knative.dev/crd-install: "true" | ||
| spec: | ||
| group: messaging.knative.dev | ||
| version: v1alpha1 | ||
| names: | ||
| kind: Pipeline | ||
| plural: pipelines | ||
| singular: pipeline | ||
| categories: | ||
| - all | ||
| - knative | ||
| - eventing | ||
|
vaikas marked this conversation as resolved.
|
||
| - messaging | ||
| scope: Namespaced | ||
| subresources: | ||
| status: {} | ||
| additionalPrinterColumns: | ||
| - name: Ready | ||
| type: string | ||
| JSONPath: ".status.conditions[?(@.type==\"Ready\")].status" | ||
| - name: Reason | ||
| type: string | ||
| JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason" | ||
| - name: Age | ||
| type: date | ||
| JSONPath: .metadata.creationTimestamp | ||
| validation: | ||
| openAPIV3Schema: | ||
| properties: | ||
| spec: | ||
| required: | ||
| - steps | ||
| - channelTemplate | ||
| properties: | ||
| steps: | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| dnsName: | ||
| type: string | ||
| minLength: 1 | ||
| uri: | ||
| type: string | ||
| minLength: 1 | ||
| ref: | ||
| type: object | ||
| required: | ||
| - apiVersion | ||
| - kind | ||
| - name | ||
| properties: | ||
| apiVersion: | ||
| type: string | ||
| minLength: 1 | ||
| kind: | ||
| type: string | ||
| minLength: 1 | ||
| name: | ||
| type: string | ||
| minLength: 1 | ||
| namespace: | ||
| type: string | ||
| maxLength: 0 | ||
| channelTemplate: | ||
| type: object | ||
| required: | ||
| - apiVersion | ||
| - kind | ||
| properties: | ||
| apiVersion: | ||
| type: string | ||
| minLength: 1 | ||
| kind: | ||
| type: string | ||
| minLength: 1 | ||
| spec: | ||
| type: object | ||
|
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. How does this get validated?
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. you can't in the openapi doc. You could if you loaded the channel template crd. That can be done in the future.
Contributor
Author
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, so it should fail now at CR creation time, so while we can't easily ( as Scott said) validate the target channel, at least when we try to create it will fail instead of previous provisioner model where the channel would get created and then fail at a later time. I'd like to not tackle this as part of this PR. One option would be to use dry run. Regardless, created this issue to track that, ok? |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| Copyright 2019 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. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package v1alpha1 | ||
|
|
||
| import "context" | ||
|
|
||
| func (s *Pipeline) SetDefaults(ctx context.Context) { | ||
| s.Spec.SetDefaults(ctx) | ||
| } | ||
|
|
||
| func (ss *PipelineSpec) SetDefaults(ctx context.Context) { | ||
| // TODO anything? | ||
| } |
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.
This will need to be an aggregated role. Similar to #1341, but include all permissions, not just read and update.