Skip to content

Commit

Permalink
fix(manifests): Update manifests to make it work on both k8s and open…
Browse files Browse the repository at this point in the history
…shift (#1239)

* refactor manifests to separate k8s and openshift deployment

* update install readme

* fix lint
  • Loading branch information
Tomcli committed May 15, 2023
1 parent ebb6316 commit a82b349
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 2 deletions.
5 changes: 3 additions & 2 deletions guides/kfp_tekton_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A Kubernetes cluster `v1.23` that has least 8 vCPU and 16 GB memory.

Depending on your situation, you can choose between the two approaches to set up the pipeline engine on Openshift:
1. Using [OpenShift Pipelines](https://docs.openshift.com/container-platform/4.12/cicd/pipelines/installing-pipelines.html) (built on Tekton), follow the [Standalone Kubeflow Pipelines with Openshift Pipelines Backend Deployment](#standalone-kubeflow-pipelines-with-openshift-pipelines-backend-deployment)
2. Using [Tekton on Openshift](https://github.com/tektoncd/pipeline/blob/v0.44.2/docs/install.md#installing-tekton-pipelines-on-openshift), follow the [Standalone Kubeflow Pipelines with Tekton Backend Deployment](#standalone-kubeflow-pipelines-with-tekton-backend-deployment) to install the Kubeflow Pipeline Stack.
2. Using [Tekton on Openshift](https://github.com/tektoncd/pipeline/blob/v0.44.2/docs/install.md#installing-tekton-pipelines-on-openshift), follow the [Standalone Kubeflow Pipelines with Tekton Backend Deployment](#standalone-kubeflow-pipelines-with-tekton-backend-deployment) to install the Kubeflow Pipeline Stack. Note the current Tekton Open Source deployment for [Openshift doesn't work out of the box](https://github.com/tektoncd/pipeline/issues/3452), so we strongly recommend to deploy with Opneshift Pipelines (see above) if you want to run Kubeflow Pipelines on Openshift.

### Other Cloud Providers or On-Prem Kubernetes Deployment

Expand Down Expand Up @@ -83,7 +83,8 @@ To install the standalone Kubeflow Pipelines with Tekton, run the following step

7. (OpenShift only) If you are running the standalone KFP-Tekton on OpenShift, apply the necessary security context constraint below
```shell
oc apply -k manifests/kustomize/third-party/openshift/standalone
curl -L https://raw.githubusercontent.com/kubeflow/kfp-tekton/master/install/v1.7.0/kfp-tekton.yaml | yq 'del(.spec.template.spec.containers[].securityContext.runAsUser, .spec.template.spec.containers[].securityContext.runAsGroup)' | oc apply -f -
oc apply -k https://github.com/kubeflow/kfp-tekton//manifests/kustomize/third-party/openshift/standalone
oc adm policy add-scc-to-user anyuid -z tekton-pipelines-controller
oc adm policy add-scc-to-user anyuid -z tekton-pipelines-webhook
```
Expand Down
4 changes: 4 additions & 0 deletions install/v1.6.5/kfp-tekton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3107,7 +3107,9 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
serviceAccountName: tekton-pipelineloop-controller
Expand Down Expand Up @@ -3179,7 +3181,9 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
serviceAccountName: tekton-pipelineloop-webhook
Expand Down
4 changes: 4 additions & 0 deletions install/v1.6.6/kfp-tekton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3107,7 +3107,9 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
serviceAccountName: tekton-pipelineloop-controller
Expand Down Expand Up @@ -3179,7 +3181,9 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
serviceAccountName: tekton-pipelineloop-webhook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,17 @@ resources:
- ../tekton-custom-task

namespace: openshift-pipelines

patches:
- path: pipelineloop-controller-patch.yaml
target:
group: apps
kind: Deployment
name: tekton-pipelineloop-controller
version: v1
- path: pipelineloop-webhook-patch.yaml
target:
group: apps
kind: Deployment
name: tekton-pipelineloop-webhook
version: v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsGroup
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsUser
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsGroup
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsUser
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
---
Expand Down

0 comments on commit a82b349

Please sign in to comment.