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

Fail gracefully if tekton APIs are not available #1

Closed
gorkem opened this issue May 19, 2019 · 5 comments · Fixed by #123
Closed

Fail gracefully if tekton APIs are not available #1

gorkem opened this issue May 19, 2019 · 5 comments · Fixed by #123
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gorkem
Copy link
Collaborator

gorkem commented May 19, 2019

Check if Tekton APIs are available on the cluster and display a message that indicates that Tekton is not available.

Additionally we should also cover the case where tekton is installed but the current user does not have the privileges to interact with tekton resources.

@gorkem gorkem added the enhancement New feature or request label May 19, 2019
@gorkem gorkem added this to the devex #177 milestone Dec 20, 2019
@sudhirverma sudhirverma self-assigned this Dec 20, 2019
@sudhirverma
Copy link
Contributor

sudhirverma commented Dec 23, 2019

As discussed with tekton team there is a command to check OpenShift Pipelines Operator is install or not command to check pipelines operator: oc explain pipeline.tekton.dev but when we install the pipelines operator and then we uninstall pipeline operator it doesn't delete the resources,
oc explain pipeline.tekton.dev command shows the resources are still present after uninstalling the OpenShift Pipelines Operator from operatorhub.

to check current user has privileges to interact with tekton resources or not command is oc auth can-i create subscriptions.operators.coreos.com

cc: @hrishin

@hrishin
Copy link

hrishin commented Dec 24, 2019

Check if Tekton APIs are available on the cluster and display a message that indicates that Tekton is not available.

oc explain pipeline.tekton.dev or oc get pipeline.tekton.dev should do the trick here if command status returned as non-zero.

Additionally we should also cover the case where tekton is installed but the current user does not have the privileges to interact with Tekton resources.

For this case oc auth can-i create pipeline.tekton.dev and oc auth can-i create pipelinerun.tekton.dev should help here.

@vdemeester
Copy link
Member

This needs to work on a non openshift-pipelines instance too 🦸🏻‍♂️

@hrishin
Copy link

hrishin commented Dec 24, 2019

@vdemeester it will not work in OpenShift pipelines? 🤔

@vdemeester
Copy link
Member

Ah I thought pipeline.tekton.dev was specific to our openshift-pipelines controller. Turns out it is operator.tekton.dev 😛. The API group pipeline.tekton.dev doesn't exist (yet?), it's all in tekton.dev as of now.

~ λ oc api-resources | grep tekton
config                                                 operator.tekton.dev                   false        Config
clustertasks                                           tekton.dev                            false        ClusterTask
conditions                                             tekton.dev                            true         Condition
eventlisteners                        el               tekton.dev                            true         EventListener
pipelineresources                                      tekton.dev                            true         PipelineResource
pipelineruns                          pr,prs           tekton.dev                            true         PipelineRun
pipelines                                              tekton.dev                            true         Pipeline
taskruns                              tr,trs           tekton.dev                            true         TaskRun
tasks                                                  tekton.dev                            true         Task
triggerbindings                       tb               tekton.dev                            true         TriggerBinding
triggertemplates                      tt               tekton.dev                            true         TriggerTemplate

We will need to discuss that in the future (see here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants