2019-01-18 00:07:27 +00:00
|
|
|
# Create a ClusterRole for managing autocert secrets, which should
|
|
|
|
# only exist in namespaces with autocert enabled and should always
|
|
|
|
# be labeled `autocert.step.sm/token: true`.
|
|
|
|
#
|
|
|
|
# To create this ClusterRole you need cluster-admin privileges. On
|
|
|
|
# GKE you can give yourself cluster-admin privileges using the
|
|
|
|
# following command:
|
|
|
|
#
|
|
|
|
# kubectl create clusterrolebinding cluster-admin-binding \
|
|
|
|
# --clusterrole cluster-admin \
|
|
|
|
# --user $(gcloud config get-value account)
|
|
|
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
2019-02-06 21:57:29 +00:00
|
|
|
name: autocert-controller
|
2019-01-18 00:07:27 +00:00
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["create", "delete"]
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
2019-02-06 21:57:29 +00:00
|
|
|
name: autocert-controller
|
2019-01-18 00:07:27 +00:00
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
2019-02-06 21:57:29 +00:00
|
|
|
name: autocert-controller
|
2019-01-18 00:07:27 +00:00
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: default
|
|
|
|
namespace: step
|
|
|
|
|