Unverified Commit 22ff2673 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #71406 from WanLinghao/rootcacert_clusterrole_fix

Fix feature-gate inconsistent between rootcacertpublisher and post-start clusterroles
parents 414cfbd8 0bab5ee5
...@@ -353,7 +353,7 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding) ...@@ -353,7 +353,7 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding)
}) })
} }
if utilfeature.DefaultFeatureGate.Enabled(features.TokenRequest) { if utilfeature.DefaultFeatureGate.Enabled(features.BoundServiceAccountTokenVolume) {
addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{ addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{
ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "root-ca-cert-publisher"}, ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "root-ca-cert-publisher"},
Rules: []rbacv1.PolicyRule{ Rules: []rbacv1.PolicyRule{
......
...@@ -365,23 +365,6 @@ items: ...@@ -365,23 +365,6 @@ items:
creationTimestamp: null creationTimestamp: null
labels: labels:
kubernetes.io/bootstrapping: rbac-defaults kubernetes.io/bootstrapping: rbac-defaults
name: system:controller:root-ca-cert-publisher
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:controller:root-ca-cert-publisher
subjects:
- kind: ServiceAccount
name: root-ca-cert-publisher
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:route-controller name: system:controller:route-controller
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
......
...@@ -1039,31 +1039,6 @@ items: ...@@ -1039,31 +1039,6 @@ items:
creationTimestamp: null creationTimestamp: null
labels: labels:
kubernetes.io/bootstrapping: rbac-defaults kubernetes.io/bootstrapping: rbac-defaults
name: system:controller:root-ca-cert-publisher
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- update
- apiGroups:
- ""
resources:
- events
verbs:
- 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:route-controller name: system:controller:route-controller
rules: rules:
- apiGroups: - apiGroups:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment