Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit da4cdcc

Browse files
removed system:basic-user, specific privileges are given in helm chart. (#1084)
1 parent 815ada0 commit da4cdcc

File tree

1 file changed

+1
-30
lines changed
  • core/cloudflow-operator/src/main/scala/cloudflow/operator/action/runner

1 file changed

+1
-30
lines changed

core/cloudflow-operator/src/main/scala/cloudflow/operator/action/runner/Runner.scala

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ trait Runner[T <: HasMetadata] {
153153
}
154154

155155
def prepareNamespaceActions(app: App.Cr, labels: CloudflowLabels, ownerReferences: List[OwnerReference]) =
156-
appActions(app, labels, ownerReferences) ++ serviceAccountAction(app, labels, ownerReferences)
156+
appActions(app, labels, ownerReferences)
157157

158158
def appActions(app: App.Cr, labels: CloudflowLabels, ownerReferences: List[OwnerReference]): Seq[Action]
159159

@@ -177,38 +177,9 @@ trait Runner[T <: HasMetadata] {
177177
streamletDeployment: App.Deployment,
178178
secret: Secret): Action
179179

180-
def serviceAccountAction(app: App.Cr, labels: CloudflowLabels, ownerReferences: List[OwnerReference]): Seq[Action] =
181-
Seq(Action.createOrReplace(roleBinding(app.namespace, labels, ownerReferences)))
182-
183180
def defaultReplicas: Int
184181
def expectedPodCount(deployment: App.Deployment): Int
185182

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-
212183
val createEventPolicyRule =
213184
new PolicyRuleBuilder()
214185
.withApiGroups("")

0 commit comments

Comments
 (0)