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 <[email protected]>
  • Loading branch information
vdemeester authored and tekton-robot committed Jul 20, 2023
1 parent 226f2b3 commit f8c0038
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 f8c0038

Please sign in to comment.