Skip to content

Skip no-op updates in eksctl utils update-authentication-mode - #8904

Open
wind0r wants to merge 1 commit into
eksctl-io:mainfrom
wind0r:fix-update-authentication-mode-noop
Open

wind0r wants to merge 1 commit into
eksctl-io:mainfrom
wind0r:fix-update-authentication-mode-noop

Conversation

@wind0r

@wind0r wind0r commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #8903

eksctl utils update-authentication-mode called UpdateClusterConfig unconditionally. The EKS API rejects an update where the target authentication mode equals the current one with InvalidParameterException: Unsupported authentication mode update from API_AND_CONFIG_MAP to API_AND_CONFIG_MAP, so any idempotent re-run (CI pipelines, GitOps) failed hard.

Changes:

  • Skip the update (info log + exit 0) when the cluster's current authentication mode already matches the desired one. The cluster description is already cached on the cluster provider by NewProviderForExistingCluster/RefreshClusterStatus, so no extra DescribeCluster call is needed.
  • Fix the setting cluster's authentication mode to %s log line to print the mode resolved from the cluster config instead of the --authentication-mode flag, which is empty when the mode comes from a config file via -f.
  • Extracted the API-facing part of doUpdateAuthenticationMode into a helper taking the cluster provider so it can be unit-tested with the mock provider.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

Skip the UpdateClusterConfig call when the cluster's authentication mode
already matches the desired mode: the EKS API rejects no-op updates with
InvalidParameterException ("Unsupported authentication mode update from
X to X"), which broke idempotent re-runs from CI/GitOps pipelines. The
cluster description is already cached on the cluster provider, so no
extra API call is needed.

Also log the authentication mode resolved from the cluster config
instead of the --authentication-mode flag, which is empty when the mode
comes from a config file via -f.

Signed-off-by: Steffen Windoffer <steffen.windoffer@exaring.de>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] utils update-authentication-mode fails on no-op updates (Unsupported authentication mode update from X to X)

1 participant