Skip to content

Commit

Permalink
Update OpenShift pipelines-install instruction…
Browse files Browse the repository at this point in the history
The current documentation doesn't work with OpenShift because of the
`securityContext.runAsUser` that comes in the way of the default
behavior of OpenShift. This fixes that.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester committed Feb 10, 2023
1 parent 50d18af commit 98c8ec6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/en/vendor/redhat/pipelines-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ Constraints][security-con] for more information.
```
1. Install Tekton Pipelines:

Because OpenShift uses random user id (and user id range per namespace) for pods, we need to remove the `securityContext.runAsUser` and `securityContext.runAsGroup` from any container from the release.yaml.
You will need to have [`yq`](https://mikefarah.gitbook.io/yq/) installed for this to work. Another way would be to download the yaml, search and replace (here replace with nothing) in your favourite editor.

```bash
oc apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.notags.yaml
curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.notags.yaml | yq 'del(.spec.template.spec.containers[].securityContext.runAsUser, .spec.template.spec.containers[].securityContext.runAsGroup)' | oc apply -f -
```


See the [OpenShift CLI documentation][openshift-cli] for more information on
the `oc` command.

Expand Down

0 comments on commit 98c8ec6

Please sign in to comment.