Merge pull request #1687 from markeijsermans/core-workloads-api-rbac
adjust rbac apiGroups to support core workloads api apps/v1
This commit is contained in:
@@ -74,6 +74,9 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
|||||||
policyRule.withApiGroups(['apps']) +
|
policyRule.withApiGroups(['apps']) +
|
||||||
policyRule.withResources([
|
policyRule.withResources([
|
||||||
'statefulsets',
|
'statefulsets',
|
||||||
|
'daemonsets',
|
||||||
|
'deployments',
|
||||||
|
'replicasets',
|
||||||
]) +
|
]) +
|
||||||
policyRule.withVerbs(['list', 'watch']);
|
policyRule.withVerbs(['list', 'watch']);
|
||||||
|
|
||||||
@@ -222,7 +225,15 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
|||||||
policyRule.withVerbs(['get', 'update']) +
|
policyRule.withVerbs(['get', 'update']) +
|
||||||
policyRule.withResourceNames(['kube-state-metrics']);
|
policyRule.withResourceNames(['kube-state-metrics']);
|
||||||
|
|
||||||
local rules = [coreRule, extensionsRule];
|
local appsRule = policyRule.new() +
|
||||||
|
policyRule.withApiGroups(['apps']) +
|
||||||
|
policyRule.withResources([
|
||||||
|
'deployments',
|
||||||
|
]) +
|
||||||
|
policyRule.withVerbs(['get', 'update']) +
|
||||||
|
policyRule.withResourceNames(['kube-state-metrics']);
|
||||||
|
|
||||||
|
local rules = [coreRule, extensionsRule, appsRule];
|
||||||
|
|
||||||
role.new() +
|
role.new() +
|
||||||
role.mixin.metadata.withName('kube-state-metrics') +
|
role.mixin.metadata.withName('kube-state-metrics') +
|
||||||
|
@@ -34,6 +34,9 @@ rules:
|
|||||||
- apps
|
- apps
|
||||||
resources:
|
resources:
|
||||||
- statefulsets
|
- statefulsets
|
||||||
|
- daemonsets
|
||||||
|
- deployments
|
||||||
|
- replicasets
|
||||||
verbs:
|
verbs:
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
@@ -19,3 +19,12 @@ rules:
|
|||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- update
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resourceNames:
|
||||||
|
- kube-state-metrics
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
Reference in New Issue
Block a user