kind: Template
apiVersion: template.openshift.io/v1
metadata:
  labels:
    app: kubernetes-image-puller
  name: kubernetes-image-puller
objects:
- apiVersion: rbac.authorization.k8s.io/v1
  kind: Role
  metadata:
    name: create-daemonset
  rules:
  - apiGroups:
    - apps
    resources:
    - daemonsets
    - deployments
    verbs:
    - create
    - delete
    - watch
    - get
    - list
- apiVersion: rbac.authorization.k8s.io/v1
  kind: RoleBinding
  metadata:
    name: create-daemonset
  roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: Role
    name: create-daemonset
  subjects:
  - kind: ServiceAccount
    name: ${SERVICEACCOUNT_NAME}
- apiVersion: v1
  kind: ServiceAccount
  metadata:
    name: ${SERVICEACCOUNT_NAME}
parameters:
- name: SERVICEACCOUNT_NAME
  value: k8s-image-puller
