-
Notifications
You must be signed in to change notification settings - Fork 1
/
rbac.tf
42 lines (36 loc) · 844 Bytes
/
rbac.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
resource "kubernetes_role" "kfp_sdk_user_role" {
depends_on = [kubernetes_namespace.kubeflow]
metadata {
name = "kfp-sdk-user"
namespace = "kubeflow"
labels = {
app = "ml-pipeline"
}
}
rule {
api_groups = [""]
resources = ["services/proxy"]
verbs = ["create", "get", "list"]
}
}
resource "kubernetes_role_binding" "kfp_sdk_user_rolebinding" {
depends_on = [kubernetes_role.kfp_sdk_user_role]
metadata {
name = "kfp-sdk-user"
namespace = "kubeflow"
labels = {
app = "ml-pipeline"
}
}
role_ref {
api_group = "rbac.authorization.k8s.io"
kind = "Role"
name = "kfp-sdk-user"
}
subject {
api_group = "rbac.authorization.k8s.io"
kind = "Group"
name = "system:authenticated"
namespace = "kubeflow"
}
}