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

Documentation issue with using ignition as a bootstrap configuration #9402

Closed
odvarkadaniel opened this issue Sep 12, 2023 · 12 comments · Fixed by #9463
Closed

Documentation issue with using ignition as a bootstrap configuration #9402

odvarkadaniel opened this issue Sep 12, 2023 · 12 comments · Fixed by #9463
Assignees
Labels
area/documentation Issues or PRs related to documentation help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@odvarkadaniel
Copy link
Contributor

odvarkadaniel commented Sep 12, 2023

What steps did you take and what happened?

I was following this part of the CAPI book to use ignition as a bootstrap config for my control plane machine for a workload cluster, but I run in to an issue where the AMI with the name capa-ami-flatcar-stable-?1.22.2-* does not exist.

The clusterctl command that is being used to generate the workload cluster is using unsupported version for this feature:

clusterctl generate cluster ignition-cluster \
    --from https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/templates/cluster-template-flatcar.yaml \
    --kubernetes-version **v1.22.2** \
    --worker-machine-count 2 \
    > ignition-cluster.yaml

The kubernetes version should be v1.25.0+.

What did you expect to happen?

I expected my control plane machine to get to phase Running.

Cluster API version

v1.5.0

Kubernetes version

No response

Anything else you would like to add?

Not really a bug, but an error in the documentation as the AMI exists only for versions v1.25.0+ according to this list.

Label(s) to be applied

/label area/documentation

@k8s-ci-robot
Copy link
Contributor

@odvarkadaniel: The label(s) /label area/documentation cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

What steps did you take and what happened?

I was following this part of the CAPI book to use ignition as a bootstrap config for my control plane machine for a workload cluster, but I run in to an issue where the AMI with the name capa-ami-flatcar-stable-?1.22.2-* does not exist.

The clusterctl command that is being used to generate the workload cluster is using unsupported version for this feature:

clusterctl generate cluster ignition-cluster \
   --from https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/templates/cluster-template-flatcar.yaml \
   --kubernetes-version **v1.22.2** \
   --worker-machine-count 2 \
   > ignition-cluster.yaml

The kubernetes version should be v1.25.0+.

What did you expect to happen?

I expected my control plane machine to get to phase Running.

Cluster API version

v1.5.0

Kubernetes version

No response

Anything else you would like to add?

Not really a bug, but an error in the documentation as the AMI exists only for versions v1.25.0+ according to this list.

Label(s) to be applied

/kind bug
/label area/documentation

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.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 12, 2023
@odvarkadaniel
Copy link
Contributor Author

/area documentation
/area clusterctl

@k8s-ci-robot k8s-ci-robot added area/documentation Issues or PRs related to documentation area/clusterctl Issues or PRs related to clusterctl labels Sep 12, 2023
@killianmuldoon killianmuldoon removed the area/clusterctl Issues or PRs related to clusterctl label Sep 12, 2023
@killianmuldoon
Copy link
Contributor

/triage accepted

Thanks for reporting this!

/help

@k8s-ci-robot
Copy link
Contributor

@killianmuldoon:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/triage accepted

Thanks for reporting this!

/help

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.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 12, 2023
@mdbooth
Copy link
Contributor

mdbooth commented Sep 12, 2023

ping @tormath1

@odvarkadaniel
Copy link
Contributor Author

Would an acceptable solution to this be a change of the k8s version in the commend to v1.25.0 and some kind of note saying that ignition is supported in 1.25+, @killianmuldoon?
If so, I could just take this.

@invidian
Copy link
Member

How about we bump it to 1.28.1 already, since I guess they will be removed later in the future than v1.25.0? I'm pretty sure v1.22.2 existed at some point, so I assume those AMIs are now removed due to being EOL.

@tormath1
Copy link

Thanks for raising this issue. I think the version should be the same as the one in the "getting started" common book: https://cluster-api-aws.sigs.k8s.io/getting-started#generating-the-cluster-configuration. We can update 1.22.2 to 1.28.0 but we will have the same issue in a few months / years.
As the --kubernetes-version from the documentation seems to still target the latest stable, what about something like that:

clusterctl generate cluster ignition-cluster \
    --from https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/templates/cluster-template-flatcar.yaml \
-    --kubernetes-version **v1.22.2** \
+    --kubernetes-version $(curl -Ls https://dl.k8s.io/release/stable.txt) \
    --worker-machine-count 2 \
    > ignition-cluster.yaml

@ahrkrak
Copy link

ahrkrak commented Sep 12, 2023

genius. more docs should do this.

@killianmuldoon
Copy link
Contributor

Is there any guarantee that an image exists for every stable version of Kubernetes?

We may also not have support for a given minor version in Kubernetes - it can take time to catch up and older release branches which will have this documentation will certainly not support the latest version of Kubernetes.

I think if we want to keep this documentation from being broken the target should be keeping this version the same as the version used by the regular CAPI quickstart, but we'd need some guarantee that those AMIs will be available.

@odvarkadaniel
Copy link
Contributor Author

odvarkadaniel commented Sep 12, 2023

I guess every major stable version should be guaranteed to have an AMI? So therefore we could just modify the command that @tormath1 posted above as:

clusterctl generate cluster ignition-cluster \
    --from https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/templates/cluster-template-flatcar.yaml \
-    --kubernetes-version **v1.22.2** \
+    --kubernetes-version $(curl -Ls https://dl.k8s.io/release/stable.txt | awk -F. '{$NF=0}1' OFS=.) \
    --worker-machine-count 2 \
    > ignition-cluster.yaml

So we always end up with a major version of k8s.

@odvarkadaniel
Copy link
Contributor Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
7 participants