-
Notifications
You must be signed in to change notification settings - Fork 575
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
imageLookupFormat should support Kubernetes versions with build metadata, e.g. +fips #3076
Comments
@dkoshkin: This issue is currently awaiting triage. If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the The 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. |
There is a change in the AMI name, search logic specifically needs to handle Runtime-extensions proposal in cluster-api might be useful to solve this issue: an extension can generate a replaced regex and then that regex is used in CAPA AMI search. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
/reopen |
@sedefsavas: Reopened this issue. In response to this:
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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
For reference:
|
In my view, this issue is due to only using the AMI name to look up the AMI. Characters in AMI names are limited, as linked above. What if we use a set of tags to look up the AMI? AMI tags accept any UTF-8 characters. Two examples:
imageLookupTags:
- KubernetesVersion: "{{ .K8sVersion }}" When the controller reconciles the AWSMachine, it gets the version from the corresponding Machine object, and evaluates the above to: imageLookupTags:
- KubernetesVersion: "1.21.8+fips.0" This would match an AMI with the following tag:
The AWSMachine spec would not change. When using the tag-based implementation imageLookupFormat: "my-ami-{{.BaseOS}}-fips-release-?{{.K8sVersion}}-*"
imageLookupBaseOS: rhel-8.2 This would match an AMI with the following tag:
A downside is that a set of tags is not immutable or unique, whereas an AMI name is. Therefore, CAPA would need to fail if it finds more than one image matching the set of tags. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
/kind feature
Describe the solution you'd like
I'm trying to use
imageLookupFormat: my-ami-{{.BaseOS}}-fips-release-?{{.K8sVersion}}-*
with a custom AMIs and a Kubernetes version that has some build metadatav1.21.8+fips.0
.AWS AMIs do not support
+
in the name, and when we build our AMIs using Packer we use clean_resource_name to format the name, which replaces unsupported characters with a-
.So the AMI name ends up being something like
my-ami-rhel-8.2-1.21.8-fips.0-1641416145
but the AMI that is being searched for ismy-ami-rhel-8.2-?1.21.8+fips.0-*
(note the+
vs-
)The code that is handling this is here, but its only handling an optional
v
prefix and no other changes.Anything else you would like to add:
Originally asked in Slack https://kubernetes.slack.com/archives/CD6U2V71N/p1641571157011400 and discussed 01/10/2022 CAPA meeting.
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: