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 (Datastore).ToKubeAPIServerArguments() helper #296

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

neoaggelos
Copy link
Contributor

Summary

Move the generation of kube-apiserver arguments from the datastore configuration into pkg/k8sd/types, and add focused unit tests

Changes

  • Add (Datastore).ToKubeAPIServerArguments()
  • Use it in setup.KubeAPIServer()
  • Update callers and tests
  • Add unit tests for ToKubeAPIServerArguments()

@neoaggelos neoaggelos requested a review from a team as a code owner April 4, 2024 16:27
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

LGTM, great cleanup. Only a minor typo

src/k8s/pkg/k8sd/types/cluster_config_datastore.go Outdated Show resolved Hide resolved
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.

Questions mostly. the code looks fine.

Copy link
Contributor

github-actions bot commented Apr 7, 2024

Package Line Rate
github.com/canonical/k8s/api/v1 47%
github.com/canonical/k8s/cmd/k8s 30%
github.com/canonical/k8s/cmd/util 14%
github.com/canonical/k8s/pkg/client/dqlite 44%
github.com/canonical/k8s/pkg/component 10%
github.com/canonical/k8s/pkg/k8sd/controllers 68%
github.com/canonical/k8s/pkg/k8sd/database 48%
github.com/canonical/k8s/pkg/k8sd/pki 55%
github.com/canonical/k8s/pkg/k8sd/setup 75%
github.com/canonical/k8s/pkg/k8sd/types 72%
github.com/canonical/k8s/pkg/proxy 6%
github.com/canonical/k8s/pkg/snap 15%
github.com/canonical/k8s/pkg/snap/util 90%
github.com/canonical/k8s/pkg/utils 40%
github.com/canonical/k8s/pkg/utils/control 61%
github.com/canonical/k8s/pkg/utils/errors 100%
github.com/canonical/k8s/pkg/utils/k8s 71%
Summary 40% (1920 / 4764)

@neoaggelos neoaggelos merged commit 192e06c into main Apr 8, 2024
13 checks passed
@neoaggelos neoaggelos deleted the KU-557/apiserver-datastore-setup branch April 8, 2024 05:48
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.

3 participants