This sample shows how to extend the Tekton Dashboard using the extension mechanism.
This sample extension is intended just to illustrate the mechanism. See the 'experimental' repository (https://github.com/tektoncd/experimental) for more extensions.
This example assumes you've installed the Tekton Dashboard into the tekton-pipelines
namespace and you're pushing the sample image to Dockerhub.
cd docs/samples/extension
docker build -t <dockerhubusername>/sample-extension:latest .
docker push <dockerhubusername>/sample-extension:latest
Edit config/tekton-extension-sample.yaml
replacing the Dockerhub username value
kubectl apply -f config
kubectl port-forward $(kubectl get pod -l app=tekton-dashboard -o name) 9097
http://localhost:9097/v1/extensions/
[
{
"name": "dashboard-extension",
"url": "sample",
"port": "3000",
"displayname": "tekton_dashboard_extension",
"bundlelocation": "/bundle"
}
]
http://localhost:9097/v1/extensions/dashboard-extension/sample
Hello Tekton Dashboard! Here is the extension sample.
kubectl delete -f config
The sample here adds Kubernetes deployments as an extension resource.
Once applied the Tekton Dashboard will include k8s deployments
as an option on the left nav.
Note: This sample does not include RBAC and Service Service Account bindings.
This example reuses access to deployment resources which the Tekton Dashboard service account already has - for different resource types a role binding may need to be applied.