Skip to content

Commit

Permalink
Update Changelog, use dicts for building nodeSelector conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan109 committed Jan 31, 2024
1 parent 10170ad commit 09c7d05
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

### Unreleased

# v13.13.1
- Add nodeSelector config to kubetools file

# v13.13.0
- Cython 3.0 release is preventing this package to be released. A constraint of `cython<3` needs to be added to install this
- Add ability to use secrets in "migration" jobs
Expand Down
4 changes: 2 additions & 2 deletions kubetools/kubernetes/config/cronjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def make_cronjob_config(
}

if node_selector_labels is not None:
selector_labels = []
selector_labels = {}
for label, value in node_selector_labels.items():
selector_labels.append({label: value})
selector_labels[label] = value
template_spec['nodeSelector'] = selector_labels

if service_account_name is not None:
Expand Down
4 changes: 2 additions & 2 deletions kubetools/kubernetes/config/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def make_deployment_config(
}

if node_selector_labels is not None:
selector_labels = []
selector_labels = {}
for label, value in node_selector_labels.items():
selector_labels.append({label: value})
selector_labels[label] = value
template_spec['nodeSelector'] = selector_labels

if service_account_name is not None:
Expand Down
4 changes: 2 additions & 2 deletions kubetools/kubernetes/config/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def make_job_config(
}

if node_selector_labels is not None:
selector_labels = []
selector_labels = {}
for label, value in node_selector_labels.items():
selector_labels.append({label: value})
selector_labels[label] = value
template_spec['nodeSelector'] = selector_labels

if service_account_name is not None:
Expand Down

0 comments on commit 09c7d05

Please sign in to comment.