Skip to content

Commit

Permalink
Fix: Add taskruns to Katib controller role to run Tekton Pipelines (#…
Browse files Browse the repository at this point in the history
…1380)

* Add taskruns to controller role

* Condition in one line
  • Loading branch information
andreyvelich authored Nov 7, 2020
1 parent 6dc1af8 commit a96ff59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions manifests/v1beta1/katib-controller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ rules:
- tekton.dev
resources:
- pipelineruns
- taskruns
verbs:
- "*"
- apiGroups:
Expand Down
7 changes: 3 additions & 4 deletions pkg/webhook/v1beta1/pod/inject_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ func (s *sidecarInjector) Handle(ctx context.Context, req types.Request) types.R
// Check whether the pod need to be mutated
needMutate, err := s.MutationRequired(pod, namespace)
if err != nil {
log.Info("Unable to run MutationRequired", "Error", err)
return admission.ErrorResponse(http.StatusInternalServerError, err)
} else {
if !needMutate {
return admission.ValidationResponse(true, "")
}
} else if !needMutate {
return admission.ValidationResponse(true, "")
}

// Do mutation
Expand Down

0 comments on commit a96ff59

Please sign in to comment.