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

Implement HA RKE2 architecture #124

Merged
merged 15 commits into from
Jan 26, 2024
Merged

Conversation

atanasdinov
Copy link
Contributor

@atanasdinov atanasdinov commented Jan 22, 2024

  • Splits RKE2 configuration based on number of nodes
  • Introduces a MetalLB + Endpoint Copier Operator manifest in order to create a VIP address for the cluster
  • Establishes sane default values for servers and agents in both single and multinode setup
  • Generating a cluster token to be done in a follow up

@@ -0,0 +1,76 @@
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd eventually look into completely replacing most of this with the addition of manifests and charts support.

Signed-off-by: Atanas Dinov <[email protected]>
@@ -48,15 +48,9 @@ func validateNodes(k8s *image.Kubernetes) []FailedValidation {
})
}

if k8s.Network.APIHost == "" {
failures = append(failures, FailedValidation{
UserMessage: "The 'apiHost' field is required in the 'network' section when defining entries under 'nodes'.",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We decided on having this field as optional.

@atanasdinov atanasdinov marked this pull request as ready for review January 24, 2024 11:55
Copy link
Contributor

@rdoxenham rdoxenham left a comment

Choose a reason for hiding this comment

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

Some minor comments, especially related to k3s inclusion work, but otherwise this is great. It was tested already 🚀

Copy link
Contributor

@jdob jdob left a comment

Choose a reason for hiding this comment

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

Nothing blocking this from landing. I do think we should discuss the definition spelling, but that can come next week. I still haven't seen this actually working, but it a.) doesn't actively break anything and b.) looks sound from a coding perspective, so I'm cool with landing this and debugging my issue next week.

First bool `yaml:"firstNode"`
Hostname string `yaml:"hostname"`
Type string `yaml:"type"`
Initialiser bool `yaml:"initialiser"`
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not worth blocking the PR for this, but we should discuss the spelling of "initializer" in the image definition (I'm actually being serious this time, not just giving you crap). I think it's potentially confusing that embeddedArtifactRegistry uses the Americanized spelling while this uses whatever you call the other spelling version (I know, I know, your answer is going to be "correct"). In the code I don't care if we mix and match, but for a public API I think it looks bad if it's not consistent. We can talk about this in the definition review next week.

type Cluster struct {
// Initialiser is the hostname of the initialiser node.
// Defaults to the first configured server if not explicitly selected.
Initialiser string
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: In the definition, Initialiser is a boolean, but here it's the hostname. There shouldn't be any technical confusion since they are different types, though it might be a bit more clear to new devs if this was InitialiserHostname (esp since it matches the pattern of InitialiserConfig below).

return
}

auditMessage := fmt.Sprintf("Kubernetes CNI not explicitly set, defaulting to: %s", cniDefaultValue)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: The user-facing messages have been closer to full sentences in many places, so we may want to consider:

"The Kubernetes CNI is not explicitly set, defaulting to '%s'."

@atanasdinov atanasdinov merged commit 55f8fa1 into suse-edge:main Jan 26, 2024
2 checks passed
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