Skip to content

Commit fc3689f

Browse files
Merge pull request #3864 from Brian-McM/bm-picks-for-1.38
[PICK release-v1.38] add more permissions for gaurdian for net policy
2 parents 559c39c + 3e96118 commit fc3689f

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

pkg/crds/enterprise/crd.projectcalico.org_bgpconfigurations.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ spec:
8888
maximum: 65535
8989
minimum: 1
9090
type: integer
91+
localWorkloadPeeringIPV4:
92+
description: |-
93+
The virtual IPv4 address of the node with which its local workload is expected to peer.
94+
It is recommended to use a link-local address.
95+
type: string
96+
localWorkloadPeeringIPV6:
97+
description: |-
98+
The virtual IPv6 address of the node with which its local workload is expected to peer.
99+
It is recommended to use a link-local address.
100+
type: string
91101
logSeverityScreen:
92102
description: 'LogSeverityScreen is the log severity above which logs
93103
are sent to the stdout. [Default: INFO]'

pkg/crds/enterprise/crd.projectcalico.org_bgppeers.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ spec:
7575
Setting "true" configures the selected BGP Peers node to use the "next hop keep;"
7676
instead of "next hop self;"(default) in the specific branch of the Node on "bird.cfg".
7777
type: boolean
78+
localWorkloadSelector:
79+
description: |-
80+
Selector for the local workload that the node should peer with. When this is set, the peerSelector and peerIP fields must be empty,
81+
and the ASNumber must not be empty.
82+
type: string
7883
maxRestartTime:
7984
description: |-
8085
Time to allow for software restart. When specified, this is configured as the graceful

pkg/render/guardian.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,20 @@ func (c *GuardianComponent) clusterRole() *rbacv1.ClusterRole {
259259
Resources: []string{"deployments", "replicasets", "statefulsets", "daemonsets"},
260260
Verbs: []string{"get", "list", "watch"},
261261
},
262+
rbacv1.PolicyRule{
263+
APIGroups: []string{"networking.k8s.io"},
264+
Resources: []string{"networkpolicies"},
265+
Verbs: []string{"get", "list", "watch"},
266+
},
262267
rbacv1.PolicyRule{
263268
APIGroups: []string{"projectcalico.org"},
264269
Resources: []string{
265270
"clusterinformations",
266271
"tiers",
267272
"stagednetworkpolicies",
268273
"tier.stagednetworkpolicies",
274+
"stagedglobalnetworkpolicies",
275+
"tier.stagedglobalnetworkpolicies",
269276
"networkpolicies",
270277
"tier.networkpolicies",
271278
"globalnetworkpolicies",

0 commit comments

Comments
 (0)