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

InvalidParameterException: Addon version specified is not supported #2554

Closed
2 tasks done
aluizioj opened this issue Mar 13, 2024 · 2 comments
Closed
2 tasks done

InvalidParameterException: Addon version specified is not supported #2554

aluizioj opened this issue Mar 13, 2024 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@aluizioj
Copy link

Acknowledgements

Describe the bug

When using the "UpdateAddonInput" structure type, passing the 'AddonVersion' parameter, to be used in updating the EKS cluster add-on, I receive the message "Addon version specified is not supported" and when I remove this parameter, I can run the process, but does nothing.

Expected Behavior

update addons successufully

Current Behavior

failed to update addons: operation error EKS: UpdateAddon, https response error StatusCode: 400, RequestID: 41903578-1025-4e09-928e-68ec7bda6c2e, InvalidParameterException: Addon version specified is not supported

image

Reproduction Steps

func startDeployAddons(eksClient *eks.Client, cluster string, addons []string) error {
log.Printf("Iniciando atualização dos addons do cluster %s", cluster)
for _, addons := range addons {
// Construção dos parametros para atualização dos addons
values := strings.Split(addons, ",")
addonName := values[0]
addonVersion := values[1]
updateParams := &eks.UpdateAddonInput{
AddonName: aws.String(addonName),
AddonVersion: aws.String(addonVersion),
ClusterName: aws.String(cluster),
}
// Upgrade dos addons
updateAddons, err := eksClient.UpdateAddon(context.TODO(),updateParams)
if err != nil {
log.Fatalf("failed to update addons: %v", err)
}
log.Printf("ID de atualização do %s addons: %v", addonName, *updateAddons.Update.Id)
for {
// Construção dos parametros para consultar o status da atualização usando o ID
describeParams := &eks.DescribeAddonInput{
ClusterName: aws.String(cluster),
AddonName: aws.String(addonName),
}
// Lê a informação da atualização do addon
describeAddons, err := eksClient.DescribeAddon(context.TODO(), describeParams)
if err != nil {
log.Fatalf("failed to describing status update addons: %v", err)
}
// Aguarda 1 minuto para verifica novamente o status do addons
time.Sleep(60 * time.Second)
// Verifica o status
if describeAddons.Addon.Status == "UPDATING" {
log.Printf("Status do addon %s: %s", addonName, describeAddons.Addon.Status)
} else if describeAddons.Addon.Status == "ACTIVE" {
log.Printf("Addon %s atualizado com sucesso!", addonName)
message := fmt.Sprintf("Addon %s update completed successfully!", addonName)
decision.SendMessageInfo(cluster, message, 3)
break
} else {
log.Printf("Addon %s falhou a ser atualizado!", addonName)
summary := "[K8S] Check cluster add-ons before upgrading"
description := fmt.Sprintf("Cluster: %s\nAddon: %s\nVersion: %s\n", cluster, addonName, addonVersion)
resume := decision.JiraIssueSupport(summary, description, "false", "false")
message := fmt.Sprintf("Addon %s update completed failed! Open support: %s", addonName, resume)
decision.SendMessageInfo(cluster, message, 1)
break
}
}
}
return nil
}

Possible Solution

N/A

Additional Information/Context

According to the UpdateAddon API documentation on AWS, the AddonVersion field is within a body data JSON request and not a URI parameters?
Link: https://docs.aws.amazon.com/pt_br/eks/latest/APIReference/API_UpdateAddon.html

AWS Go SDK V2 Module Versions Used

github.com/aws/aws-sdk-go-v2 v1.24.1
github.com/aws/aws-sdk-go-v2/config v1.26.6
github.com/aws/aws-sdk-go-v2/credentials v1.16.16
github.com/aws/aws-sdk-go-v2/service/eks v1.37.1
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7

Compiler and Version used

go version go1.22.0 linux/amd64

Operating System and version

Ubuntu 22.04

@aluizioj aluizioj added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 13, 2024
@aluizioj
Copy link
Author

Resolved!

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant