-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: PuneetPunamiya <[email protected]>
- Loading branch information
1 parent
2834934
commit 8a9927d
Showing
1 changed file
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,51 @@ | ||
# manual-approval | ||
# Manual Approval Gate | ||
|
||
OpenShift Pipelines manual approval custom task | ||
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 | ||
|
||
```yaml | ||
- 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 | ||
### Installation | ||
* On Kubernetes | ||
``` | ||
make apply | ||
``` | ||
* On Openshift | ||
``` | ||
make TARGET=openshift apply | ||
``` |