Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

PodSpec NodeSelectors overwrite the default k8s plugin settings #303

Merged
merged 4 commits into from
Dec 27, 2022

Conversation

hamersaw
Copy link
Contributor

TL;DR

Currently the NodeSelectors on PodTasks do not overwrite the k8s plugin default node selectors, rather it is the opposite. This means that if the same NodeSelector exists in both locations the k8s plugin is preferred. This PR changes the preference so that NodeSelectors on the PodTask overwrite those specified as defaults in the k8s plugin configuration.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

^^^

Tracking Issue

NA

Follow-up issue

NA

@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Merging #303 (2bba1ef) into master (2859755) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #303   +/-   ##
=======================================
  Coverage   62.35%   62.35%           
=======================================
  Files         147      147           
  Lines       11809    11809           
=======================================
  Hits         7363     7363           
  Misses       3882     3882           
  Partials      564      564           
Flag Coverage Δ
unittests 62.35% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
go/tasks/pluginmachinery/flytek8s/pod_helper.go 84.06% <100.00%> (ø)
go/tasks/plugins/array/k8s/subtask.go 30.49% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Dan Rammer <[email protected]>
@hamersaw hamersaw merged commit 8efeda7 into master Dec 27, 2022
@hamersaw hamersaw deleted the bug/pod-spec-node-selector-override branch December 27, 2022 16:40
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* PodSpec NodeSelectors overwrite the default k8s plugin settings

Signed-off-by: Dan Rammer <[email protected]>

* added unit test

Signed-off-by: Dan Rammer <[email protected]>

* better node selector value

Signed-off-by: Dan Rammer <[email protected]>

* fixed issue with unionmaps where k8s plugin overrides labels

Signed-off-by: Dan Rammer <[email protected]>

Signed-off-by: Dan Rammer <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants