Skip to content

Commit

Permalink
fix katib use crds token pipeline trail template guide
Browse files Browse the repository at this point in the history
Signed-off-by: yangzhen <[email protected]>
  • Loading branch information
Jerry-yz committed May 17, 2024
1 parent c4c3eb5 commit d460fce
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions examples/v1beta1/tekton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,21 @@ kubectl patch ClusterRole katib-controller -n kubeflow --type=json \
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups":["tekton.dev"],"resources":["pipelineruns", "taskruns"],"verbs":["get", "list", "watch", "create", "delete"]}}]'
```
In addition to that, you have to modify Katib
[Controller args](https://github.com/kubeflow/katib/blob/master/manifests/v1beta1/components/controller/controller.yaml#L27)
with the new flag `--trial-resources`.
Modify Katib Config [controller parameters](https://github.com/kubeflow/katib/blob/fc858d15dd41ff69166a2020efa200199063f9ba/manifests/v1beta1/installs/katib-standalone/katib-config.yaml#L9-L15) with the new entity:
Run the following command to update Katib Controller args:

```bash
kubectl patch Deployment katib-controller -n kubeflow --type=json \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--trial-resources=PipelineRun.v1beta1.tekton.dev"}]'
```
trialResources:
- <object-kind>.<object-API-version>.<object-API-group>
```
Check that Katib Controller's pod was restarted:

```bash
$ kubectl get pods -n kubeflow
For example, to support Tekton Pipelines:
NAME READY STATUS RESTARTS AGE
katib-controller-784994d449-9bgj9 1/1 Running 0 28s
katib-db-manager-78697c7bd4-ck7l8 1/1 Running 0 6m13s
katib-mysql-854cdb87c4-krcm9 1/1 Running 0 6m13s
katib-ui-57b9d7f6dd-cv6gn 1/1 Running 0 6m13s
```
trialResources:
- PipelineRun.v1beta1.tekton.dev
```
Check logs from Katib Controller to verify Tekton Pipelines integration:
After these changes, deploy Katib as described in the [install guide](https://www.kubeflow.org/docs/components/katib/installation/) and wait until the katib-controller Pod is created. You can check logs from the Katib controller to verify your resource integration:
```bash
$ kubectl logs $(kubectl get pods -n kubeflow -o name | grep katib-controller) -n kubeflow | grep '"CRD Kind":"PipelineRun"'
Expand Down

0 comments on commit d460fce

Please sign in to comment.