Skip to content

Commit

Permalink
Fix the TFJobs Dashboard UI
Browse files Browse the repository at this point in the history
* The UI isn't able to list jobs in all namespaces because the
  cluster role binding isn't using the correct role

Related to kubeflow/trainer#836
  • Loading branch information
jlewi committed Oct 5, 2018
1 parent 9271ebc commit 36f0f8d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
30 changes: 29 additions & 1 deletion kubeflow/core/tests/tf-job_test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -520,4 +520,32 @@ std.assertEqual(
},
],
}
)
)

&&

std.assertEqual(
tfjobv1alpha1.tfUiRoleBinding,
{
apiVersion: "rbac.authorization.k8s.io/v1beta1",
kind: "ClusterRoleBinding",
metadata: {
labels: {
app: "tf-job-dasbhoard",
},
name: "tf-job-dashboard",
},
roleRef: {
apiGroup: "rbac.authorization.k8s.io",
kind: "ClusterRole",
name: "tf-job-dashboard",
},
subjects: [
{
kind: "ServiceAccount",
name: "tf-job-dashboard",
namespace: "test-kf-001",
},
],
}
)
6 changes: 3 additions & 3 deletions kubeflow/core/tf-job-operator.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@
},
subjects: [
{
kind: tfServiceAccount.kind,
name: tfServiceAccount.metadata.name,
namespace: tfServiceAccount.metadata.namespace,
kind: tfUiServiceAccount.kind,
name: tfUiServiceAccount.metadata.name,
namespace: tfUiServiceAccount.metadata.namespace,
},
],
},
Expand Down

0 comments on commit 36f0f8d

Please sign in to comment.