Skip to content
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

feat: support selector.matchExpression in PodDefaults #7551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add logic to handle when poddefaults use matchExpression
Signed-off-by: Tyler Kalbach <tkalbach@athenahealth.com>
  • Loading branch information
boarder7395 committed Jun 11, 2024
commit 07a5a40c3d0863bf294d57ba3778c69da3c7c044
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def get_poddefaults(namespace):
# forms
contents = []
for pd in pod_defaults["items"]:
label = list(pd["spec"]["selector"]["matchLabels"].keys())[0]
selector = pd["spec"]["selector"]
if "matchExpressions" in selector:
label = selector["matchExpressions"][0]["key"]
else:
label = list(selector["matchLabels"].keys())[0]
if "desc" in pd["spec"]:
desc = pd["spec"]["desc"]
else:
Expand Down
Loading