Skip to content

Create RBAC and service account, and attach it to deployment #17

@retpolanne

Description

@retpolanne

In order for mitose to watch changes to configmaps, we need to create a service account and bind RBAC rules to it. It's good to add it to the documentation and maybe to the yaml we have on the repo:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: mitose
  namespace: mitose
rules:
- apiGroups: [""]
  resources: ["configmaps"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
  resources: ["deployment"]
  verbs: ["get", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: mitose
  namespace: mitose
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: mitose
subjects:
- kind: ServiceAccount
  name: mitose
  namespace: mitose

And also attach the service account to the deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions