New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inherit namespace from ksonnet environment #426
Inherit namespace from ksonnet environment #426
Conversation
/cc @lluunn |
Now that ksonnet makes `env` available in it's components, we can leverate that to use the environment's namespace instead of hardcoding a default namespace in the component parameters. So now the behaviour is that when components are generated from prototypes, we default to using the environment's namespace. If the user has overridden namespace as a parameter, that will get used for the component. Tested by deploying kubeflow-core and tf-serving to a new k8s cluster Fixes #43
With #411 test should pass |
@@ -1,7 +1,4 @@ | |||
{ | |||
// TODO(https://github.com/ksonnet/ksonnet/issues/222): Taking namespace as an argument is a work around for the fact that ksonnet | |||
// doesn't support automatically piping in the namespace from the environment to prototypes. | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this TODO for removing namespace param in parts(namespace)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment in the TODO mentions that Taking namespace as an argument is a work around for the fact that ksonnet doesn't support automatically piping in the namespace from the environment to prototypes
- I don't think that is true.
The workaround for ksonnet not piping the namespace from env to prototypes is we have an explicit parameter called namespace
in our prototype - this PR addresses this issue by removing the namespace
parameter from our prototypes.
std.prune(k.core.v1.list.new(argo.parts(params.namespace).all)) | ||
// updatedParams includes the namespace from env by default. | ||
// We can override namespace in params if needed | ||
local updatedParams = env + params; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env is the params from environment?
Aren't we already setting per environment param to override default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env
is not params
. params
are defined per component in component/params.libsonnet
and can be overridden per-environment in environments/<env>/params.libsonnet
env
is the ksonnet environment definition. It is the value you get when you execute ks env list
For example
% ks env list
NAME KUBERNETES-VERSION NAMESPACE SERVER
==== ================== ========= ======
default v1.7.0 kubeflow https://35.184.102.122```
For this default environment, env
will contain
{
"namespace": "kubeflow",
"server": "https://35.184.102.122",
}
The main idea is that we should not have to define the namespace
parameter per component, it will automatically be inherited by the environment in which we do a ks apply <env>
/retest |
/retest |
/retest |
3 similar comments
/retest |
/retest |
/retest |
/retest |
1 similar comment
/retest |
For workflow kubeflow-presubmit-kubeflow-e2e-426-34cf6d3-644-1359 INFO|2018-03-15T23:08:57|/mnt/test-data-volume/kubeflow-presubmit-kubeflow-e2e-426-34cf6d3-644-1359/src/kubeflow/tf-operator/py/test_runner.py|163| Trial 0 |
kubeflow/training-operator#464 should fix tf-operator test |
/retest |
This is great thanks! |
* Update jupyterhub.libsonnet comment * Set imagePullPolicy to always * Print ks version * Update tfserving test to use kubeflow-ci/test-worker
@jlewi Can you please take a look again. I pushed a few changes to fix tests. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Update docs so that namespace is only set at ks env level Now that #426 is merged, we do not need to set namespace at the component level. namespace will be automatically inherited by the component from env. * Update ksonnet version requirement
* Restore Metadata fix (kubeflow#424) * Fix metadata deployment for KFP's UI * Only update metadata test files * This PR was originally committed as kubeflow#424 but it got rolled back in kubeflow#429 in order to fix master. * This PR is rolling it forward. * Related to kubeflow#426 * Add the virtual service for grpc metadata to kustomization.yaml * Port for the virtual service should be 9090. * Fix tests.
Now that ksonnet makes
env
available in it's components, we canleverate that to use the environment's namespace instead of hardcoding a
default namespace in the component parameters.
So now the behaviour is that when components are generated from
prototypes, we default to using the environment's namespace. If the user
has overridden namespace as a parameter, that will get used for the
component.
Tested by deploying kubeflow-core and tf-serving to a new k8s cluster
Fixes #43
This change is