Skip to content
Permalink
Browse files

Remove openAPIV3Schema validation

When we were using kubebuilder, it generated openAPIV3schema validation
for us in our CRD declarations. However:

1. No other knative projects use this
2. Continuing to use this is forcing us to diverge from the other
   Knative projects, specifically I found that `Status` fields, although
   optional, were being required by the validation (as described at
   kubernetes/apiextensions-apiserver#25), and
   the best way to work around it seemed to be to make them nullable (as
   per
   https://stackoverflow.com/questions/18088294/how-to-not-marshal-an-empty-struct-into-json-with-go)
   i.e. pointers, which is different from how Knative works, and
   introduces new problems (such as handling when these fields are null)
3. We (or at least @pivotal-nader-ziada and @shashwathi for sure!) were
   maintaining these fiels manually :O
  • Loading branch information
bobcatfish authored and knative-prow-robot committed Oct 5, 2018
1 parent 462cbd6 commit 716612a2b2ec11a4906314e7a0c235fc10965357
Showing with 0 additions and 637 deletions.
  1. +0 −110 config/300-pipeline.yaml
  2. +0 −80 config/300-pipelineparams.yaml
  3. +0 −97 config/300-pipelinerun.yaml
  4. +0 −34 config/300-resource.yaml
  5. +0 −116 config/300-task.yaml
  6. +0 −200 config/300-taskrun.yaml
@@ -11,116 +11,6 @@ spec:
kind: Pipeline
plural: pipelines
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
tasks:
items:
properties:
clusterBindings:
items:
properties:
inputName:
type: string
key:
type: string
required:
- key
- inputName
type: object
type: array
inputSourceBindings:
items:
properties:
key:
type: string
name:
type: string
resourceRef:
properties:
apiVersion:
type: string
name:
type: string
required:
- name
type: object
passedConstraints:
items:
type: string
type: array
required:
- name
- key
type: object
type: array
name:
type: string
outputSourceBindings:
items:
properties:
key:
type: string
name:
type: string
resourceRef:
properties:
apiVersion:
type: string
name:
type: string
required:
- name
type: object
passedConstraints:
items:
type: string
type: array
required:
- name
- key
type: object
type: array
params:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
taskRef:
properties:
apiVersion:
type: string
name:
type: string
required:
- name
type: object
required:
- name
- taskRef
type: object
type: array
required:
- tasks
type: object
status:
type: object
type: object
version: v1alpha1
status:
acceptedNames:
@@ -11,86 +11,6 @@ spec:
kind: PipelineParams
plural: pipelineparams
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
clusters:
items:
properties:
endpoint:
type: string
name:
type: string
type:
type: string
required:
- name
- type
- endpoint
type: object
type: array
results:
properties:
logs:
properties:
name:
type: string
type:
type: string
url:
type: string
required:
- name
- type
- url
type: object
runs:
properties:
name:
type: string
type:
type: string
url:
type: string
required:
- name
- type
- url
type: object
tests:
properties:
name:
type: string
type:
type: string
url:
type: string
required:
- name
- type
- url
type: object
required:
- runs
- logs
type: object
serviceAccount:
type: string
required:
- serviceAccount
- results
type: object
status:
type: object
type: object
version: v1alpha1
status:
acceptedNames:
@@ -11,103 +11,6 @@ spec:
kind: PipelineRun
plural: pipelineruns
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
pipelineParamsRef:
properties:
apiVersion:
type: string
name:
type: string
required:
- name
type: object
pipelineRef:
properties:
apiVersion:
type: string
name:
type: string
required:
- name
type: object
triggerRef:
properties:
name:
type: string
type:
type: string
required:
- type
type: object
required:
- pipelineRef
- pipelineParamsRef
- triggerRef
type: object
status:
properties:
conditions:
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
type: string
status:
type: string
type:
type: string
required:
- type
- status
- lastTransitionTime
type: object
type: array
resourceVersion:
items:
properties:
resourceRef:
properties:
apiVersion:
type: string
name:
type: string
required:
- name
type: object
version:
type: string
required:
- resourceRef
- version
type: object
type: array
taskRuns:
items:
properties:
name:
type: string
required:
- name
type: object
type: array
required:
- conditions
type: object
type: object
version: v1alpha1
status:
acceptedNames:
@@ -11,40 +11,6 @@ spec:
kind: Resource
plural: resources
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
name:
type: string
params:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
type:
type: string
required:
- type
- params
type: object
status:
type: object
type: object
version: v1alpha1
status:
acceptedNames:

0 comments on commit 716612a

Please sign in to comment.
You can’t perform that action at this time.