Skip to content

Bootstrap & join with a fixed containerd-base-dir #239

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

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

addyess
Copy link
Contributor

@addyess addyess commented Jan 9, 2025

Applicable spec: #238

Overview

Bootstraps, and joins nodes using the charm specified containerd base path

Rationale

The snap config now allows the charm to specify a containerd-base-dir, Lets use that to make sure it doesn't move again.

Library Changes

Updated the k8s library to accommodate new API config

Checklist

@addyess addyess requested a review from a team as a code owner January 9, 2025 22:19
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Test coverage for 7d86134

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     286     29    90%
src/charm.py                              501    260    48%
src/cloud_integration.py                   80      3    96%
src/config/extra_args.py                   31      2    94%
src/containerd.py                         140     22    84%
src/cos_integration.py                     33     12    64%
src/events/update_status.py                68     24    65%
src/inspector.py                           41      4    90%
src/kube_control.py                        43     32    26%
src/literals.py                            25      0   100%
src/protocols.py                           28      5    82%
src/reschedule.py                          77      4    95%
src/snap.py                               193     29    85%
src/token_distributor.py                  181    109    40%
src/upgrade.py                            108     48    56%
-----------------------------------------------------------
TOTAL                                    1835    583    68%
coverage-report: OK (1.22=setup[1.00]+cmd[0.21] seconds)
congratulations :) (1.26 seconds)

Static code analysis report

Run started:2025-01-09 22:20:54.508680

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 3910
  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

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding the config.
It would be nice to have tests on setting the bootstrap & join config?

@addyess
Copy link
Contributor Author

addyess commented Jan 10, 2025

@louiseschmidtgen i was counting on the integration tests that normally run

  • they bootstrap one node
  • another node will join as a control plane
  • another node will join as a worker

I've produced a card for future tests to exercise the custom-registry feature for the next pulse.

@louiseschmidtgen louiseschmidtgen merged commit d795c73 into main Jan 13, 2025
70 checks passed
@louiseschmidtgen louiseschmidtgen deleted the KU-2459/fix-containerd-base branch January 13, 2025 08:31
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