diff --git a/kubeflow/argo/argo.libsonnet b/kubeflow/argo/argo.libsonnet index fddfd9c81c1..40010c4282a 100644 --- a/kubeflow/argo/argo.libsonnet +++ b/kubeflow/argo/argo.libsonnet @@ -3,11 +3,8 @@ // see https://github.com/argoproj/argo/blob/master/cmd/argo/commands/install.go local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", - new(_env, _params):: self + { - local params = _env + _params + { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + new(_env, _params):: { + local params = _env + _params, // CRD's are not namespace scoped; see // https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/ diff --git a/kubeflow/argo/prototypes/argo.jsonnet b/kubeflow/argo/prototypes/argo.jsonnet index 675def52fed..08fea691775 100644 --- a/kubeflow/argo/prototypes/argo.jsonnet +++ b/kubeflow/argo/prototypes/argo.jsonnet @@ -3,7 +3,6 @@ // @description Deploy Argo workflow engine // @shortDescription Argo workflow engine // @param name string Name to give to the component -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam workflowControllerImage string argoproj/workflow-controller:v2.2.0 workflowControllerImage // @optionalParam uiImage string argoproj/argoui:v2.2.0 uiImage // @optionalParam executorImage string argoproj/argoexec:v2.2.0 executorImage diff --git a/kubeflow/core/ambassador.libsonnet b/kubeflow/core/ambassador.libsonnet index 89aa74b47c3..6c0a828a653 100644 --- a/kubeflow/core/ambassador.libsonnet +++ b/kubeflow/core/ambassador.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local ambassadorService = { apiVersion: "v1", diff --git a/kubeflow/core/centraldashboard.libsonnet b/kubeflow/core/centraldashboard.libsonnet index c752a90cf81..3224071f2f1 100644 --- a/kubeflow/core/centraldashboard.libsonnet +++ b/kubeflow/core/centraldashboard.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params + { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local centralDashboardDeployment = { apiVersion: "extensions/v1beta1", diff --git a/kubeflow/core/cert-manager.libsonnet b/kubeflow/core/cert-manager.libsonnet index fb2fd28066c..b953ddc8446 100644 --- a/kubeflow/core/cert-manager.libsonnet +++ b/kubeflow/core/cert-manager.libsonnet @@ -1,10 +1,7 @@ { local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local certificateCRD = { apiVersion: "apiextensions.k8s.io/v1beta1", diff --git a/kubeflow/core/cloud-endpoints.libsonnet b/kubeflow/core/cloud-endpoints.libsonnet index 94af2a3977a..b3910797077 100644 --- a/kubeflow/core/cloud-endpoints.libsonnet +++ b/kubeflow/core/cloud-endpoints.libsonnet @@ -3,8 +3,6 @@ local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, cloudEndpointsImage: "gcr.io/cloud-solutions-group/cloud-endpoints-controller:0.1.1", metacontrollerImage: "gcr.io/enisoc-kubernetes/metacontroller@sha256:18561c63e1c5380ac5bbaabefa933e484bdb499f10b61071506f9a0070bc65f6", }, diff --git a/kubeflow/core/echo-server.libsonnet b/kubeflow/core/echo-server.libsonnet index 6ac58421eb9..d00394dc756 100644 --- a/kubeflow/core/echo-server.libsonnet +++ b/kubeflow/core/echo-server.libsonnet @@ -1,10 +1,7 @@ { local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local service = { apiVersion: "v1", diff --git a/kubeflow/core/google-cloud-filestore-pv.libsonnet b/kubeflow/core/google-cloud-filestore-pv.libsonnet index 2bfbe0918ae..94a2b255735 100644 --- a/kubeflow/core/google-cloud-filestore-pv.libsonnet +++ b/kubeflow/core/google-cloud-filestore-pv.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local persistentVolume = { apiVersion: "v1", diff --git a/kubeflow/core/iap.libsonnet b/kubeflow/core/iap.libsonnet index 4f9f631dd3d..535498e6b1e 100644 --- a/kubeflow/core/iap.libsonnet +++ b/kubeflow/core/iap.libsonnet @@ -3,8 +3,6 @@ local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, disableJwtChecking: util.toBool(_params.disableJwtChecking), hostname: if std.objectHas(_params, "hostname") then _params.hostname else "null", envoyPort: 8080, diff --git a/kubeflow/core/jupyterhub.libsonnet b/kubeflow/core/jupyterhub.libsonnet index c6dfb482d62..7cd80a5fd38 100644 --- a/kubeflow/core/jupyterhub.libsonnet +++ b/kubeflow/core/jupyterhub.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local kubeSpawnerConfig = { apiVersion: "v1", diff --git a/kubeflow/core/metric-collector.libsonnet b/kubeflow/core/metric-collector.libsonnet index bd3dfd98b91..f71e554cb8e 100644 --- a/kubeflow/core/metric-collector.libsonnet +++ b/kubeflow/core/metric-collector.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local metricServiceAccount = { apiVersion: "v1", diff --git a/kubeflow/core/prometheus.libsonnet b/kubeflow/core/prometheus.libsonnet index a690b0e7db5..e34fc32242c 100644 --- a/kubeflow/core/prometheus.libsonnet +++ b/kubeflow/core/prometheus.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local namespace = { apiVersion: "v1", diff --git a/kubeflow/core/prototypes/cert-manager.jsonnet b/kubeflow/core/prototypes/cert-manager.jsonnet index 1c3164f5b0f..023dc07808c 100644 --- a/kubeflow/core/prototypes/cert-manager.jsonnet +++ b/kubeflow/core/prototypes/cert-manager.jsonnet @@ -3,7 +3,6 @@ // @description Provides cert-manager prototypes for generating SSL certificates. // @shortDescription Certificate generation on GKE. // @param name string Name for the component -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @param acmeEmail string The Lets Encrypt account email address // @optionalParam acmeUrl string https://acme-v02.api.letsencrypt.org/directory The ACME server URL, set to https://acme-staging-v02.api.letsencrypt.org/directory for staging API. // @optionalParam certManagerImage string quay.io/jetstack/cert-manager-controller:v0.4.0 certManagerImage diff --git a/kubeflow/core/prototypes/cloud-endpoints.jsonnet b/kubeflow/core/prototypes/cloud-endpoints.jsonnet index d1c6552a080..73ca899eb63 100644 --- a/kubeflow/core/prototypes/cloud-endpoints.jsonnet +++ b/kubeflow/core/prototypes/cloud-endpoints.jsonnet @@ -5,7 +5,6 @@ // @param name string Name for the component // @optionalParam secretName string admin-gcp-sa Name of secret containing the json service account key. // @optionalParam secretKey string admin-gcp-sa.json Name of the key in the secret containing the JSON service account key. -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. local cloudEndpoints = import "kubeflow/core/cloud-endpoints.libsonnet"; local instance = cloudEndpoints.new(env, params); diff --git a/kubeflow/core/prototypes/iap-ingress.jsonnet b/kubeflow/core/prototypes/iap-ingress.jsonnet index e39e0100bad..72ad6c477fe 100644 --- a/kubeflow/core/prototypes/iap-ingress.jsonnet +++ b/kubeflow/core/prototypes/iap-ingress.jsonnet @@ -4,7 +4,6 @@ // @shortDescription Ingress for IAP on GKE. // @param name string Name for the component // @param ipName string The name of the global ip address to use. -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam secretName string envoy-ingress-tls The name of the secret containing the SSL certificates. // @optionalParam hostname string null The hostname associated with this ingress. Eg: mykubeflow.example.com // @optionalParam issuer string letsencrypt-prod The cert-manager issuer name. diff --git a/kubeflow/core/prototypes/jupyterhub.jsonnet b/kubeflow/core/prototypes/jupyterhub.jsonnet index 547ebe5085e..6f4412e4835 100644 --- a/kubeflow/core/prototypes/jupyterhub.jsonnet +++ b/kubeflow/core/prototypes/jupyterhub.jsonnet @@ -4,7 +4,6 @@ // @shortDescription jupyterhub Component // @param name string Name // @optionalParam cloud string null Cloud -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam serviceType string ClusterIP The service type for Jupyterhub. // @optionalParam image string gcr.io/kubeflow/jupyterhub-k8s:v20180531-3bb991b1 The image to use for JupyterHub. // @optionalParam jupyterHubAuthenticator string null The authenticator to use diff --git a/kubeflow/core/prototypes/tf-job-operator.jsonnet b/kubeflow/core/prototypes/tf-job-operator.jsonnet index df54e06fe49..185e3edeb32 100644 --- a/kubeflow/core/prototypes/tf-job-operator.jsonnet +++ b/kubeflow/core/prototypes/tf-job-operator.jsonnet @@ -3,7 +3,6 @@ // @description A TensorFlow job operator CRD // @shortDescription A TensorFlow job operator. // @param name string Name to give to each of the components -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam cloud string null String identifying the cloud to customize the deployment for. // @optionalParam tfJobImage string gcr.io/kubeflow-images-public/tf_operator:v0.3.0 The image for the TfJob controller. // @optionalParam tfDefaultImage string null The default image to use for TensorFlow. diff --git a/kubeflow/core/spartakus.libsonnet b/kubeflow/core/spartakus.libsonnet index 6b16794b21c..3f4d079a7d4 100644 --- a/kubeflow/core/spartakus.libsonnet +++ b/kubeflow/core/spartakus.libsonnet @@ -3,8 +3,6 @@ local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, reportUsageBool: util.toBool(_params.reportUsage), }, diff --git a/kubeflow/core/tests/centraldashboard_test.jsonnet b/kubeflow/core/tests/centraldashboard_test.jsonnet index 9554dbdc4ba..8713228a9e7 100644 --- a/kubeflow/core/tests/centraldashboard_test.jsonnet +++ b/kubeflow/core/tests/centraldashboard_test.jsonnet @@ -1,6 +1,5 @@ local centraldashboard = import "../centraldashboard.libsonnet"; local params = { - namespace:: "kftest", image:: "gcr.io/kubeflow-images-public/centraldashboard:v0.3.0", }; local env = { diff --git a/kubeflow/core/tf-job-operator.libsonnet b/kubeflow/core/tf-job-operator.libsonnet index 9ba7c8eca35..d8454387e7e 100644 --- a/kubeflow/core/tf-job-operator.libsonnet +++ b/kubeflow/core/tf-job-operator.libsonnet @@ -4,10 +4,7 @@ local deployment = k.apps.v1beta1.deployment, new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, // tfJobCrd schema local openAPIV3Schema = { diff --git a/kubeflow/credentials-pod-preset/prototypes/gcp-credentials-pod-preset.jsonnet b/kubeflow/credentials-pod-preset/prototypes/gcp-credentials-pod-preset.jsonnet index 53f057a88bb..ca9e4f647b6 100644 --- a/kubeflow/credentials-pod-preset/prototypes/gcp-credentials-pod-preset.jsonnet +++ b/kubeflow/credentials-pod-preset/prototypes/gcp-credentials-pod-preset.jsonnet @@ -5,14 +5,13 @@ // @param name string Name to give to each of the components // @param serviceAccountName string Name of the GCP service account // @param secretName string Name of the kubernetes secret containing the credentials -// @optionalParam namespace string null Namespace to use for the pod preset. It is automatically inherited from the environment if not set. local k = import "k.libsonnet"; // updatedParams uses the environment namespace if // the namespace parameter is not explicitly set local updatedParams = params { - namespace: if params.namespace == "null" then env.namespace else params.namespace, + namespace: env.namespace, }; local podPreset = { diff --git a/kubeflow/knative-build/knative-build.libsonnet b/kubeflow/knative-build/knative-build.libsonnet index 0b0a1c4b649..187e793c9df 100644 --- a/kubeflow/knative-build/knative-build.libsonnet +++ b/kubeflow/knative-build/knative-build.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/core/util.libsonnet", new(_env, _params):: { - local params = _env + _params + { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local knativeBuildLoggingConfigMap = { apiVersion: "v1", diff --git a/kubeflow/kubebench/prototypes/kubebench-job.jsonnet b/kubeflow/kubebench/prototypes/kubebench-job.jsonnet index 63864cfea62..0401cefdf41 100644 --- a/kubeflow/kubebench/prototypes/kubebench-job.jsonnet +++ b/kubeflow/kubebench/prototypes/kubebench-job.jsonnet @@ -3,7 +3,6 @@ // @description A benchmark job on Kubeflow // @shortDescription A benchmark job on Kubeflow // @param name string Name to give to each of the components -// @optionalParam namespace string null Namespace // @optionalParam serviceAccount string null The service account used to run the job // @optionalParam controllerImage string gcr.io/kubeflow-images-public/kubebench/kubebench-controller:v0.3.0 Configurator image // @optionalParam githubTokenSecret string null Github token secret @@ -28,7 +27,7 @@ local kubebenchJob = import "kubeflow/kubebench/kubebench-job.libsonnet"; local kubebenchRbac = import "kubeflow/kubebench/kubebench-rbac.libsonnet"; local name = params.name; -local namespace = if params.namespace == "null" then env.namespace else params.namespace; +local namespace = env.namespace; local serviceAccount = params.serviceAccount; local controllerImage = params.controllerImage; local configPvc = params.experimentConfigPvc; diff --git a/kubeflow/metacontroller/metacontroller.libsonnet b/kubeflow/metacontroller/metacontroller.libsonnet index 98885ab0724..e574cdac32d 100644 --- a/kubeflow/metacontroller/metacontroller.libsonnet +++ b/kubeflow/metacontroller/metacontroller.libsonnet @@ -4,12 +4,7 @@ local crd = k8s.apiextensions.v1beta1.customResourceDefinition, new(_env, _params):: { - local params = _env + _params { - namespace: - if std.objectHas(_params, "namespace") && - _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local compositeControllerCRD = { apiVersion: "apiextensions.k8s.io/v1beta1", diff --git a/kubeflow/metacontroller/prototypes/metacontroller.jsonnet b/kubeflow/metacontroller/prototypes/metacontroller.jsonnet index 6a1ee1163f5..977650c6b4f 100644 --- a/kubeflow/metacontroller/prototypes/metacontroller.jsonnet +++ b/kubeflow/metacontroller/prototypes/metacontroller.jsonnet @@ -3,7 +3,6 @@ // @description metacontroller Component // @shortDescription metacontroller Component // @param name string Name -// @optionalParam namespace string default Namespace for metacontroller local metacontroller = import "kubeflow/metacontroller/metacontroller.libsonnet"; local instance = metacontroller.new(env, params); diff --git a/kubeflow/mxnet-job/mxnet-operator.libsonnet b/kubeflow/mxnet-job/mxnet-operator.libsonnet index 8da01e2d82a..55df498e35c 100644 --- a/kubeflow/mxnet-job/mxnet-operator.libsonnet +++ b/kubeflow/mxnet-job/mxnet-operator.libsonnet @@ -9,7 +9,7 @@ ], parts(params, env):: { - local namespace = if params.namespace != "null" then params.namespace else env.namespace, + local namespace = env.namespace, crd: { apiVersion: "apiextensions.k8s.io/v1beta1", kind: "CustomResourceDefinition", diff --git a/kubeflow/mxnet-job/prototypes/mxnet-job.jsonnet b/kubeflow/mxnet-job/prototypes/mxnet-job.jsonnet index d84f3e70a2e..17b245cb82b 100644 --- a/kubeflow/mxnet-job/prototypes/mxnet-job.jsonnet +++ b/kubeflow/mxnet-job/prototypes/mxnet-job.jsonnet @@ -3,7 +3,6 @@ // @description A MXNet job (could be training or evaluation). // @shortDescription A MXNet job. // @param name string Name to give to each of the components -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam args string null Comma separated list of arguments to pass to the job // @optionalParam image string null The docker image to use for the job. // @optionalParam imageGpu string mxjob/mxnet:gpu The docker image to use when using GPUs. diff --git a/kubeflow/mxnet-job/prototypes/mxnet-operator.jsonnet b/kubeflow/mxnet-job/prototypes/mxnet-operator.jsonnet index 11b700717c3..79c20364b92 100644 --- a/kubeflow/mxnet-job/prototypes/mxnet-operator.jsonnet +++ b/kubeflow/mxnet-job/prototypes/mxnet-operator.jsonnet @@ -3,7 +3,6 @@ // @description MXNet Operator // @shortDescription MXNet Operator for distributed mxnet on Kubernetes // @param name string Name to give to each of the components -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam disks string null Comma separated list of Google persistent disks to attach to jupyter environments. // @optionalParam cloud string null String identifying the cloud to customize the deployment for. // @optionalParam mxnetJobImage string mxjob/mxnet-operator:v1 The image for the MXNetJob controller diff --git a/kubeflow/new-package-stub/newpackage.libsonnet b/kubeflow/new-package-stub/newpackage.libsonnet index f0f55dcccc4..2bbd24f05e1 100644 --- a/kubeflow/new-package-stub/newpackage.libsonnet +++ b/kubeflow/new-package-stub/newpackage.libsonnet @@ -5,10 +5,7 @@ // sets a local variable params which is _env + _params // All resources defined within self can then access param values as params. new(_env, _params):: self { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, // Define the various resource manifests as local class variables // The resource variable should be descriptive of the resource value being exported, diff --git a/kubeflow/openmpi/all.libsonnet b/kubeflow/openmpi/all.libsonnet index 3c48bc3c659..eaf93c6bed9 100644 --- a/kubeflow/openmpi/all.libsonnet +++ b/kubeflow/openmpi/all.libsonnet @@ -7,10 +7,8 @@ local workloads = import "kubeflow/openmpi/workloads.libsonnet"; all(params, env):: $.parts(params, env).all, parts(params, env):: { - // updatedParams uses the environment namespace if - // the namespace parameter is not explicitly set local updatedParams = params { - namespace: if params.namespace == "null" then env.namespace else params.namespace, + namespace: env.namespace, init: if params.init == "null" then "/kubeflow/openmpi/assets/init.sh" else params.init, exec: if params.exec == "null" then "sleep infinity" else params.exec, }, diff --git a/kubeflow/openmpi/prototypes/openmpi.jsonnet b/kubeflow/openmpi/prototypes/openmpi.jsonnet index 39544c25a8d..8766da1b0fd 100644 --- a/kubeflow/openmpi/prototypes/openmpi.jsonnet +++ b/kubeflow/openmpi/prototypes/openmpi.jsonnet @@ -5,7 +5,6 @@ // @param name string Name to give to each of the components. // @param image string Docker image with openmpi. // @param secret string Name of secret containing ssh keys. -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam workers number 4 Number of workers. // @optionalParam init string null Command to bootstrap the containers. Defaults to init.sh. // @optionalParam exec string null Command to execute in master after bootstrap is done. It sleeps indefinitely if not set. diff --git a/kubeflow/pytorch-job/prototypes/pytorch-job.jsonnet b/kubeflow/pytorch-job/prototypes/pytorch-job.jsonnet index 29473a6b6e6..24f3f89c651 100644 --- a/kubeflow/pytorch-job/prototypes/pytorch-job.jsonnet +++ b/kubeflow/pytorch-job/prototypes/pytorch-job.jsonnet @@ -3,7 +3,6 @@ // @description A PyTorch job (could be training or evaluation). // @shortDescription A PyTorch job. // @param name string Name to give to each of the components -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam args string null Comma separated list of arguments to pass to the job // @optionalParam image string gcr.io/kubeflow-examples/pytorch-dist-mnist:v20180702-a57993c The docker image to use for the job. // @optionalParam numMasters number 1 The number of masters to use diff --git a/kubeflow/pytorch-job/prototypes/pytorch-operator.jsonnet b/kubeflow/pytorch-job/prototypes/pytorch-operator.jsonnet index ec5a926fd5b..ad47291b960 100644 --- a/kubeflow/pytorch-job/prototypes/pytorch-operator.jsonnet +++ b/kubeflow/pytorch-job/prototypes/pytorch-operator.jsonnet @@ -3,7 +3,6 @@ // @description PyTorch Operator // @shortDescription PyTorch Operator for distributed pytorch on Kubernetes // @param name string Name to give to each of the components -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam disks string null Comma separated list of Google persistent disks to attach to jupyter environments. // @optionalParam cloud string null String identifying the cloud to customize the deployment for. // @optionalParam pytorchJobImage string gcr.io/kubeflow-images-public/pytorch-operator:v0.3.0 The image for the PyTorchJob controller diff --git a/kubeflow/pytorch-job/pytorch-operator.libsonnet b/kubeflow/pytorch-job/pytorch-operator.libsonnet index 5c4418687d1..bc997352030 100644 --- a/kubeflow/pytorch-job/pytorch-operator.libsonnet +++ b/kubeflow/pytorch-job/pytorch-operator.libsonnet @@ -18,7 +18,7 @@ ], parts(params, env):: { - local namespace = if params.namespace != "null" then params.namespace else env.namespace, + local namespace = env.namespace, crd: { apiVersion: "apiextensions.k8s.io/v1beta1", kind: "CustomResourceDefinition", diff --git a/kubeflow/seldon/prototypes/core.jsonnet b/kubeflow/seldon/prototypes/core.jsonnet index ae5f36dec5e..2ea1b51dea2 100644 --- a/kubeflow/seldon/prototypes/core.jsonnet +++ b/kubeflow/seldon/prototypes/core.jsonnet @@ -3,7 +3,6 @@ // @description Seldon Core components. Operator and API FrontEnd. // @shortDescription Seldon Core components. // @param name string seldon Name to give seldon -// @optionalParam namespace string null Namespace to use for the components. It is automatically inherited from the environment if not set. // @optionalParam withRbac string true Whether to include RBAC setup // @optionalParam withApife string false Whether to include builtin API OAuth gateway server for ingress // @optionalParam withAmbassador string false Whether to include Ambassador reverse proxy @@ -16,16 +15,10 @@ local k = import "k.libsonnet"; local core = import "kubeflow/seldon/core.libsonnet"; -// updatedParams uses the environment namespace if -// the namespace parameter is not explicitly set -local updatedParams = params { - namespace: if params.namespace == "null" then env.namespace else params.namespace, -}; - local seldonVersion = import "param://seldonVersion"; local name = import "param://name"; -local namespace = updatedParams.namespace; +local namespace = env.namespace; local withRbac = import "param://withRbac"; local withApife = import "param://withApife"; local withAmbassador = import "param://withAmbassador"; diff --git a/kubeflow/tensorboard/tensorboard.libsonnet b/kubeflow/tensorboard/tensorboard.libsonnet index 9a30d5674ca..ad457198ebd 100644 --- a/kubeflow/tensorboard/tensorboard.libsonnet +++ b/kubeflow/tensorboard/tensorboard.libsonnet @@ -7,10 +7,6 @@ new(_env, _params):: { local params = _env + _params { - namespace: - if std.objectHas(_params, "namespace") && - _params.namespace != "null" then - _params.namespace else _env.namespace, labels: { app: _params.name, }, diff --git a/kubeflow/tf-serving/prototypes/tf-serving-all-features.jsonnet b/kubeflow/tf-serving/prototypes/tf-serving-all-features.jsonnet index 24aeeef784d..e815fdebbcd 100644 --- a/kubeflow/tf-serving/prototypes/tf-serving-all-features.jsonnet +++ b/kubeflow/tf-serving/prototypes/tf-serving-all-features.jsonnet @@ -10,7 +10,6 @@ local k = import "k.libsonnet"; local name = import "param://name"; // updatedParams includes the namespace from env by default. -// We can override namespace in params if needed local updatedParams = env + params; local tfServingBase = import "kubeflow/tf-serving/tf-serving.libsonnet"; diff --git a/kubeflow/tf-serving/prototypes/tf-serving-aws.jsonnet b/kubeflow/tf-serving/prototypes/tf-serving-aws.jsonnet index a38fc5d6e1b..b6fd98acd71 100644 --- a/kubeflow/tf-serving/prototypes/tf-serving-aws.jsonnet +++ b/kubeflow/tf-serving/prototypes/tf-serving-aws.jsonnet @@ -3,7 +3,6 @@ // @description TensorFlow serving // @shortDescription A TensorFlow serving deployment // @param name string Name to give to each of the components -// @optionalParam namespace string kubeflow The namespace // @optionalParam serviceType string ClusterIP The k8s service type for tf serving. // @optionalParam numGpus string 0 Number of gpus to use // @optionalParam deployHttpProxy string false Whether to deploy http proxy diff --git a/kubeflow/tf-serving/prototypes/tf-serving-gcp.jsonnet b/kubeflow/tf-serving/prototypes/tf-serving-gcp.jsonnet index c4f75dfc058..913ed0b2a47 100644 --- a/kubeflow/tf-serving/prototypes/tf-serving-gcp.jsonnet +++ b/kubeflow/tf-serving/prototypes/tf-serving-gcp.jsonnet @@ -3,7 +3,6 @@ // @description TensorFlow serving // @shortDescription A TensorFlow serving deployment // @param name string Name to give to each of the components -// @optionalParam namespace string kubeflow The namespace // @optionalParam serviceType string ClusterIP The k8s service type for tf serving. // @optionalParam numGpus string 0 Number of gpus to use // @optionalParam deployHttpProxy string false Whether to deploy http proxy diff --git a/kubeflow/tf-serving/tf-serving-template.libsonnet b/kubeflow/tf-serving/tf-serving-template.libsonnet index 8d0b1ddc5f4..7491f6e1140 100644 --- a/kubeflow/tf-serving/tf-serving-template.libsonnet +++ b/kubeflow/tf-serving/tf-serving-template.libsonnet @@ -2,10 +2,7 @@ local k = import "k.libsonnet", local util = import "kubeflow/tf-serving/util.libsonnet", new(_env, _params):: { - local params = _env + _params { - namespace: if std.objectHas(_params, "namespace") && _params.namespace != "null" then - _params.namespace else _env.namespace, - }, + local params = _env + _params, local namespace = params.namespace, local name = params.name, local modelName = diff --git a/testing/test_deploy.py b/testing/test_deploy.py index 328f9d1e78e..f0f928bba71 100644 --- a/testing/test_deploy.py +++ b/testing/test_deploy.py @@ -241,8 +241,7 @@ def deploy_argo(args): component = "argo" logging.info("Deploying argo") - generate_command = ["ks", "generate", "argo", component, - "--namespace", "default", "--name", "argo"] + generate_command = ["ks", "generate", "argo", component, "--name", "argo"] util.run(generate_command, cwd=app_dir) ks_deploy(app_dir, component, {}, env=None, account=None)