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 extraArgs config for kube-router #3902

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

jnummelin
Copy link
Member

Description

This is for advanced use cases and users that need to control things like ASN, routing and peering. Allows also users to override any k0s managed startup args.

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

How Has This Been Tested?

  • Manual test
  • Auto test added

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

@jnummelin jnummelin added this to the 1.29 milestone Jan 9, 2024
@jnummelin jnummelin requested a review from a team as a code owner January 9, 2024 11:34
makhov
makhov previously approved these changes Jan 9, 2024
docs/configuration.md Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
pkg/apis/k0s/v1beta1/kuberouter.go Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
pkg/component/controller/kuberouter.go Show resolved Hide resolved
pkg/component/controller/kuberouter.go Outdated Show resolved Hide resolved
pkg/component/controller/kuberouter.go Outdated Show resolved Hide resolved
This is for advanced use cases and users that need to control things like ASN, routing and peering. Allows also users to override any k0s managed startup args.

Signed-off-by: Jussi Nummelin <[email protected]>
@jnummelin jnummelin merged commit d8ef4c6 into k0sproject:main Jan 12, 2024
75 checks passed
@jnummelin jnummelin deleted the feat/kube-router-extra-args branch January 12, 2024 08:44
@AskAlice
Copy link

AskAlice commented Feb 27, 2024

a bit confused, why would this fail validation?

          kubeRouter:
            autoMTU: true
            hairpin: "Enabled"
            extraArgs:
              - peer-router-ips="172.16.0.1,172.16.1.1"
              - peer-router-asns=64512,64512
              - cluster-asn=64512

or as an object

            extraArgs:
             	peer-router-ips: "172.16.0.1,172.16.1.1"
                peer-router-asns: 64512,64512
                cluster-asn: 64512

edit: ahh it's because they all need to be strings, even if they're really uint or array

            extraArgs:
              peer-router-ips: "172.16.0.1,172.16.1.1"
              peer-router-asns: "64512,64512"
              advertise-cluster-ip: "true"
              advertise-external-ip: "true"
              advertise-loadbalancer-ip: "true"
              cluster-asn: "64512"
              ```

Comment on lines +432 to +433
additionalProperties:
type: string

Choose a reason for hiding this comment

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

this is not a valid flag and causes kube-router to error if this property is defined

Copy link
Member

Choose a reason for hiding this comment

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

Not sure what you're referring to? The additionalProperties stuff is OpenAPI-specific and not referring to actual kube-router flags.

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