Rename SupportedArchitecture to architectureOfAMI

This commit is contained in:
Ole Markus With 2021-12-13 09:12:10 +01:00
parent b785965c50
commit d987d4ac1a
2 changed files with 3 additions and 3 deletions

View File

@ -635,7 +635,7 @@ spec:
values: ["spot"]
- key: kubernetes.io/arch
operator: In
values: ["{{ SupportedArchitecture $spec.Image }}"]
values: ["{{ ArchitectureOfAMI $spec.Image }}"]
- key: "node.kubernetes.io/instance-type"
operator: In
values:

View File

@ -281,7 +281,7 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
dest["EnableSQSTerminationDraining"] = func() bool { return *cluster.Spec.NodeTerminationHandler.EnableSQSTerminationDraining }
}
dest["SupportedArchitecture"] = tf.SupportedArchitecture
dest["ArchitectureOfAMI"] = tf.architectureOfAMI
dest["ParseTaint"] = parseTaint
@ -741,7 +741,7 @@ func (tf *TemplateFunctions) GetNodeInstanceGroups() map[string]kops.InstanceGro
return nodegroups
}
func (tf *TemplateFunctions) SupportedArchitecture(amiID string) string {
func (tf *TemplateFunctions) architectureOfAMI(amiID string) string {
image, _ := tf.cloud.(awsup.AWSCloud).ResolveImage(amiID)
switch *image.Architecture {
case "x86_64":