You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified all of my SDK modules are up-to-date (you can perform a bulk update with go get -u github.com/aws/aws-sdk-go-v2/...)
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
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
}
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.
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)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
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
The text was updated successfully, but these errors were encountered: