Skip to content
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

Add validation to controller for TaskRun CRD #33

Closed
bobcatfish opened this issue Sep 11, 2018 · 1 comment
Closed

Add validation to controller for TaskRun CRD #33

bobcatfish opened this issue Sep 11, 2018 · 1 comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given

Comments

@bobcatfish
Copy link
Collaborator

Expected Behavior

When someone creates a TaskRun in a k8s cluster (e.g. with kubectl apply, the controller should make sure every field is valid.

This should include verifying as many fields as possible, e.g. verifying connectivity with any endpoints, if there are any references, verifying that those actually exist in the system, etc.

TaskRun is defined here: https://github.com/knative/build-pipeline/blob/master/pkg/apis/pipeline/v1beta1/taskrun_types.go

Any additional fields included should cause a failure (e.g. if a typo is made when defining a known field).

Actual Behavior

Some basic validation is applied, e.g. that required fields are present and that fields are in the correct format (e.g. string vs. int), but that's it.

Steps to Reproduce the Problem

  1. Deploy the Pipeline CRDs to your k8s cluster
  2. Create an instance that has invalid fields, e.g. a malformed URL or a typo in one of the fields.
  3. Apply the instance with kubectl apply -f and notice that the controller does not complain

Additional Info

Blocked by #19

bobcatfish referenced this issue in bobcatfish/pipeline Sep 18, 2018
All resources will be evaluated by their controllers after they are
created to determine if they are valid or not. This PR adds a "Valid"
condition to the status of all resoruces which can be used by the
controller to inform the user of this (otherwise I think we'd have to
implement this kind of validation via admission controllers? maybe
that's better?)

This would be used by the logic that will be implemented for validation
in #33 #32 #31 #29 #30.
bobcatfish referenced this issue in bobcatfish/pipeline Sep 18, 2018
All resources will be evaluated by their controllers after they are
created to determine if they are valid or not. This PR adds a "Valid"
condition to the status of all resoruces which can be used by the
controller to inform the user of this (otherwise I think we'd have to
implement this kind of validation via admission controllers? maybe
that's better?)

This would be used by the logic that will be implemented for validation
in #33 #32 #31 #29 #30.
@bobcatfish bobcatfish added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Oct 1, 2018
@shashwathi
Copy link
Contributor

/assign @shashwathi

@bobcatfish bobcatfish added the meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given label Oct 12, 2018
chmouel pushed a commit to chmouel/tektoncd-pipeline that referenced this issue May 30, 2019
Add GitHub repo name to hub command and fail fast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given
Projects
None yet
Development

No branches or pull requests

2 participants