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 Jan 1, 2024
1 parent 3dc7609 commit 43946fa
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", "delete"]
- 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 43946fa

Please sign in to comment.