Open ca-scribner opened 7 months ago
This bug is also the cause of kubeflow/notebooks#99, which identified how a the jwa fails to handle PodDefault
s that have no matchLabels
selector
This bug appears to also affect the tensorboard web app backend, which has a copy of the same get_poddefaults()
I don't understand typescript enough to be certain that the label
is intended to be the name of the PodDefault, but given the comments in the spawner_ui_config.yaml I think that's probably true
@ca-scribner I'm looking at the code in a little more detail and I see what you're saying. I think both our solutions are not optimal though.
This logic uses the matchLabel key to set a the label on the notebook to true. https://github.com/kubeflow/kubeflow/blob/bd7f250df22e144b114177536309d28651b4ddbb/components/crud-web-apps/jupyter/backend/apps/common/form.py#L253-L261
For this reason I think we need to use the label of the poddefault instead of the name of the poddefault.
BUT I'm not sure this should be the actual logic. Lets take a look at the issue with my solution . Consider the pod default
metadata:
name: example
spec:
annotations:
karpenter.sh/do-not-disrupt: "true"
selector:
matchExpressions:
- key: some-key
operator: NotIn
values: ['true']
In this case the configuration should be "some-key" and selecting that configuration in the dropdown would add the "some-key" label to the notebook. Although due to the matchExpressions that is doing the exact opposite of what we want.
I'm currently at a wall with matchExpressions because what we really want to do use this selector to create a label that conforms to the matchExpressions requirement.
@thesuperzapper Do you have any input on the above
/transfer notebooks
/kind bug
What steps did you take and what happened: The Notebook spawner page is configured using the spawner_ui_config.yaml input file. The
configurations
section lets an admin define whichPodDefaults
should be selected by default. spawner_ui_config.yaml's comments state:If I create a PodDefault named
example
:then set the
spawner_ui_config.yaml
'sconfigurations
to:I do not see it selected in the spawner UI by default:
What did you expect to happen:
When specifying PodDefaults by name in the spawner_ui_config.yaml, I expect them to be selected by default on the spawner page:
Anything else you would like to add:
I think this is a bug in the jwa backend's
get_poddefaults()
.get_poddefaults()
returns a result where thelabel
field is set as the key of the 0thmatchLabels
selector
:https://github.com/kubeflow/kubeflow/blob/bd7f250df22e144b114177536309d28651b4ddbb/components/crud-web-apps/jupyter/backend/apps/common/routes/get.py#L29-L49
This can be confirmed by setting
And reloading/refreshing the spawner page:
I think this should probably instead be:
Environment:
kfctl version
):minikube
)kubectl version
):/etc/os-release
):