-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding RBAC support in kubernetes config (V2) (#694)
* Adding RBAC support in kubernetes config * Enable metric test in k8s * Pass namespace to yaml templates, update API call * Use RbacAuthorizationV1beta1Api * Fix python k8s api * Pass in svc account to deployment * Use latest minikube * Revert "Use latest minikube" This reverts commit 50dbf75. * use default service account for prom * clean up * Deleting cluster role instead of namespaced role * removed service_account_name from start_prom
- Loading branch information
Showing
4 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
clipper_admin/clipper_admin/kubernetes/rbac_cluster_role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
ai.clipper.container.label: {{ cluster_name }} | ||
ai.clipper.name: prom-cluster-role | ||
name: {{cluster_name}}-prometheus | ||
rules: | ||
- apiGroups: [""] | ||
resources: | ||
- nodes | ||
- nodes/proxy | ||
- services | ||
- endpoints | ||
- pods | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- ingresses | ||
verbs: ["get", "list", "watch"] | ||
- nonResourceURLs: ["/metrics"] | ||
verbs: ["get"] |
15 changes: 15 additions & 0 deletions
15
clipper_admin/clipper_admin/kubernetes/rbac_cluster_role_binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
ai.clipper.container.label: {{ cluster_name }} | ||
ai.clipper.name: prom-cluster-role-binding | ||
name: {{cluster_name}}-prometheus | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{cluster_name}}-prometheus | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: {{ namespace }} |