@@ -153,7 +153,7 @@ trait Runner[T <: HasMetadata] {
153
153
}
154
154
155
155
def prepareNamespaceActions (app : App .Cr , labels : CloudflowLabels , ownerReferences : List [OwnerReference ]) =
156
- appActions(app, labels, ownerReferences) ++ serviceAccountAction(app, labels, ownerReferences)
156
+ appActions(app, labels, ownerReferences)
157
157
158
158
def appActions (app : App .Cr , labels : CloudflowLabels , ownerReferences : List [OwnerReference ]): Seq [Action ]
159
159
@@ -177,38 +177,9 @@ trait Runner[T <: HasMetadata] {
177
177
streamletDeployment : App .Deployment ,
178
178
secret : Secret ): Action
179
179
180
- def serviceAccountAction (app : App .Cr , labels : CloudflowLabels , ownerReferences : List [OwnerReference ]): Seq [Action ] =
181
- Seq (Action .createOrReplace(roleBinding(app.namespace, labels, ownerReferences)))
182
-
183
180
def defaultReplicas : Int
184
181
def expectedPodCount (deployment : App .Deployment ): Int
185
182
186
- val BasicUserRole = " system:basic-user"
187
-
188
- def roleBinding (namespace : String , labels : CloudflowLabels , ownerReferences : List [OwnerReference ]): RoleBinding = {
189
- new RoleBindingBuilder ()
190
- .withNewMetadata()
191
- .withName(Name .ofRoleBinding)
192
- .withNamespace(namespace)
193
- .withLabels(labels(Name .ofRoleBinding).asJava)
194
- .withOwnerReferences(ownerReferences : _* )
195
- .endMetadata()
196
- .withKind(" RoleBinding" )
197
- .withRoleRef(
198
- new RoleRefBuilder ()
199
- .withApiGroup(" rbac.authorization.k8s.io" )
200
- .withKind(" Role" )
201
- .withName(BasicUserRole )
202
- .build())
203
- .withSubjects(
204
- new SubjectBuilder ()
205
- .withKind(" ServiceAccount" )
206
- .withName(Name .ofServiceAccount)
207
- .withNamespace(namespace)
208
- .build())
209
- .build()
210
- }
211
-
212
183
val createEventPolicyRule =
213
184
new PolicyRuleBuilder ()
214
185
.withApiGroups(" " )
0 commit comments