Skip to content
Snippets Groups Projects
Commit 553d6b0c authored by Max Leonard Inden's avatar Max Leonard Inden
Browse files

rbac: Remove Third Party Resources rules

Since PR 460 [1] the Prometheus Operator is using Kubernetes Custom Resource
Definitions instead of Kubernetes Third Party Resources. Permissions to
handle Third Party Resources in the RBAC rules of the Prometheus
Operator is thereby obsolete.

[1] https://github.com/coreos/prometheus-operator/pull/460
parent 4ba69954
No related branches found
No related tags found
No related merge requests found
...@@ -33,13 +33,6 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; ...@@ -33,13 +33,6 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
local clusterRole = k.rbac.v1.clusterRole; local clusterRole = k.rbac.v1.clusterRole;
local policyRule = clusterRole.rulesType; local policyRule = clusterRole.rulesType;
local extensionsRule = policyRule.new() +
policyRule.withApiGroups(['extensions']) +
policyRule.withResources([
'thirdpartyresources',
]) +
policyRule.withVerbs(['*']);
local apiExtensionsRule = policyRule.new() + local apiExtensionsRule = policyRule.new() +
policyRule.withApiGroups(['apiextensions.k8s.io']) + policyRule.withApiGroups(['apiextensions.k8s.io']) +
policyRule.withResources([ policyRule.withResources([
...@@ -102,7 +95,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; ...@@ -102,7 +95,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
]) + ]) +
policyRule.withVerbs(['list', 'watch']); policyRule.withVerbs(['list', 'watch']);
local rules = [extensionsRule, apiExtensionsRule, monitoringRule, appsRule, coreRule, podRule, routingRule, nodeRule, namespaceRule]; local rules = [apiExtensionsRule, monitoringRule, appsRule, coreRule, podRule, routingRule, nodeRule, namespaceRule];
clusterRole.new() + clusterRole.new() +
clusterRole.mixin.metadata.withName('prometheus-operator') + clusterRole.mixin.metadata.withName('prometheus-operator') +
......
...@@ -3,12 +3,6 @@ kind: ClusterRole ...@@ -3,12 +3,6 @@ kind: ClusterRole
metadata: metadata:
name: prometheus-operator name: prometheus-operator
rules: rules:
- apiGroups:
- extensions
resources:
- thirdpartyresources
verbs:
- '*'
- apiGroups: - apiGroups:
- apiextensions.k8s.io - apiextensions.k8s.io
resources: resources:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment