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

Decouple update k8sd-config configmap from k8s set API #339

Merged

Conversation

bschimke95
Copy link
Contributor

@bschimke95 bschimke95 commented Apr 16, 2024

This PR adds a controller that updates the k8sd-config config map of the cluster asynchronously.
It is triggered by the sending struct{} to the controllers UpdateCh (e.g. by the bootstrap hook or k8s set).

This is a first effort of making commands return fast instead of e.g. waiting for service restarts and apply changes async. Follow-up work will move the component updates to a controller as well.

Relates and works towards fixing:
#321 and #277

Copy link
Contributor

@neoaggelos neoaggelos left a comment

Choose a reason for hiding this comment

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

Really nice work, a couple of comments

src/k8s/pkg/k8sd/api/cluster_config.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/controllers/update_node_configuration.go Outdated Show resolved Hide resolved
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

Very nice work, looks good overall. Some small comments.

@bschimke95 bschimke95 force-pushed the KU-614/decouple-config-update branch 2 times, most recently from c432250 to 51a3fad Compare April 16, 2024 15:23
src/k8s/pkg/k8sd/app/provider.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/app/hooks_bootstrap.go Outdated Show resolved Hide resolved
@bschimke95 bschimke95 force-pushed the KU-530/updates-for-external-datastore branch from 7e71884 to cf5e5bc Compare April 17, 2024 08:12
Copy link
Contributor

@neoaggelos neoaggelos left a comment

Choose a reason for hiding this comment

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

Just to make sure conflicts are addressed

@bschimke95 bschimke95 force-pushed the KU-614/decouple-config-update branch from dbe5dcf to 5a02237 Compare April 17, 2024 14:07
Copy link
Contributor

Package Line Rate
github.com/canonical/k8s/api/v1 35%
github.com/canonical/k8s/cmd/k8s 33%
github.com/canonical/k8s/cmd/util 15%
github.com/canonical/k8s/pkg/client/dqlite 46%
github.com/canonical/k8s/pkg/component 10%
github.com/canonical/k8s/pkg/k8sd/controllers 62%
github.com/canonical/k8s/pkg/k8sd/database 48%
github.com/canonical/k8s/pkg/k8sd/pki 53%
github.com/canonical/k8s/pkg/k8sd/setup 75%
github.com/canonical/k8s/pkg/k8sd/types 82%
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 48%
github.com/canonical/k8s/pkg/utils/control 100%
github.com/canonical/k8s/pkg/utils/errors 100%
github.com/canonical/k8s/pkg/utils/k8s 69%
Summary 44% (2249 / 5163)

@neoaggelos neoaggelos merged commit 1233ff8 into KU-530/updates-for-external-datastore Apr 17, 2024
3 checks passed
@neoaggelos neoaggelos deleted the KU-614/decouple-config-update branch April 17, 2024 17:36
@neoaggelos neoaggelos restored the KU-614/decouple-config-update branch April 17, 2024 17:40
neoaggelos added a commit that referenced this pull request Apr 17, 2024
neoaggelos added a commit that referenced this pull request Apr 17, 2024
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