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 Load Balancer configuration through charm config #170

Merged
merged 7 commits into from
Nov 22, 2024

Conversation

eaudetcobello
Copy link
Contributor

@eaudetcobello eaudetcobello commented Nov 18, 2024

Overview

Note: The naming might change and is WIP for now.
Add options to the k8s charm to configure the load balancer via charm configuration.

Rationale

A user may want to overwrite the default configuration for load balancer. This should be possible both - when bootstrapping a cluster and during runtime.

Module Changes

  • Implement the load-balancer part of the charm configuration - the remaining configs are updated in follow-up work.

@eaudetcobello eaudetcobello requested a review from a team as a code owner November 18, 2024 22:38
@eaudetcobello eaudetcobello changed the base branch from main to KU-583/local-storage-config November 18, 2024 22:38
@eaudetcobello eaudetcobello changed the title add local storage charm config Add Load Balancer configuration through charm config Nov 18, 2024
@bschimke95
Copy link
Contributor

This is missing the actual mapping of the options in charm.py.
I'd say let's wait for the local-storage PR to land, then this is a quick change.

@eaudetcobello
Copy link
Contributor Author

This is missing the actual mapping of the options in charm.py.

I'd say let's wait for the local-storage PR to land, then this is a quick change.

Thanks, this was supposed to be a draft pr. Please ignore for now.

@bschimke95 bschimke95 force-pushed the KU-583/local-storage-config branch from 4059713 to 17d8a37 Compare November 20, 2024 09:19
Base automatically changed from KU-583/local-storage-config to main November 20, 2024 16:25
@addyess addyess force-pushed the KU-2113/load-balancer-config branch from 8adf067 to 39d0962 Compare November 20, 2024 22:40
@addyess addyess force-pushed the KU-2113/load-balancer-config branch from 39d0962 to 81d25f4 Compare November 20, 2024 22:41
@addyess addyess marked this pull request as draft November 20, 2024 22:41
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.

A few questions for @bschimke95 and @eaudetcobello

charms/worker/k8s/charmcraft.yaml Show resolved Hide resolved
@eaudetcobello eaudetcobello marked this pull request as ready for review November 21, 2024 21:47
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.

LGTM

Copy link
Contributor

Test coverage for 4da99af

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     270     29    89%
src/charm.py                              468    244    48%
src/cloud_integration.py                   80      3    96%
src/containerd.py                         140     16    89%
src/cos_integration.py                     33     12    64%
src/events/update_status.py                48     10    79%
src/inspector.py                           40      3    92%
src/kube_control.py                        39     31    21%
src/literals.py                             1      0   100%
src/protocols.py                           16      3    81%
src/reschedule.py                          77      4    95%
src/snap.py                               165     10    94%
src/token_distributor.py                  181    109    40%
src/upgrade.py                             31      1    97%
-----------------------------------------------------------
TOTAL                                    1589    475    70%
coverage-report: OK (1.23=setup[1.03]+cmd[0.21] seconds)
congratulations :) (1.28 seconds)

Static code analysis report

Run started:2024-11-22 16:09:16.536265

Test results:
  No issues identified.

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

@addyess addyess merged commit 109adea into main Nov 22, 2024
61 checks passed
@addyess addyess deleted the KU-2113/load-balancer-config branch November 22, 2024 17:11
@mateoflorido
Copy link
Member

closes #109

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.

4 participants