Giter VIP home page Giter VIP logo

operator's Introduction

Tektoncd Operator

Kubernetes Operator to manage installations, updates and removal of Tektoncd projects (pipeline, dashboard, …)

The following steps will install Tekton Pipeline and configure it appropriately for your cluster.

  1. Create namespace: tekton-operator

    kubectl create namespace tekton-operator

  2. Apply Operator CRD

    kubectl apply -f deploy/crds/operator_v1alpha1_config_crd.yaml
    kubectl apply -f deploy/crds/operator_v1alpha1_addon_crd.yaml

  3. Deploy the Operator

    kubectl -n tekton-operator apply -f deploy/

    The Operator will automatic install Tekton pipeline with v0.10.0 in the namespace tekton-pipeline

Development Prerequisites

  1. go: The language Tektoncd-pipeline-operator is built in
  2. git: For source control
  3. kubectl: For interacting with your kube cluster
  4. operator-sdk: https://github.com/operator-framework/operator-sdk

Running Operator Locally (Development)

  1. Apply Operator CRD

    kubectl apply -f deploy/crds/*_crd.yaml

  2. start operator

    make local-dev

  3. Update the dependencies

    make update-deps

Running E2E Tests Locally (Development)

  1. run

    local-test-e2e

  2. to watch resources getting created/deleted, run in a separate terminal:

    watch -d -n 1 kubectl get all -n tekton-pipelines

Building the Operator Image

  1. Enable go mod

    export GO111MODULE=on

  2. Build go and the container image

    operator-sdk build ${YOUR_REGISTORY}/openshift-pipelines-operator:${IMAGE_TAG}

  3. Push the container image

    docker push ${YOUR-REGISTORY}/openshift-pipelines-operator:${IMAGE-TAG}

  4. Edit the 'image' value in deploy/operator.yaml to match to your image

The CRD

This is a sample of crd

apiVersion: operator.tekton.dev/v1alpha1
kind: Config
metadata:
  name: cluster
spec:
  targetNamespace: tekton-pipelines

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. To change the behavior, you could add argument: no-auto-install=true to deploy/operator.yaml, like this:

args:
- --no-auto-install=true

Then install Tekton Pipeline manually:

kubectl apply -f deploy/crds/*_cr.yaml

Addon components

Supported addon components are installed by creating the 'addon' CR for the component.

Sample CR

apiVersion: operator.tekton.dev/v1alpha1
kind: Addon
metadata:
  name: dashboard
spec:
  version: v0.1.0

The current supported components and versions are:

  • dashboard
    • v0.1.1
    • v0.2.0
    • openshift-v0.2.0
  • extensionwebhooks
    • v0.2.0
    • openshift-v0.2.0
  • trigger
    • v0.1.0
    • v0.2.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.