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

Set NodeSelector correctly when using MatchExpressions in KataConfigPoolSelector #119

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

bpradipt
Copy link
Contributor

Fixes: #118

Signed-off-by: Pradipta Banerjee pradipta.banerjee@gmail.com

- Description of the problem which is fixed/What is the use case
Using MatchExpressions in KataConfigPoolSelector resulted in empty NodeSelector in RuntimeClass.
This is because RuntimeClass expects only MatchLabels and not MatchExpressions and Operator only
handled MatchLabels

- What I did
Set the NodeSelector properly irrespective of using MatchLabels or MatchExpressions in KataConfigPoolSelector

- How to verify it
Create KataConfig from OpenShift UI or use the following yaml

apiVersion: kataconfiguration.openshift.io/v1
kind: KataConfig
metadata:
  name: example-kataconfig
spec:
  kataConfigPoolSelector:
    matchExpressions:
       - key: custom-kata1
         operator: In
         values:
         - "test"

- Description for the changelog

Set NodeSelector correctly when using MatchExpressions in KataConfigPoolSelector

…oolSelector

Fixes: openshift#118

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
@openshift-ci openshift-ci bot requested review from fidencio and harche June 11, 2021 11:04
@bpradipt
Copy link
Contributor Author

/assign @jensfr

Copy link
Contributor

@jensfr jensfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bpradipt this looks great. Thank you!

@jensfr jensfr merged commit 19a4197 into openshift:master Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NodeSelector is not being set for RuntimeClass when using MatchExpressions in KataConfigPoolSelector
2 participants