From ddfc4d3e588840a576bd7ae88c6c74a6a9cf7e85 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 12 Dec 2024 11:54:18 +0000 Subject: [PATCH] update text fixtures for rbac --- .../testdata/cluster-roles.yaml | 7 +++ .../testdata/controller-role-bindings.yaml | 17 +++++++ .../testdata/controller-roles.yaml | 51 +++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml index cfb27005f85..1b1e3ff9fe3 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml @@ -1199,6 +1199,13 @@ items: - create - patch - update + - apiGroups: + - networking.k8s.io + resources: + - servicecidrs + verbs: + - list + - watch - apiGroups: - discovery.k8s.io resources: diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml index 5b7cf3d4644..5eb82584c9e 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml @@ -476,6 +476,23 @@ items: - kind: ServiceAccount name: service-account-controller namespace: kube-system +- apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + annotations: + rbac.authorization.kubernetes.io/autoupdate: "true" + creationTimestamp: null + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:controller:service-cidrs-controller + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:controller:service-cidrs-controller + subjects: + - kind: ServiceAccount + name: service-cidrs-controller + namespace: kube-system - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml index f89dea6d4a5..8042564a725 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml @@ -1328,6 +1328,57 @@ items: - create - patch - update +- apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + annotations: + rbac.authorization.kubernetes.io/autoupdate: "true" + creationTimestamp: null + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:controller:service-cidrs-controller + rules: + - apiGroups: + - networking.k8s.io + resources: + - servicecidrs + verbs: + - get + - list + - patch + - update + - watch + - apiGroups: + - networking.k8s.io + resources: + - servicecidrs/finalizers + verbs: + - patch + - update + - apiGroups: + - networking.k8s.io + resources: + - servicecidrs/status + verbs: + - patch + - update + - apiGroups: + - networking.k8s.io + resources: + - ipaddresses + verbs: + - get + - list + - watch + - apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - patch + - update - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: