Skip to content

Commit

Permalink
add workflows app
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Jul 15, 2024
1 parent cce8f65 commit 7bfb568
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
3 changes: 3 additions & 0 deletions workflows/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: datacity-k8s-workflows
version: "v0.0.0"
apiVersion: v2
31 changes: 31 additions & 0 deletions workflows/templates/dgp-operator-runner-service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: dgp-operator-runner
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: dgp-operator-runner
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: dgp-operator-runner
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: dgp-operator-runner
subjects:
- kind: ServiceAccount
name: dgp-operator-runner
28 changes: 28 additions & 0 deletions workflows/templates/dgp-operator-runner-workflow-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: dgp-operator-runner
spec:
entrypoint: dgp-operator-runner
arguments:
parameters:
- name: operator
- name: config_json
templates:
- name: dgp-operator-runner
serviceAccountName: dgp-operator-runner
container:
image: rancher/kubectl:v1.19.15@sha256:fd3d9b88a080a498976fdb5303e22a5217ef509b1e06b1256c1a8277c779ba67
args:
- -n
- datacity
- exec
- -it
- -c
- server
- deployment/ckan-dgp
- --
- bash
- -c
- |
python3 -m datacity_ckan_dgp.operators.{{ "{{workflow.parameters.operator}}" }} '{{ "{{workflow.parameters.config_json}}" }}'

0 comments on commit 7bfb568

Please sign in to comment.