apiVersion: v1
kind: ServiceAccount
metadata:
  name: container-mom
  namespace: container-mom
imagePullSecrets:
- name: container-mom-registry
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: container-mom
rules:
- apiGroups: ["container.mom"]
  resources: ["containermomdeployments"]
  verbs: ["*"]
- apiGroups: ["apps"]
  resources: ["deployments"]
  verbs: ["*"]
- apiGroups: [""]
  resources: ["services", "secrets", "configmaps"]
  verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: container-mom
subjects:
- kind: ServiceAccount
  name: container-mom
  namespace: default
roleRef:
  kind: ClusterRole
  name: container-mom
  apiGroup: rbac.authorization.k8s.io 