diff --git a/Makefile b/Makefile index ac17447fca..ef4b94dacd 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ update-deps: GO111MODULE=on go mod tidy .PHONY: ko-apply -ko-apply: clean +ko-apply: ko apply -n tekton-operator -f config/ .PHONY: local-test-e2e @@ -43,5 +43,5 @@ local-test-e2e: clean dev-setup --operator-namespace tekton-operators \ --no-setup \ --verbose \ - --go-test-flags "-v -timeout 20m" + --go-test-flags "-v -timeout 20m -tags=e2e" --debug diff --git a/README.md b/README.md index db22f1caea..548821e648 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,204 @@ # Tektoncd Operator -Kubernetes [Operator](https://operatorhub.io/getting-started) to manage installations, updates and removal of Tektoncd projects (pipeline, dashboard, …) +The quickest and easiest way to install, upgrade and manage TektonCD [Pipelines](https://github.com/tektoncd/pipeline), +[Dashboard](https://github.com/tektoncd/dashboard), [Triggers](https://github.com/tektoncd/triggers) +on any Kubernetes Cluster. -The following steps will install [Tekton Pipeline](https://github.com/tektoncd/pipeline) and configure it appropriately for your cluster. -1. Create namespace: `tekton-operator` +## Prerequisites - `kubectl create namespace tekton-operator` - -2. Apply Operator CRD +- Kubernetes Cluster +- `kubectl` +- `tkn` ([tektoncd/cli](https://github.com/tektoncd/cli#installing-tkn)) - `kubectl apply -f config/crds/300-operator_v1alpha1_pipeline_crd.yaml` - `kubectl apply -f config/crds/300-operator_v1alpha1_addon_crd.yaml` - -3. Deploy the Operator +# Quick Start - `kubectl -n tekton-operator apply -f config/` - - The Operator will automatic install `Tekton pipeline` with `v0.14.0` in the namespace `tekton-pipeline` +## Install Tektoncd Operator -## Development Prerequisites -1. [`go`](https://golang.org/doc/install): The language Tektoncd-pipeline-operator is - built in -1. [`git`](https://help.github.com/articles/set-up-git/): For source control -1. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/): For - interacting with your kube cluster -1. operator-sdk: https://github.com/operator-framework/operator-sdk +To install the latest version of Tektoncd Operator, run +```shell script +kubectl apply -f https://storage.googleapis.com/tekton-releases/operator/latest/release.notags.yaml +... +namespace/tekton-operator created +customresourcedefinition.apiextensions.k8s.io/tektonaddons.operator.tekton.dev created +customresourcedefinition.apiextensions.k8s.io/tektonpipelines.operator.tekton.dev created +deployment.apps/tekton-operator created +clusterrole.rbac.authorization.k8s.io/tekton-operator created +clusterrolebinding.rbac.authorization.k8s.io/tekton-operator created +serviceaccount/tekton-operator created +``` + +This will install the operator in `tekton-operator` namespace. Then the operator will automatically install + Tekton Pipelines in the `tekton-pipelines` namespace. + +### Check Tektoncd Pipelines Installation + + Run + ```shell script +tkn version +... +Client version: 0.10.0 +Pipeline version: v0.15.1 +Triggers version: unknown +``` + +or check + +```shell script +kubectl get tektonpipelines cluster -o jsonpath='{.status.conditions[0]}' +--- +map[code:installed version:v0.15.1] +``` -## Running Operator Locally (Development) +### Run an Example Pipeline -1. Apply Operator CRD +Run an example pipeline from Tektoncd Pipelines examples: [Pipeline Run with Params](https://github.com/tektoncd/pipeline/blob/release-v0.15.x/examples/v1beta1/pipelineruns/pipelinerun-with-params.yaml) - `kubectl apply -f config/crds/*_crd.yaml` +```shell script +kubectl apply -f https://raw.githubusercontent.com/tektoncd/pipeline/release-v0.15.x/examples/v1beta1/pipelineruns/pipelinerun-with-params.yaml +... +pipeline.tekton.dev/pipeline-with-params created +task.tekton.dev/sum-params created +task.tekton.dev/multiply-params created +pipelinerun.tekton.dev/pipelinerun-with-params created +``` + +### Get PipelineRun Logs + +```shell script +tkn pipelinerun ls +... +NAME STARTED DURATION STATUS +pipelinerun-with-params 1 minute ago 10 seconds Succeeded +``` -1. start operator +```shell script +tkn pipelinerun logs -f pipelinerun-with-params +... +[sum-params : sum] 600 - `make local-dev` +[multiply-params : product] 50000 +``` + +## Installing Dashboard -1. Update the dependencies +### Prerequisite - `make update-deps` +At present the operator need to add `cluster-admin` clusterrole to install Tektoncd Dashboard. + +```shell script +kc create clusterrolebinding tekton-operator-cluster-admin --clusterrole cluster-admin --serviceaccount tekton-operator:tekton-operator +--- +clusterrolebinding.rbac.authorization.k8s.io/tekton-operator-cluster-admin created +``` +### Install Dashboard -## Running E2E Tests Locally (Development) +Tektoncd Dashboard can be installed by creating an instance of TektonAddon CRD. -1. run +create `tekton-dashboard.yaml` - `local-test-e2e` +```yaml +apiVersion: operator.tekton.dev/v1alpha1 +kind: TektonAddon +metadata: + name: dashboard +spec: + # Add fields here + version: v0.8.2 +``` -1. to watch resources getting created/deleted, run in a separate terminal: +Create the resource on the cluster. - `watch -d -n 1 kubectl get all -n tekton-pipelines` +```shell script +kubectl apply -f tekton-dashboard.yaml +... +tektonaddon.operator.tekton.dev/dashboard created +``` -## Building the Operator Image -1. Enable go mod +### Check Install status - `export GO111MODULE=on` - -2. Build go and the container image +```shell script +kubectl get tektonaddon dashboard -o jsonpath='{.status.conditions[0]}' +--- +map[code:installed version:v0.8.2] +``` - `operator-sdk build ${YOUR_REGISTORY}/tekton-operator:${IMAGE_TAG}` - -3. Push the container image +wait the Tekton Dashboard Deployment and Service comes up - `docker push ${YOUR_REGISTORY}/tekton-operator:${IMAGE_TAG}` - -4. Edit the 'image' value in config/operator.yaml to match to your image +```shell script +kubectl get deploy,svc -n tekton-pipelines +--- +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/tekton-dashboard 1/1 1 1 8m55s +deployment.apps/tekton-pipelines-controller 1/1 1 1 31m +deployment.apps/tekton-pipelines-webhook 1/1 1 1 30m + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/tekton-dashboard ClusterIP 10.0.5.197 9097/TCP 8m56s +service/tekton-pipelines-controller ClusterIP 10.0.14.97 9090/TCP 31m +service/tekton-pipelines-webhook ClusterIP 10.0.0.201 9090/TCP,8008/TCP,443/TCP 31m +``` + +### Accessing Tekton Dashboard + +we can access the Tekton Dashboard by exposing the `service/tekton-dashboard`. ([port-forward](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) or by creating an ingress) +Reference: +- on minikube: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/ +- on KIND: https://kind.sigs.k8s.io/docs/user/ingress/ +- refer to platform specific documentation if your using a managed Kubernets cluster (eg: AKS, EKS, GKE...) + +Once the Tekton Dashboard is accesible, we can see Pipelines, PipelineRuns, logs etc. + +**PipelineRuns** +![pipelineruns](docs/images/tekton-dashboard-v0.8.2-pipelineruns.png) + +**PipelineRun Logs** +![pipelinerunlogs](docs/images/tekton-dashboard-v0.8.2-pipelinerunlogs.png) + +## Installing Tekton Triggers + +Tektoncd Triggers can be installed by creating an instance of TektonAddon CRD. + +create `tekton-triggers.yaml` + +```yaml +apiVersion: operator.tekton.dev/v1alpha1 +kind: TektonAddon +metadata: + name: trigger +spec: + # Add fields here + version: v0.7.0 +``` + +Create the resource on the cluster. + +```shell script +kubectl apply -f tekton-triggers.yaml +--- +tektonaddon.operator.tekton.dev/triggers created +``` + +### Check Install status + +```shell script +tkn version +--- +Client version: 0.10.0 +Pipeline version: v0.15.1 +Triggers version: v0.7.0 +``` + +### Using Tekton Triggers + +Please refer [Tektoncd/Triggers: Event Triggering with Tekton](https://github.com/tektoncd/triggers) + +# Tekton Operator CRDs + +## The TektonPipelines CRD + +This is a sample of [TektonPipelines cr](config/crds/operator_v1alpha1_pipeline_cr.yaml) -## The CRD -This is a sample of [cr](https://github.com/tektoncd/operator/blob/master/config/crds/operator_v1alpha1_pipeline_cr.yaml) ``` apiVersion: operator.tekton.dev/v1alpha1 kind: TektonPipeline @@ -78,23 +209,35 @@ spec: ``` The crd is `Cluster scope`, and `targetNamespace` means `Tekton Pipleine` will installed in it. -By default the cr will be created automatic, means `Tekton Pipeline` will be installed automatic when Operator installed. +Note: The operator creates the cr automatically, means `Tekton Pipeline` will be installed automatic when Operator installed. To change the behavior, you could add argument: `no-auto-install=true` to config/operator.yaml, like this: ``` -args: -- --no-auto-install=true +... + spec: + serviceAccountName: tekton-operator + containers: + - name: tekton-operator + image: ko://github.com/tektoncd/operator/cmd/manager + imagePullPolicy: Always + args: + - --no-auto-install=true +... ``` -Then install `Tekton Pipeline` manually: +Then reset the Operator `Tekton Pipeline` manually: -`kubectl apply -f config/crds/operator_v1alpha1_pipeline_cr.yaml` +```shell script +ko delete -f config + +ko apply -f config +``` ## TektonAddon components Supported tektonaddon components are installed by creating the 'tektonaddon' CR for the component. -Sample [cr](https://github.com/tektoncd/operator/blob/master/config/crds/operator_v1alpha1_addon_dashboard_cr.yaml) +Sample CR ``` apiVersion: operator.tekton.dev/v1alpha1 @@ -102,28 +245,21 @@ kind: TektonAddon metadata: name: dashboard spec: - # Add fields here version: v0.8.2 ``` The current supported components and versions are: - dashboard - - v0.1.1 - - v0.2.0 - - openshift-v0.2.0 - - v0.6.1 + - openshift-v0.8.2 - v0.8.2 - extensionwebhooks - v0.2.0 - openshift-v0.2.0 - v0.6.1 - trigger - - v0.1.0 - - v0.2.1 - - v0.3.1 - - v0.4.0 - - v0.5.0 - - v0.6.0 - - v0.6.1 - v0.7.0 + +# References + +- [Development Guide](docs/README.md) diff --git a/cmd/manager/kodata/resources/addons/dashboard/openshift-v0.8.2/openshift-tekton-dashboard-release.yaml b/cmd/manager/kodata/resources/addons/dashboard/openshift-v0.8.2/openshift-tekton-dashboard-release.yaml new file mode 100644 index 0000000000..05ba9bce5b --- /dev/null +++ b/cmd/manager/kodata/resources/addons/dashboard/openshift-v0.8.2/openshift-tekton-dashboard-release.yaml @@ -0,0 +1,578 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: extensions.dashboard.tekton.dev +spec: + additionalPrinterColumns: + - JSONPath: .spec.apiVersion + name: API version + type: string + - JSONPath: .spec.name + name: Kind + type: string + - JSONPath: .spec.displayname + name: Display name + type: string + - JSONPath: .metadata.creationTimestamp + name: Age + type: date + group: dashboard.tekton.dev + names: + categories: + - tekton + - tekton-dashboard + kind: Extension + plural: extensions + shortNames: + - ext + - exts + preserveUnknownFields: false + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true + versions: + - name: v1alpha1 + served: true + storage: true +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + annotations: + serviceaccounts.openshift.io/oauth-redirectreference.primary: '{"kind":"OAuthRedirectReference","apiVersion":"v1", + "reference":{"kind":"Route","name":"tekton-dashboard"}}' + labels: + app: tekton-dashboard + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard + namespace: openshift-pipelines +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-backend +rules: +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list +- apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - use +- apiGroups: + - tekton.dev + resources: + - clustertasks + - clustertasks/status + verbs: + - get + - list + - watch +- apiGroups: + - triggers.tekton.dev + resources: + - clustertriggerbindings + verbs: + - get + - list + - watch +- apiGroups: + - dashboard.tekton.dev + resources: + - extensions + verbs: + - create + - update + - delete + - patch +- apiGroups: + - tekton.dev + resources: + - clustertasks + - clustertasks/status + verbs: + - create + - update + - delete + - patch +- apiGroups: + - triggers.tekton.dev + resources: + - clustertriggerbindings + verbs: + - create + - update + - delete + - patch + - add +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-dashboard +rules: +- apiGroups: + - apps + resources: + - deployments + verbs: + - list +- apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - get + - list +- apiGroups: + - extensions + - apps + resources: + - ingresses + verbs: + - get + - list + - watch +--- +aggregationRule: + clusterRoleSelectors: + - matchLabels: + rbac.dashboard.tekton.dev/aggregate-to-dashboard: "true" +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-extensions +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-pipelines +rules: +- apiGroups: + - apps + resources: + - deployments + verbs: + - list +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-tenant +rules: +- apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - watch +- apiGroups: + - dashboard.tekton.dev + resources: + - extensions + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + - pods/log + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - tekton.dev + resources: + - tasks + - taskruns + - pipelines + - pipelineruns + - pipelineresources + - conditions + - tasks/status + - taskruns/status + - pipelines/status + - pipelineruns/status + - taskruns/finalizers + - pipelineruns/finalizers + verbs: + - get + - list + - watch +- apiGroups: + - triggers.tekton.dev + resources: + - eventlisteners + - triggerbindings + - triggertemplates + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - update + - patch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - create + - update + - delete +- apiGroups: + - tekton.dev + resources: + - tasks + - taskruns + - pipelines + - pipelineruns + - pipelineresources + - conditions + - taskruns/finalizers + - pipelineruns/finalizers + - tasks/status + - taskruns/status + - pipelines/status + - pipelineruns/status + verbs: + - create + - update + - delete + - patch +- apiGroups: + - triggers.tekton.dev + resources: + - eventlisteners + - triggerbindings + - triggertemplates + verbs: + - create + - update + - delete + - patch + - add +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-triggers +rules: +- apiGroups: + - apps + resources: + - deployments + verbs: + - list +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-backend +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-backend +subjects: +- kind: ServiceAccount + name: tekton-dashboard + namespace: openshift-pipelines +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + service.alpha.openshift.io/serving-cert-secret-name: proxy-tls + labels: + app: tekton-dashboard + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/name: dashboard + app.kubernetes.io/part-of: tekton-dashboard + app.kubernetes.io/version: v0.8.2 + dashboard.tekton.dev/release: v0.8.2 + version: v0.8.2 + name: tekton-dashboard + namespace: openshift-pipelines +spec: + ports: + - name: http + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: tekton-dashboard + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/name: dashboard + app.kubernetes.io/part-of: tekton-dashboard +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: tekton-dashboard-internal + dashboard.tekton.dev/release: v0.8.2 + version: v0.8.2 + name: tekton-dashboard-internal + namespace: openshift-pipelines +spec: + ports: + - name: http + port: 9097 + protocol: TCP + targetPort: 9097 + selector: + app: tekton-dashboard +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: tekton-dashboard + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/name: dashboard + app.kubernetes.io/part-of: tekton-dashboard + app.kubernetes.io/version: v0.8.2 + dashboard.tekton.dev/release: v0.8.2 + version: v0.8.2 + name: tekton-dashboard + namespace: openshift-pipelines +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/name: dashboard + app.kubernetes.io/part-of: tekton-dashboard + template: + metadata: + labels: + app: tekton-dashboard + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/name: dashboard + app.kubernetes.io/part-of: tekton-dashboard + app.kubernetes.io/version: v0.8.2 + name: tekton-dashboard + spec: + containers: + - args: + - --port=9097 + - --logout-url=/oauth/sign_out + - --pipelines-namespace=openshift-pipelines + - --triggers-namespace=openshift-pipelines + - --read-only=false + - --csrf-secure-cookie=false + - --log-level=info + - --log-format=json + - --namespace= + - --openshift=true + - --stream-logs=false + env: + - name: INSTALLED_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: gcr.io/tekton-releases/github.com/tektoncd/dashboard/cmd/dashboard@sha256:4175d6237de3f85d4cfa2e331e244f0b1c20776455af10dcccdb81a3f9ebb012 + livenessProbe: + httpGet: + path: /health + port: 9097 + name: tekton-dashboard + ports: + - containerPort: 9097 + readinessProbe: + httpGet: + path: /readiness + port: 9097 + - args: + - --https-address=:8443 + - --provider=openshift + - --skip-provider-button=true + - --openshift-service-account=tekton-dashboard + - --upstream=http://localhost:9097 + - --tls-cert=/etc/tls/private/tls.crt + - --tls-key=/etc/tls/private/tls.key + - --cookie-secret=SECRET + - --skip-auth-regex=^/v1/extensions/.*\.js + image: openshift/oauth-proxy@sha256:6bc1759a3202b4614739f12441461e344907f6b3f758c34314284debe36d4e15 + imagePullPolicy: IfNotPresent + name: oauth-proxy + ports: + - containerPort: 8443 + name: public + securityContext: + runAsUser: 1000 + volumeMounts: + - mountPath: /etc/tls/private + name: proxy-tls + securityContext: + runAsNonRoot: true + serviceAccountName: tekton-dashboard + volumes: + - name: proxy-tls + secret: + secretName: proxy-tls +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: tekton-dashboard + namespace: openshift-pipelines +spec: + tls: + insecureEdgeTerminationPolicy: Redirect + termination: Reencrypt + to: + kind: Service + name: tekton-dashboard + +--- +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-pipelines + namespace: openshift-pipelines +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-pipelines +subjects: + - kind: ServiceAccount + name: tekton-dashboard + namespace: openshift-pipelines +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-dashboard + namespace: openshift-pipelines +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-dashboard +subjects: + - kind: ServiceAccount + name: tekton-dashboard + namespace: openshift-pipelines +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-triggers + namespace: openshift-pipelines +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-triggers +subjects: + - kind: ServiceAccount + name: tekton-dashboard + namespace: openshift-pipelines +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-tenant +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-tenant +subjects: + - kind: ServiceAccount + name: tekton-dashboard + namespace: openshift-pipelines +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: dashboard + app.kubernetes.io/instance: default + app.kubernetes.io/part-of: tekton-dashboard + name: tekton-dashboard-extensions +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-extensions +subjects: + - kind: ServiceAccount + name: tekton-dashboard + namespace: openshift-pipelines diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..51b7b180f5 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,43 @@ +# Development Guide + +## Development Prerequisites +1. [`go`](https://golang.org/doc/install): The language Tektoncd-pipeline-operator is + built in +1. [`git`](https://help.github.com/articles/set-up-git/): For source control +1. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/): For + interacting with your kube cluster +1. [operator-sdk v0.17.0](https://github.com/operator-framework/operator-sdk) +1. [ko](https://github.com/google/ko#installation) + + +## Running Operator Locally (Development) + +1. Apply Operator CRD + + `kubectl apply -f config/crds/*_crd.yaml` + +1. start operator + + `make local-dev` + +1. Update the dependencies + + `make update-deps` + +## Running E2E Tests Locally (Development) + +1. run + + `make local-test-e2e` + +1. to watch resources getting created/deleted, run in a separate terminal: + + `watch -d -n 1 kubectl get all -n tekton-pipelines` + +## KO based development workflow + +1. Set `KO_DOCKER_ENV` environment variable ([ko#usage](https://github.com/google/ko#usage)) + +1. Set `KO_DATA_PATH=${GOPATH}/src/github.com/tektoncd/operator/cmd/manager/kodata` + +1. run `make ko-apply` diff --git a/docs/images/tekton-dashboard-v0.8.2-pipelinerunlogs.png b/docs/images/tekton-dashboard-v0.8.2-pipelinerunlogs.png new file mode 100644 index 0000000000..1705eb843c Binary files /dev/null and b/docs/images/tekton-dashboard-v0.8.2-pipelinerunlogs.png differ diff --git a/docs/images/tekton-dashboard-v0.8.2-pipelineruns.png b/docs/images/tekton-dashboard-v0.8.2-pipelineruns.png new file mode 100644 index 0000000000..c7c745521c Binary files /dev/null and b/docs/images/tekton-dashboard-v0.8.2-pipelineruns.png differ diff --git a/test/e2e/main_test.go b/test/e2e/main_test.go index 15430855ed..10da55cf6b 100644 --- a/test/e2e/main_test.go +++ b/test/e2e/main_test.go @@ -1,3 +1,5 @@ +// +build e2e + package e2e import (