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

Initial Flatcar support for CAPZ #81

Merged
merged 27 commits into from
Mar 8, 2023
Merged

Initial Flatcar support for CAPZ #81

merged 27 commits into from
Mar 8, 2023

Conversation

primeroz
Copy link
Contributor

@primeroz primeroz commented Feb 20, 2023

@primeroz primeroz marked this pull request as ready for review February 20, 2023 15:30
@primeroz primeroz requested a review from a team February 20, 2023 15:30
@primeroz primeroz marked this pull request as draft February 20, 2023 15:30
@primeroz primeroz changed the title First test of using flatcar on a MD Initial Flatcar support for CAPZ Feb 21, 2023
@primeroz primeroz marked this pull request as ready for review February 22, 2023 08:06
@primeroz primeroz marked this pull request as draft February 22, 2023 08:06
@primeroz primeroz marked this pull request as ready for review March 7, 2023 09:44
"type": "string"
},
"name": {
"default": "{{ printf \"capi-flatcar-stable-%s-gen2\" .Values.internal.kubernetesVersion }}",
Copy link
Member

Choose a reason for hiding this comment

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

⚠️ I know this is /internal, but anyway, this is really brittle. Can the logic be done in the actual template? Maybe you can ask only for the printf format argument here?

Suggested change
"default": "{{ printf \"capi-flatcar-stable-%s-gen2\" .Values.internal.kubernetesVersion }}",
"default": "capi-flatcar-stable-%s-gen2",

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 know it is ugly, I can try something else 👍

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 don't think we can do it like that , because if we move the helm function out of the variable name we risk

capi-flatcar-stable-XXX-gen2%!(EXTRA string=1.24.11)

if a value without -%s is passed in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

best i can do is

  • have an empty default
  • if the value is empty then use an hardcoded template to render the name
  • if the value is defined use the value as it is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marians please check updated code

@primeroz primeroz requested a review from marians March 7, 2023 15:25
@primeroz primeroz merged commit e4e09f9 into main Mar 8, 2023
@primeroz primeroz deleted the flatcar-testing branch March 8, 2023 10:29
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