Skip to content

Commit

Permalink
feat: implement argo-workflows (JIRA:PUC-193)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrrax committed Mar 7, 2024
1 parent 9abc5e0 commit eb0e5f4
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
26 changes: 26 additions & 0 deletions components/11-argo-workflows/argo-server-cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## configure clusterrole for argo-server to provide permissions when argo-worfklows is running namespaced

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argo-server
rules:
- apiGroups:
- argoproj.io
resources:
- clusterworkflowtemplates
verbs:
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: argo-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-server
subjects:
- kind: ServiceAccount
name: argo-server
namespace: argo
26 changes: 26 additions & 0 deletions components/11-argo-workflows/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: selfsigned-cluster-issuer
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
name: argo-workflows
spec:
ingressClassName: nginx
rules:
- host: workflows.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argo-server
port:
number: 2746
tls:
- hosts:
- workflows.local
secretName: argo-workflows-ingress-tls
18 changes: 18 additions & 0 deletions components/11-argo-workflows/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,21 @@ kind: Kustomization

resources:
- https://github.com/argoproj/argo-workflows/releases/download/v3.5.4/namespace-install.yaml
- ingress.yaml

## configure argo-workflow rbac
- argo-server-cluster-role.yaml

patches:
- target: # configure argo-server namespaced and to set to server mode to disable auth until auth can be worked out
group: apps
version: v1
kind: Deployment
name: argo-server
path: patch-server-deployment.yaml
- target: # configure the workflow controller to monitor the argo-events namespace
group: apps
version: v1
kind: Deployment
name: workflow-controller
path: patch-workflow-deployment.yaml
10 changes: 10 additions & 0 deletions components/11-argo-workflows/patch-server-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## configure argo-server namespaced and to set to server mode to disable auth until auth can be worked out
- op: replace
path: /spec/template/spec/containers/0/args
value:
- server
- --auth-mode=server
# - --auth-mode=client
- --namespaced
- --managed-namespace
- argo-events
7 changes: 7 additions & 0 deletions components/11-argo-workflows/patch-workflow-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## configure the workflow controller to monitor the argo-events namespace
- op: replace
path: /spec/template/spec/containers/0/args
value:
- --namespaced
- --managed-namespace
- argo-events

0 comments on commit eb0e5f4

Please sign in to comment.