Skip to content

Commit

Permalink
Add calico-tier-getter RBAC
Browse files Browse the repository at this point in the history
  • Loading branch information
caseydavenport committed Feb 20, 2025
1 parent 45be3e0 commit cc640ce
Show file tree
Hide file tree
Showing 11 changed files with 338 additions and 0 deletions.
28 changes: 28 additions & 0 deletions charts/calico/templates/tier-getter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Implements the necessary permissions for the kube-controller-manager to interact with
# Tiers and Tiered Policies for GC.
#
# https://github.com/tigera/operator/blob/v1.37.0/pkg/render/apiserver.go#L1505-L1545
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: calico-tier-getter
rules:
- apiGroups:
- "projectcalico.org"
resources:
- "tiers"
verbs:
- "get"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: calico-tier-getter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: calico-tier-getter
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:kube-controller-manager
31 changes: 31 additions & 0 deletions manifests/calico-bpf.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions manifests/calico-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,23 @@ rules:
verbs:
- get
---
# Source: calico/templates/tier-getter.yaml
# Implements the necessary permissions for the kube-controller-manager to interact with
# Tiers and Tiered Policies for GC.
#
# https://github.com/tigera/operator/blob/v1.37.0/pkg/render/apiserver.go#L1505-L1545
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: calico-tier-getter
rules:
- apiGroups:
- "projectcalico.org"
resources:
- "tiers"
verbs:
- "get"
---
# Source: calico/templates/calico-kube-controllers-rbac.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -257,6 +274,20 @@ subjects:
name: calico-cni-plugin
namespace: kube-system
---
# Source: calico/templates/tier-getter.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: calico-tier-getter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: calico-tier-getter
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:kube-controller-manager
---
# Source: calico/templates/calico-node.yaml
# This manifest installs the calico-node container, as well
# as the CNI plugins and network config on
Expand Down
31 changes: 31 additions & 0 deletions manifests/calico-policy-only.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions manifests/calico-typha.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions manifests/calico-vxlan.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions manifests/calico.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions manifests/canal-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,23 @@ rules:
verbs:
- get
---
# Source: calico/templates/tier-getter.yaml
# Implements the necessary permissions for the kube-controller-manager to interact with
# Tiers and Tiered Policies for GC.
#
# https://github.com/tigera/operator/blob/v1.37.0/pkg/render/apiserver.go#L1505-L1545
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: calico-tier-getter
rules:
- apiGroups:
- "projectcalico.org"
resources:
- "tiers"
verbs:
- "get"
---
# Source: calico/templates/calico-kube-controllers-rbac.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -337,6 +354,20 @@ subjects:
name: canal-node
namespace: kube-system
---
# Source: calico/templates/tier-getter.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: calico-tier-getter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: calico-tier-getter
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:kube-controller-manager
---
# Source: calico/templates/calico-node.yaml
# This manifest installs the canal-node container, as well
# as the CNI plugins and network config on
Expand Down
31 changes: 31 additions & 0 deletions manifests/canal.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cc640ce

Please sign in to comment.