Conversation
The AliCloud vendor-access policy grants per-API `cs:` actions. It already
includes `cs:UpgradeCluster`, which covers the ACK control plane, but not the
action backing the UpgradeClusterNodepool API
(POST /clusters/{ClusterId}/nodepools/{NodepoolId}/upgrade).
Without `cs:UpgradeClusterNodepool`, neither Terraform nor the aliyun CLI can
upgrade the kubelet version of ACK worker node pools, so a Kubernetes upgrade
performed through the vendor-access roles can only complete the control plane
half and not the node half.
The `streamnative-bootstrap` and `streamnative-support` roles both attach this
same policy document, so this single addition grants the action to both.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing: an ACK cluster upgrade upgrades worker kubelets in place along with the control plane, so this action isn't needed to complete a Kubernetes version upgrade — worth revisiting if node pools lag the control plane, get scaled out at an older version, or need image rotations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The AliCloud
vendor-accesspolicy grants Container Service (ACK) permissions as an explicit per-APIcs:action list rather than a wildcard. That list already includescs:UpgradeCluster, which covers upgrading the ACK control plane, but it does not include the action backing theUpgradeClusterNodepoolAPI (POST /clusters/{ClusterId}/nodepools/{NodepoolId}/upgrade).The result is that AliCloud ACK node pool upgrades require this action; without it Kubernetes node upgrades cannot be performed by the vendor-access roles. Neither Terraform (
alicloud_cs_kubernetes_node_pool) nor thealiyunCLI can raise the kubelet version of worker node pools, so a Kubernetes upgrade can only complete the control plane half and the nodes stay on the old version.Change
Adds a single action to the
cs:statement inmodules/alicloud/vendor-access/files/access_policy.json.tpl:"cs:UpgradeCluster", + "cs:UpgradeClusterNodepool", "cs:UpgradeK8sComponents"Placed alphabetically between
cs:UpgradeClusterandcs:UpgradeK8sComponents, matching the existing ordering in that block. No other actions added, no reformatting, no other cloud vendors touched.Both
streamnative-bootstrapandstreamnative-supportconsume this same policy document vialocal.access_policy_documentinmodules/alicloud/vendor-access/main.tf, so this one addition grants the action to both roles.Action name
Confirmed against Alibaba Cloud's ACK API reference for
UpgradeClusterNodepool, which documentscs:UpgradeClusterNodepoolas the value to use in theActionpolicy element:https://www.alibabacloud.com/help/en/ack/ack-managed-and-ack-dedicated/developer-reference/api-cs-2015-12-15-upgradeclusternodepool
Note the capitalization: Alibaba spells this API
Nodepool(lowercasep), consistent with the existingcs:DeleteClusterNodepoolin this file, and unlikecs:ModifyClusterNodePool/cs:ScaleClusterNodePoolwhich Alibaba spellsNodePool. The spelling here follows what each API's own documentation specifies.Effect
This module is applied by the account owner in their own AliCloud account, so the change takes effect only after the module is re-applied there. Updating the policy creates a new RAM policy version and repoints the default, so a
terraform applyis required — the existing roles do not pick it up automatically.Consumers pinned to a release tag (
?ref=vX.Y.Z) also need to bump the ref to a release containing this commit; consumers following the AliCloud README example (?ref=main) pick it up on their next apply.Testing
"Effect": "Allow"statement on"Resource": ["*"], so it grants one additional ACK API and removes nothing.🤖 Generated with Claude Code