From ca2e27c9c2f22a4fc395d568e332fb9ac69121aa Mon Sep 17 00:00:00 2001 From: "charles-edouard.breteche" Date: Tue, 9 Jun 2020 23:04:48 +0200 Subject: [PATCH] Add pipelines and triggers namespace flags to openshift overlays --- docs/install.md | 4 ++++ overlays/dev-openshift-imagestream/kustomization.yaml | 7 +++++++ overlays/dev-openshift-locked-down/kustomization.yaml | 7 +++++++ overlays/dev-openshift/kustomization.yaml | 7 +++++++ .../latest-openshift-locked-down/kustomization.yaml | 7 +++++++ overlays/latest-openshift/kustomization.yaml | 7 +++++++ overlays/openshift-patches/flags-patch.yaml | 11 +++++++++++ 7 files changed, 50 insertions(+) create mode 100644 overlays/openshift-patches/flags-patch.yaml diff --git a/docs/install.md b/docs/install.md index 3ce3664bc..621279749 100644 --- a/docs/install.md +++ b/docs/install.md @@ -86,6 +86,10 @@ To install Tekton Dashboard on an OpenShift cluster: Congratulations! You have successfully installed Tekton Dashboard on your OpenShift cluster. +**Note for users installing Tekton Pipelines and Triggers outside the OpenShift Pipelines operator:** + +Tekton Dashboard on OpenShift works out of the box with the OpenShift Pipelines operator. If you installed Tekton Pipelines and Triggers without using the OpenShift Pipelines operator, you will need to change the following args `--pipelines-namespace=openshift-pipelines` and `--triggers-namespace=openshift-pipelines` and set their values to the namespace where Pipelines and Triggers were respectively deployed. + ## Accessing the Dashboard on Kubernetes By default, the Dashboard is not exposed outside the cluster. diff --git a/overlays/dev-openshift-imagestream/kustomization.yaml b/overlays/dev-openshift-imagestream/kustomization.yaml index 19c6daf7a..70ecb0803 100644 --- a/overlays/dev-openshift-imagestream/kustomization.yaml +++ b/overlays/dev-openshift-imagestream/kustomization.yaml @@ -29,6 +29,13 @@ patchesJson6902: name: tekton-dashboard namespace: tekton-pipelines path: ../logout/deployment-patch.yaml + - target: + group: apps + version: v1 + kind: Deployment + name: tekton-dashboard + namespace: tekton-pipelines + path: ../openshift-patches/flags-deployment.yaml images: - name: dashboardImage newName: tekton-pipelines/tekton-dashboard diff --git a/overlays/dev-openshift-locked-down/kustomization.yaml b/overlays/dev-openshift-locked-down/kustomization.yaml index 32cf54d1b..4c8ffca95 100644 --- a/overlays/dev-openshift-locked-down/kustomization.yaml +++ b/overlays/dev-openshift-locked-down/kustomization.yaml @@ -35,6 +35,13 @@ patchesJson6902: name: tekton-dashboard namespace: tekton-pipelines path: ../logout/deployment-patch.yaml + - target: + group: apps + version: v1 + kind: Deployment + name: tekton-dashboard + namespace: tekton-pipelines + path: ../openshift-patches/flags-deployment.yaml images: - name: dashboardImage newName: github.com/tektoncd/dashboard/cmd/dashboard diff --git a/overlays/dev-openshift/kustomization.yaml b/overlays/dev-openshift/kustomization.yaml index 31589d9ff..e4cccb8d8 100644 --- a/overlays/dev-openshift/kustomization.yaml +++ b/overlays/dev-openshift/kustomization.yaml @@ -28,6 +28,13 @@ patchesJson6902: name: tekton-dashboard namespace: tekton-pipelines path: ../logout/deployment-patch.yaml + - target: + group: apps + version: v1 + kind: Deployment + name: tekton-dashboard + namespace: tekton-pipelines + path: ../openshift-patches/flags-deployment.yaml images: - name: dashboardImage newName: github.com/tektoncd/dashboard/cmd/dashboard diff --git a/overlays/latest-openshift-locked-down/kustomization.yaml b/overlays/latest-openshift-locked-down/kustomization.yaml index 76f199a22..9de9efff2 100644 --- a/overlays/latest-openshift-locked-down/kustomization.yaml +++ b/overlays/latest-openshift-locked-down/kustomization.yaml @@ -28,6 +28,13 @@ patchesJson6902: name: tekton-dashboard namespace: tekton-pipelines path: ../logout/deployment-patch.yaml + - target: + group: apps + version: v1 + kind: Deployment + name: tekton-dashboard + namespace: tekton-pipelines + path: ../openshift-patches/flags-deployment.yaml images: - name: dashboardImage newName: gcr.io/tekton-nightly/dashboard diff --git a/overlays/latest-openshift/kustomization.yaml b/overlays/latest-openshift/kustomization.yaml index 3c4cc7091..be1388159 100644 --- a/overlays/latest-openshift/kustomization.yaml +++ b/overlays/latest-openshift/kustomization.yaml @@ -21,6 +21,13 @@ patchesJson6902: name: tekton-dashboard namespace: tekton-pipelines path: ../logout/deployment-patch.yaml + - target: + group: apps + version: v1 + kind: Deployment + name: tekton-dashboard + namespace: tekton-pipelines + path: ../openshift-patches/flags-deployment.yaml images: - name: dashboardImage newName: gcr.io/tekton-nightly/dashboard diff --git a/overlays/openshift-patches/flags-patch.yaml b/overlays/openshift-patches/flags-patch.yaml new file mode 100644 index 000000000..bddd7299c --- /dev/null +++ b/overlays/openshift-patches/flags-patch.yaml @@ -0,0 +1,11 @@ +--- +# Openshift Pipelines operator will install Triggers and Pipelines +# in the openshift-pipelines namespace +- op: add + path: /spec/template/spec/containers/0/args/- + value: + --pipelines-namespace=openshift-pipelines +- op: add + path: /spec/template/spec/containers/0/args/- + value: + --triggers-namespace=openshift-pipelines