7
7
"k8s.io/kubernetes/pkg/apis/apps"
8
8
"k8s.io/kubernetes/pkg/apis/autoscaling"
9
9
"k8s.io/kubernetes/pkg/apis/batch"
10
+ "k8s.io/kubernetes/pkg/apis/certificates"
10
11
"k8s.io/kubernetes/pkg/apis/extensions"
11
12
"k8s.io/kubernetes/pkg/apis/policy"
12
13
"k8s.io/kubernetes/pkg/apis/storage"
@@ -67,6 +68,9 @@ const (
67
68
InfraPetSetControllerServiceAccountName = "pet-set-controller"
68
69
PetSetControllerRoleName = "system:pet-set-controller"
69
70
71
+ InfraCertificateSigningControllerServiceAccountName = "certificate-signing-controller"
72
+ CertificateSigningControllerRoleName = "system:certificate-signing-controller"
73
+
70
74
InfraUnidlingControllerServiceAccountName = "unidling-controller"
71
75
UnidlingControllerRoleName = "system:unidling-controller"
72
76
@@ -78,6 +82,9 @@ const (
78
82
79
83
InfraServiceIngressIPControllerServiceAccountName = "service-ingress-ip-controller"
80
84
ServiceIngressIPControllerRoleName = "system:service-ingress-ip-controller"
85
+
86
+ InfraNodeBootstrapServiceAccountName = "node-bootstrap"
87
+ NodeBootstrapRoleName = "system:node-bootstrap"
81
88
)
82
89
83
90
type InfraServiceAccounts struct {
@@ -981,6 +988,30 @@ func init() {
981
988
panic (err )
982
989
}
983
990
991
+ err = InfraSAs .addServiceAccount (
992
+ InfraCertificateSigningControllerServiceAccountName ,
993
+ authorizationapi.ClusterRole {
994
+ ObjectMeta : kapi.ObjectMeta {
995
+ Name : CertificateSigningControllerRoleName ,
996
+ },
997
+ Rules : []authorizationapi.PolicyRule {
998
+ {
999
+ APIGroups : []string {certificates .GroupName },
1000
+ Verbs : sets .NewString ("list" , "watch" ),
1001
+ Resources : sets .NewString ("certificatesigningrequests" ),
1002
+ },
1003
+ {
1004
+ APIGroups : []string {certificates .GroupName },
1005
+ Verbs : sets .NewString ("update" ),
1006
+ Resources : sets .NewString ("certificatesigningrequests/status" , "certificatesigningrequests/approval" ),
1007
+ },
1008
+ },
1009
+ },
1010
+ )
1011
+ if err != nil {
1012
+ panic (err )
1013
+ }
1014
+
984
1015
err = InfraSAs .addServiceAccount (
985
1016
InfraEndpointControllerServiceAccountName ,
986
1017
authorizationapi.ClusterRole {
@@ -1050,4 +1081,22 @@ func init() {
1050
1081
panic (err )
1051
1082
}
1052
1083
1084
+ err = InfraSAs .addServiceAccount (
1085
+ InfraNodeBootstrapServiceAccountName ,
1086
+ authorizationapi.ClusterRole {
1087
+ ObjectMeta : kapi.ObjectMeta {
1088
+ Name : NodeBootstrapRoleName ,
1089
+ },
1090
+ Rules : []authorizationapi.PolicyRule {
1091
+ {
1092
+ APIGroups : []string {certificates .GroupName },
1093
+ Verbs : sets .NewString ("create" , "get" ),
1094
+ Resources : sets .NewString ("certificatesigningrequests" ),
1095
+ },
1096
+ },
1097
+ },
1098
+ )
1099
+ if err != nil {
1100
+ panic (err )
1101
+ }
1053
1102
}
0 commit comments