-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow step to run workflow helper to send webhooks
created a new argo template and added it to the end of the adviser workflow and added role to be used by new workflow template
- Loading branch information
1 parent
1e97968
commit 6ee804a
Showing
6 changed files
with
88 additions
and
0 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
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
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: trigger-integration | ||
annotations: | ||
operation: workflow-helpers | ||
spec: | ||
templates: | ||
- name: send-webhooks | ||
podSpecPatch: '{"serviceAccountName": "send-webhooks"}' | ||
resubmitPendingPods: true | ||
inputs: | ||
parameters: | ||
- name: document-id | ||
- name: secret-namespace | ||
container: | ||
name: trigger-integration | ||
image: workflow-helpers:latest | ||
env: | ||
- name: THOTH_WORKFLOW_TASK | ||
value: send_webhooks | ||
- name: DOCUMENT_ID | ||
value: "{{inputs.parameters.document-id}}" | ||
- name: THOTH_BACKEND_NAMESPACE | ||
value: "{{inputs.parameters.secret-namespace}}" | ||
- name: WEBHOOK_DIR | ||
value: "/secret/callback" | ||
resources: | ||
limits: | ||
cpu: 250m | ||
memory: 256Mi | ||
requests: | ||
cpu: 250m | ||
memory: 256Mi | ||
volumeMounts: | ||
- name: callback-secret | ||
mountPath: "/secret/callback" |
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: send-webhooks | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: delete-secrets | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- delete # for wfh send webhooks step | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: send-webhooks | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: delete-secrets | ||
subjects: | ||
- kind: ServiceAccount | ||
name: send-webhooks |