Skip to content

When PodDefaults uses only matchExpressions getting podDefaults fails. #31

Open
@michaltreter-identt

Description

@michaltreter-identt

Hi, we have in namespace PodDefaults with only matchExpressions node to find all pods with required label. Unfortunately after that when later we are trying to spin up the notebook, request GET /jupyter/api/namespaces/{namespace}/poddefaults ends up with 500 error. What I can see from the logs:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/src/apps/common/routes/get.py", line 37, in get_poddefaults
    label = list(pd["spec"]["selector"]["matchLabels"].keys())[0]
KeyError: 'matchLabels'

Kubeflow manifests repo upstream version: 1.8.1
JupyterWebApp image version: 1.8.0

How about skipping that podDefaults that do not have required node? Also are there any plans for adding support to omiting some of podDefaults from user access? Like via annotation on resource?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    In Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions