manual-approve-tekton

module
v0.0.0-...-dc5cab6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2021 License: Apache-2.0

README

Tekton Manual Approve

In a Tekton pipeline, sometimes, we need to pause on a certain step to wait a manual approve or someting, the whole pipeline will blocked unless approved. This repo supplied such functionality.

CRD introduced:

ApproveRequest
The CRD is a approve request template. In its spec, should be some information of the approver or other things about the approve. In its status, will keep a array for all approve request who bind to the template, like this:

status:
  requests:
  - approved: true
    requestTimestamp: "2021-12-09T01:11:42Z"
    requstName: request-run-16gd2d
  - requestTimestamp: "2021-12-09T02:07:51Z"
    requstName: request-runzsdtp
Controller

The controller is based on knative-pkg

GUI

The project has a very simple GUI to do the approvement, like this: starBoard Report

starBoard Report
Quick Start

The repo managered with KO, so please make sure ko is ready.

  1. Deploy

    ko apply -f config/
    
  2. Export GUI

    kubectl -n tekton-manualapprove port-forward svc/controller 8888:80 --address 0.0.0.0
    
  3. Create ApproveRequest

    kubectl create -f request.yaml
    
  4. Create Run

    kubectl create -f run.yaml
    
  5. Visite the GUI

Directories

Path Synopsis
cmd
pkg
apis/approverequests/v1alpha1
+k8s:deepcopy-gen=package +groupName=custom.tekton.dev
+k8s:deepcopy-gen=package +groupName=custom.tekton.dev
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/approverequests/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/approverequests/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL