magneticio / vamp

Vamp - canary releasing and autoscaling for microservice systems
http://vamp.io
Apache License 2.0
625 stars 55 forks source link

Kubernetes RBAC are missing #1137

Open etiennetremel opened 6 years ago

etiennetremel commented 6 years ago

I followed the instructions to install Vamp on a Kubernetes cluster, I installed it using Minikube v0.28.2 and Kubernetes v1.10.0. Since RBAC is enabled by default, Vamp cannot create resource:

deployments.extensions is forbidden: User "system:serviceaccount:default:default" cannot create deployments.extensions in the namespace "default"

vamp_kube_quickstart.sh used in the instruction is missing the service account and role/rolebinding configuration.

Maybe not all the features would work, but with the following configuration I'm able to deploy/delete/update a deployment:

apiVersion: v1
kind: ServiceAccount
metadata:
  name: vamp
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: vamp
rules:
- apiGroups:
  - ""
  resources:
  - services
  - namespaces
  - pods
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - extensions
  resources:
  - deployments
  - replicasets
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- nonResourceURLs:
  - "*"
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: vamp
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: vamp
subjects:
- kind: ServiceAccount
  name: vamp
  namespace: default