This operator tracks completed Tekton PipelineRuns and TaskRuns and attempts to archive the logged output of all containers to a storage location.
You want to remove the runs that are cluttering your UI, but want to keep the logged output
- go version v1.12+.
- docker version 17.03+
- kubectl v1.11.3+
- operator-sdk
- Access to a Kubernetes v1.11.3+ cluster
Checkout the Operator repository
$ git clone https://github.com/bigkevmcd/tekton-log-archiver.git
$ cd tekton-log-archiver
Run the following command
$ go mod tidy
Build the operator image and push it to a public registry, such as quay.io:
$ export IMAGE=quay.io/example-inc/tekton-log-archiver:v0.0.1
$ operator-sdk build $IMAGE
$ docker push $IMAGE
# Update the operator manifest to use the built image name (if you are performing these steps on OSX, see note below)
$ sed -i 's|REPLACE_IMAGE|quay.io/example-inc/tekton-log-archiver:v0.0.1|g' deploy/operator.yaml
# On OSX use:
$ sed -i "" 's|REPLACE_IMAGE|quay.io/example-inc/tekton-log-archiver:v0.0.1|g' deploy/operator.yaml
NOTE The quay.io/example-inc/tekton-log-archiver:v0.0.1
is an example. You should build and push the image for your repository.
You must have Tekton Pipeline installed before installing this operator:
$ kubectl apply -f https://github.com/tektoncd/pipeline/releases/download/v0.9.1/release.yaml
And then you can install the statuses operator with:
$ kubectl apply -f https://github.com/bigkevmcd/operator-statuses/releases/download/v0.0.1/release.yaml
$ kubectl delete -f https://github.com/bigkevmcd/operator-statuses/releases/download/v0.0.1/release.yaml
Use the following command to check the operator logs.
$ kubectl logs tekton-log-archiver
$ go test -v ./...