manual-approval-gate

module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0

README

Manual Approval Gate

Manual Approval Gate is a Kubernetes Custom Resource Definition (CRD) controller. You can use it to add manual approval points in pipeline so that the pipeline wait at that point and waits for a manual approval before continuing execution

You can refer the ApprovalTask in the pipeline similar to how we refer Task today

- name: wait
  taskRef:
    apiVersion: openshift-pipelines.org/v1alpha1
    kind: ApprovalTask
  params:
   - name: approvers
     value:
    	- foo
    	- bar
    	- tekton
   - name: numberOfApprovalsRequired
     value: 2
   - name: description
     value: Approval Task Rocks!!!
Features
  • While referring the approvalTask in the pipelinerun following params need to be added

    • approvers - The users who can approve/reject the approvalTask to unblock the pipeline
    • numberOfApprovalsRequired - Numbers of approvals required to unblock the pipeline
    • description - Description of approvalTask which users want to give
  • Support for multiple users

    • Until and unless numberOfApprovalsRequired limit is not reached i.e approval task does not get approval from the users as approve, till then approvalState will be pending
    • If any one approver rejects the approval task controller will mark the approvalState as rejected and then the pipelinerun will fail
    • If a user approves for the first time and still approvalsRequired limit is not reached i.e. approvalState is in pending state then user can still change his input and mark the approval task as reject
  • A webhook is configured while you install manual-approval-gate which will take care of all the checks which are required while the approver approves/rejects the approvalTask

  • Users can add timeout to the approvalTask

  • As of today once the timeout exceeds, approvalTask state is marked as rejected and correspondingly customrun and pipelinerun will be failed

  • Users can add messages while approving/rejecting the approvalTask

  • tkn-approvaltask CLI for managing approvaltasks

Installation
  • On Kubernetes
    make apply
    
  • On Openshift
    make TARGET=openshift apply
    

Directories

Path Synopsis
cmd
pkg
apis/approvaltask/v1alpha1
Package v1alpha1 contains API Schema definitions for the taskloop v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=openshiftpipelines.org
Package v1alpha1 contains API Schema definitions for the taskloop v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=openshiftpipelines.org
cli
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/approvaltask/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/approvaltask/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
test
cli
third_party
github.com/hashicorp/errwrap
Package errwrap implements methods to formalize error wrapping in Go.
Package errwrap implements methods to formalize error wrapping in Go.
github.com/hashicorp/golang-lru
Package lru provides three different LRU caches of varying sophistication.
Package lru provides three different LRU caches of varying sophistication.
github.com/hashicorp/golang-lru/simplelru
Package simplelru provides simple LRU implementation based on build-in container/list.
Package simplelru provides simple LRU implementation based on build-in container/list.

Jump to

Keyboard shortcuts

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