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

ADR 2: Config v2 #4920

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jnummelin
Copy link
Member

Description

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • ADR

How Has This Been Tested?

  • Manual test
  • Auto test added
  • Not relevant

Checklist:

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Signed-off-by: Jussi Nummelin <[email protected]>
Copy link
Contributor

@juanluisvaladas juanluisvaladas left a comment

Choose a reason for hiding this comment

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

LGTM, seems like a good summary to me.


## Overview

This ADR is very high level proposal for the overall goals and high level aspirations for configuration v2. As such the puspose is not to go overly deep into where/how different fields are defined.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This ADR is very high level proposal for the overall goals and high level aspirations for configuration v2. As such the puspose is not to go overly deep into where/how different fields are defined.
This ADR is very high level proposal for the overall goals and high level aspirations for configuration v2. As such the purpose is not to go overly deep into where/how different fields are defined.


## Context

The configration of k0s has organically growed from very small to something quite complex today. While that is natural we're starting to see growing number of issues stemmin from the complexity.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The configration of k0s has organically growed from very small to something quite complex today. While that is natural we're starting to see growing number of issues stemmin from the complexity.
The configuration of k0s has organically growed from very small to something quite complex today. While that is natural we're starting to see growing number of issues stemmin from the complexity.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The configration of k0s has organically growed from very small to something quite complex today. While that is natural we're starting to see growing number of issues stemmin from the complexity.
The configuration of k0s has organically grown from very small to something quite complex today. While that is natural we're starting to see growing number of issues stemming from the complexity.

- Config doesn't allow to disable components, it requires modifying the cmdline, specially with dynamic config, it would make sense to allow this from the configuration.
- In dynamicConfig it's not very straightforward what can and what cannot be modified

All of this results in confusions on both the uers side and also on maintainers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
All of this results in confusions on both the uers side and also on maintainers.
All of this results in confusions on both the user' side and also on maintainers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
All of this results in confusions on both the uers side and also on maintainers.
All of this results in confusions on both the user's side and also on maintainers.

foo: bar
```

Similarly we need to have config object for the workers. An example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it proposed here that we will have one ControllerConfig for all Controllers and one WorkerConfig for all Workers ? Wouldn't be useful to have some kind of "label" matching so one could apply certain configuration just for some of their workers for instance ?

One use case I can imagine: some of my worker nodes have GPU and on those I want to setup containerd differently because reasons.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Ricardo,

No, the idea is that we have one ControllerConfig for each controller and one WorkerConfig for each worker and one ClusterConfig for the whole cluster.

We also discussed the need of having one way of having WorkerConfigs templates, it can be a field in the ClusterConfig spec or it can be a new object called WorkerGroup or something similar.

My understanding is that in the ADR we shouldn't be very explicit on whether it should be a new object or not, but now that you mention it we should probably document having worker templates/groups as a goal.

- Dynamic config has several problems when it comes to reconciliation of certain fields
- Some fields have side effects that aren't very predictable.
- The k0s' configuration for calico doesn't really match the calico configuration
- Config doesn't allow to disable components, it requires modifying the cmdline, specially with dynamic config, it would make sense to allow this from the configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Config doesn't allow to disable components, it requires modifying the cmdline, specially with dynamic config, it would make sense to allow this from the configuration.
- Config doesn't allow users to to disable components - doing so requires modifying the cmdline. With dynamic config, it would make sense to allow this from the configuration.


### Per node and cluster wide config separation

Separate the per node configuration and cluster-wide configs into their own CRDs. This makes it clear for both the users and maintainers where to look for which config data. It also makes clear separation on which _things_ can be changed at runtime via dynamic config.
Copy link
Contributor

Choose a reason for hiding this comment

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

It also makes clear separation on which things can be changed at runtime via dynamic config.

Does it actually make it clear which things can be changed and which cannot? Obviously changing helm chart extensions is allowed at runtime, and just as obviously changing the service CIDR range is not - but both would be part of the ClusterConfig, no?

Copy link
Contributor

The PR is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Sep 29, 2024
@jnummelin jnummelin added enhancement New feature or request and removed Stale labels Sep 30, 2024
@twz123 twz123 changed the title ADR: Config v2 ADR 2: Config v2 Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants