Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/utils/apiresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ var (
Kind: "Node",
}

serviceImportGVK = schema.GroupVersionKind{
Group: NetworkingGroupName,
Version: "v1alpha1",
Kind: "ServiceImport",
}

// we use `;` to separate the different api groups
apiGroupSepToken = ";"
)
Expand Down Expand Up @@ -61,6 +67,7 @@ func NewDisabledResourceConfig() *DisabledResourceConfig {
r.DisableGroup(coordv1.GroupName)
r.DisableGroupVersionKind(corev1PodGVK)
r.DisableGroupVersionKind(corev1NodeGVK)
r.DisableGroupVersionKind(serviceImportGVK)
return r
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ const (
// PlacementFinalizer is used to make sure that we handle gc of placement resources
PlacementFinalizer = "work.fleet.azure.com/placement-protection"
)
const (
// NetworkingGroupName is the group name of the fleet networking
NetworkingGroupName = "networking.fleet.azure.com"
)

var (
FleetRule = rbacv1.PolicyRule{
Expand All @@ -75,7 +79,7 @@ var (
}
FleetNetworkRule = rbacv1.PolicyRule{
Verbs: []string{"*"},
APIGroups: []string{"networking.fleet.azure.com"},
APIGroups: []string{NetworkingGroupName},
Resources: []string{"*"},
}
// LeaseRule Leases permissions are required for leader election of hub controller manager in member cluster.
Expand Down