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 Flatcar Container Linux template #2890

Merged
merged 3 commits into from
Jan 23, 2023
Merged

Add Flatcar Container Linux template #2890

merged 3 commits into from
Jan 23, 2023

Conversation

invidian
Copy link
Member

@invidian invidian commented Dec 1, 2022

What type of PR is this?
/kind feature

What this PR does / why we need it:
This PR adds a cluster template for Flatcar Container Linux based clusters.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Reopening #1729.

Related to #629

Special notes for your reviewer:
CC @jepio

For more context on why #1729 hasn't been merged for so long, we were waiting until flatcar/Flatcar#734 gets resolved, so we have a Azure Community Image Gallery with testing reference Flatcar images which can be reliably used in CAPZ e2e tests. We have now created the gallery which is used in this PR (flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0) and we will provide there at least images required for keeping the CI green here. Over time, we plan to automate the publishing process so we will provide images for Flatcar and Kubernetes releases.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Flatcar Container Linux is now supported as a cluster flavor. Try `clusterctl generate cluster my-cluster --flavor flatcar`.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Dec 1, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 1, 2022
@CecileRobertMichon
Copy link
Contributor

/test pull-cluster-api-provider-azure-e2e-optional

@invidian
Copy link
Member Author

invidian commented Dec 2, 2022

/test pull-cluster-api-provider-azure-e2e-optional

Now the workaround for kubernetes-sigs/cluster-api#7679 should work properly.

@invidian
Copy link
Member Author

invidian commented Dec 2, 2022

Creating cluster with the template works fine for me locally, so I'm debugging e2e tests locally to figure out what's wrong.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 2, 2022
@invidian
Copy link
Member Author

invidian commented Dec 2, 2022

It should work now, I added Calico configs back.

/test pull-cluster-api-provider-azure-e2e-optional

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 2, 2022
@invidian
Copy link
Member Author

invidian commented Dec 2, 2022

/test pull-cluster-api-provider-azure-e2e-optional

Updated to not validate Calico stuff in e2e tests.

@CecileRobertMichon
Copy link
Contributor

both failures seem like flakes, can you please squash before we rerun?

@invidian
Copy link
Member Author

invidian commented Dec 2, 2022

@invidian invidian mentioned this pull request Dec 2, 2022
@jackfrancis
Copy link
Contributor

@invidian quick reminder that the 1.7 release is scheduled for next week, in case this is near ready and we want to include it in that release!

@invidian
Copy link
Member Author

invidian commented Jan 5, 2023

@jackfrancis thanks for the ping, but from my side, this is ready to ship (since long time) 😄

So please let me know how should I proceed with remaining unresolved conversations or what else is missing for this to be merged and I will work on it to get it done for next week. I didn't poke you or joined community meeting to mention this given Christmas break. And I was actually planning to do so next week :)

@jackfrancis
Copy link
Contributor

/retest

@mboersma
Copy link
Contributor

mboersma commented Jan 5, 2023

/check-cla

@invidian invidian requested review from CecileRobertMichon and jackfrancis and removed request for CecileRobertMichon January 19, 2023 08:33
@CecileRobertMichon
Copy link
Contributor

/retest
/test pull-cluster-api-provider-azure-e2e-optional

Tiltfile Outdated Show resolved Hide resolved
@invidian invidian requested review from CecileRobertMichon and removed request for jackfrancis January 20, 2023 12:25
invidian and others added 3 commits January 23, 2023 10:33
Escaping by hand with replace is just wrong and will not work in many
cases. shlex should take care of this.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
I'm not even sure how this could work previously, as envsubst works only
with environment variables, not with shell variables.

Perhaps cd4342a broke it by moving
CLUSTER_NAME from Tilt-based substitutions to envsubst.

In any case, exporting CLUSTER_NAME makes envsubst properly populate
resource names, which fixes the problem.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
This commit adds end-user templates and e2e tests for clusters using
Flatcar Container Linux.

Based-on-work-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

Code and recent Tiltfile changes look good, and I re-tested Flatcar in make tilt-up with the latest commits.

Tiltfile Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 23, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 00aa0e1c1fe51b6648782068d992420df24c8a94

@CecileRobertMichon
Copy link
Contributor

/lgtm
/approve
/hold

Hold to wait for optional job with Flatcar to pass

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 23, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2023
@invidian
Copy link
Member Author

Thanks for approving @CecileRobertMichon! Do you think we could backport this PR to v1.7.x branch, so users don't have to wait for v1.8.0?

@CecileRobertMichon
Copy link
Contributor

Do you think we could backport this PR to v1.7.x branch, so users don't have to wait for v1.8.0?

This would not qualify as cherry-pick as we only backport bug fixes, test improvements, and CVE-related dependency bumps. However, it's only a matter of users using the template right? I don't think anything in this PR adds CPAZ support (aside from Tilt and tests), so I nothing prevents a user from starting to use this today?

@invidian
Copy link
Member Author

Yes, this is just a matter of adding the Flatcar template, so clusterctl generate cluster --flavor flatcar is working :) For this to work, the template must be included in the release artifacts. I could also create a separate PR to v1.7.x branch adding only the templates, if that helps.

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 23, 2023

@invidian: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-e2e-exp a5dd701 link false /test pull-cluster-api-provider-azure-e2e-exp

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mboersma
Copy link
Contributor

mboersma commented Jan 23, 2023

/test pull-cluster-api-provider-azure-e2e-optional

Flatcar passed on the previous run but dual-stack failed with a network timeout.

@CecileRobertMichon
Copy link
Contributor

Yes, this is just a matter of adding the Flatcar template, so clusterctl generate cluster --flavor flatcar is working :) For this to work, the template must be included in the release artifacts. I could also create a separate PR to v1.7.x branch adding only the templates, if that helps.

IMO we shouldn't backport any of it, even the template as it's adding brand-new functionality, not fixing an existing one. Not backporting it also gives us a month to run the new test so we know the template is stable before we release it as an official "flavor" asset.

If anyone really can't wait a month for our planned v1.8.0 release date (March 7th) to use this, they can always do clusterctl generate cluster --from https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/templates/cluster-template-flatcar.yaml once this merges.

@invidian
Copy link
Member Author

/unhold

Optional tests passed now.

IMO we shouldn't backport any of it, even the template as it's adding brand-new functionality, not fixing an existing one. Not backporting it also gives us a month to run the new test so we know the template is stable before we release it as an official "flavor" asset.

Sure, make sense. I was just curious.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 23, 2023
@k8s-ci-robot k8s-ci-robot merged commit 30362d1 into kubernetes-sigs:main Jan 23, 2023
@invidian invidian deleted the invidian/flatcar-e2e-tests branch January 23, 2023 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants