apiVersion: v1 kind: ServiceAccount metadata: name: factorio-deployer namespace: factorio automountServiceAccountToken: false --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: factorio-deployer namespace: factorio rules: - apiGroups: - apps resources: - deployments resourceNames: - factorio verbs: - get - patch - update - watch - apiGroups: - '' resources: - services resourceNames: - factorio - factorio-metrics verbs: - get - patch - update - watch - apiGroups: - '' resources: - configmaps resourceNames: - factorio-scripts - factorio-settings verbs: - get - patch - update - watch - apiGroups: - monitoring.coreos.com resources: - servicemonitors resourceNames: - factorio verbs: - get - patch - update - watch - apiGroups: - monitoring.coreos.com resources: - prometheusrules resourceNames: - factorio verbs: - get - patch - update - watch - apiGroups: - '' resources: - pods - events verbs: - get - list - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: factorio-deployer namespace: factorio roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: factorio-deployer subjects: - kind: ServiceAccount name: factorio-deployer namespace: factorio --- apiVersion: v1 kind: Secret metadata: name: factorio-deployer-token namespace: factorio annotations: kubernetes.io/service-account.name: factorio-deployer type: kubernetes.io/service-account-token --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: factorio-dashboard-deployer namespace: default rules: - apiGroups: - '' resources: - configmaps resourceNames: - factorio-dashboard verbs: - get - patch - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: factorio-dashboard-deployer namespace: default roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: factorio-dashboard-deployer subjects: - kind: ServiceAccount name: factorio-deployer namespace: factorio