Skip to content

Commit

Permalink
deploy: Run with a service account that can schedule jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Dec 29, 2023
1 parent 3dc7609 commit ece305b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions deploy/dapps-certification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ spec:
volumes:
- name: ipc
path: /ipc
- type: service-account
properties:
name: dapps-certification
type: webservice
policies:
- name: local-dapps-certification
Expand All @@ -166,3 +169,36 @@ spec:
properties:
policies:
- local-dapps-certification
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: dapps-certification
namespace: dapps-certification-staging
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: dapps-certification
namespace: dapps-certification-staging
rules:
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["get", "create", "watch"]
- apiGroups: [""]
resources: ["pods", "pods/log"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: dapps-certification
namespace: dapps-certification-staging
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: dapps-certification
subjects:
- kind: ServiceAccount
name: dapps-certification
namespace: dapps-certification-staging

0 comments on commit ece305b

Please sign in to comment.