Skip to content

Commit

Permalink
Removing unnecessary roles for rbac
Browse files Browse the repository at this point in the history
  • Loading branch information
johnugeorge committed Jun 27, 2019
1 parent d746bde commit 971cf37
Showing 1 changed file with 0 additions and 150 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
all(params):: [

$.parts(params.namespace).configMap(params.cloud, params.tfDefaultImage),
$.parts(params.namespace).serviceAccount,
$.parts(params.namespace).operatorRole,
$.parts(params.namespace).operatorRoleBinding,
Expand All @@ -23,7 +22,6 @@
},
spec: {
group: "kubeflow.org",
version: "v1beta1",
names: {
kind: "TFJob",
singular: "tfjob",
Expand Down Expand Up @@ -76,11 +74,6 @@
},
},
versions: [
{
name: "v1beta1",
served: true,
storage: false,
},
{
name: "v1beta2",
served: true,
Expand Down Expand Up @@ -138,87 +131,14 @@
],
image: image,
name: "tf-job-operator",
volumeMounts: [
{
mountPath: "/etc/config",
name: "config-volume",
},
],
},
],
serviceAccountName: "tf-job-operator",
volumes: [
{
configMap: {
name: "tf-job-operator-config",
},
name: "config-volume",
},
],
},
},
},
}, // tfJobDeploy

// Default value for
defaultControllerConfig(tfDefaultImage):: {
grpcServerFilePath: "/opt/mlkube/grpc_tensorflow_server/grpc_tensorflow_server.py",
}
+ if tfDefaultImage != "" && tfDefaultImage != "null" then
{
tfImage: tfDefaultImage,
}
else
{},

aksAccelerators:: {
accelerators: {
"alpha.kubernetes.io/nvidia-gpu": {
volumes: [
{
name: "nvidia",
mountPath: "/usr/local/nvidia",
hostPath: "/usr/local/nvidia",
},
],
},
},
},

acsEngineAccelerators:: {
accelerators: {
"alpha.kubernetes.io/nvidia-gpu": {
volumes: [
{
name: "nvidia",
mountPath: "/usr/local/nvidia",
hostPath: "/usr/local/nvidia",
},
],
},
},
},

configData(cloud, tfDefaultImage):: self.defaultControllerConfig(tfDefaultImage) +
if cloud == "aks" then
self.aksAccelerators
else if cloud == "acsengine" then
self.acsEngineAccelerators
else
{},

configMap(cloud, tfDefaultImage): {
apiVersion: "v1",
data: {
"controller_config_file.yaml": std.manifestJson($.parts(namespace).configData(cloud, tfDefaultImage)),
},
kind: "ConfigMap",
metadata: {
name: "tf-job-operator-config",
namespace: namespace,
},
},

serviceAccount: {
apiVersion: "v1",
kind: "ServiceAccount",
Expand Down Expand Up @@ -254,49 +174,14 @@
"*",
],
},
{
apiGroups: [
"apiextensions.k8s.io",
],
resources: [
"customresourcedefinitions",
],
verbs: [
"*",
],
},
{
apiGroups: [
"storage.k8s.io",
],
resources: [
"storageclasses",
],
verbs: [
"*",
],
},
{
apiGroups: [
"batch",
],
resources: [
"jobs",
],
verbs: [
"*",
],
},
{
apiGroups: [
"",
],
resources: [
"configmaps",
"pods",
"services",
"endpoints",
"persistentvolumeclaims",
"events",
],
verbs: [
Expand Down Expand Up @@ -443,49 +328,14 @@
"*",
],
},
{
apiGroups: [
"apiextensions.k8s.io",
],
resources: [
"customresourcedefinitions",
],
verbs: [
"*",
],
},
{
apiGroups: [
"storage.k8s.io",
],
resources: [
"storageclasses",
],
verbs: [
"*",
],
},
{
apiGroups: [
"batch",
],
resources: [
"jobs",
],
verbs: [
"*",
],
},
{
apiGroups: [
"",
],
resources: [
"configmaps",
"pods",
"services",
"endpoints",
"persistentvolumeclaims",
"events",
],
verbs: [
Expand Down

0 comments on commit 971cf37

Please sign in to comment.