Skip to content
Snippets Groups Projects
Commit 10315f61 authored by Frederic Branczyk's avatar Frederic Branczyk Committed by GitHub
Browse files

Merge pull request #1687 from markeijsermans/core-workloads-api-rbac

adjust rbac apiGroups to support core workloads api apps/v1
parents d01cdf96 cf6232c4
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,9 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; ...@@ -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'; ...@@ -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: ...@@ -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: ...@@ -19,3 +19,12 @@ rules:
verbs: verbs:
- get - get
- update - update
- apiGroups:
- apps
resourceNames:
- kube-state-metrics
resources:
- deployments
verbs:
- get
- update
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment