Skip to content

Instantly share code, notes, and snippets.

@viggin543
Created February 27, 2021 07:23
Show Gist options
  • Save viggin543/d57b26e73b1d765558537f660c66bcf9 to your computer and use it in GitHub Desktop.
Save viggin543/d57b26e73b1d765558537f660c66bcf9 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
annotations:
iam.gke.io/gcp-service-account: argocd-backup@<GCP-PROJECT_KEY>.iam.gserviceaccount.com
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Name }}
rules:
- apiGroups: [""]
resources: [ "configmaps","secrets"]
verbs: ["get","list","watch"]
- apiGroups: ["argoproj.io"]
resources: [ "*"]
verbs: ["get","list","watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment