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

Add worker bootstrap-node-taints setting #215

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

petrutlucian94
Copy link
Contributor

The control-plane charm already allows defining node taints. We'll add the same for worker nodes.

Applicable spec:

Overview

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

Sigh -- i wish there was a better way than using extra-args

charms/worker/k8s/src/config/extra_args.py Outdated Show resolved Hide resolved
The control-plane charm already allows defining node taints. We'll
add the same for worker nodes.
We're adding a separate worker that applies a list of taints,
cleaning up the code a little.
Copy link
Contributor

Test coverage for 13d3347

coverage-report: install_deps /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> python -I -m pip install 'coverage[toml]'
coverage-report: commands[0] /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> coverage report
Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
lib/charms/k8s/v0/k8sd_api_manager.py     278     29    90%
src/charm.py                              491    244    50%
src/cloud_integration.py                   80      3    96%
src/config/extra_args.py                   29      2    93%
src/containerd.py                         140     16    89%
src/cos_integration.py                     33     12    64%
src/events/update_status.py                51     10    80%
src/inspector.py                           40      4    90%
src/kube_control.py                        39     31    21%
src/literals.py                            21      0   100%
src/protocols.py                           26      5    81%
src/reschedule.py                          77      4    95%
src/snap.py                               185     26    86%
src/token_distributor.py                  181    109    40%
src/upgrade.py                            105     48    54%
-----------------------------------------------------------
TOTAL                                    1776    543    69%
coverage-report: OK (1.26=setup[1.04]+cmd[0.22] seconds)
congratulations :) (1.31 seconds)

Static code analysis report

Run started:2024-12-11 08:03:38.548163

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 3802
  Total lines skipped (#nosec): 3
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

Lovely ❤️

@addyess addyess merged commit 4aa91bd into canonical:main Dec 11, 2024
59 checks passed
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.

2 participants