Add LKE Nodepool Isolation field - #908
Merged
zliang-akamai merged 18 commits intoJun 5, 2026
Merged
Conversation
aweingarten
requested review from
Copilot,
lgarber-akamai and
mawilk90
and removed request for
a team
March 4, 2026 14:27
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Go SDK support for LKE Enterprise cluster firewall ruleset_ids, and introduces node pool network isolation + disk encryption fields so callers can control public IP assignment and encrypted disks via the API.
Changes:
- Add
RuleSetIDstoLKEClusterfor enterprise service-managed firewall rulesets deserialization. - Add
Isolationto LKE node pool structs/options and propagate it throughGetCreateOptions()/GetUpdateOptions(). - Add
DiskEncryptiontoLKENodePoolCreateOptionsand propagate it throughGetCreateOptions().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lke_clusters.go |
Adds ruleset_ids field + struct for enterprise firewall ruleset ID deserialization. |
lke_node_pools.go |
Adds node pool isolation + create-time disk_encryption support and propagates them into option helpers. |
Comments suppressed due to low confidence (3)
lke_node_pools.go:153
LKENodePool.GetCreateOptions()does not copy the poolTypeintoLKENodePoolCreateOptions(Typeis a required JSON field). This can produce invalid create requests when callers useGetCreateOptions()to recreate/clone an existing pool. Copyl.Typeintoo.Type(and consider whether any other required fields should be mirrored).
func (l LKENodePool) GetCreateOptions() (o LKENodePoolCreateOptions) {
o.Count = l.Count
o.Disks = l.Disks
o.Tags = l.Tags
o.Labels = l.Labels
o.Taints = l.Taints
o.Autoscaler = &l.Autoscaler
o.K8sVersion = l.K8sVersion
o.UpdateStrategy = l.UpdateStrategy
o.Label = l.Label
o.FirewallID = l.FirewallID
o.DiskEncryption = l.DiskEncryption
o.Isolation = l.Isolation
lke_node_pools.go:113
- New
Isolation/DiskEncryptionfields were added to the node pool types/options, but there are no corresponding unit tests asserting request serialization and response deserialization for these fields. Given existing unit coverage for LKE node pools, add tests/fixtures that (1) includeisolationin create + update payloads and (2) verifydisk_encryptionis sent on create and unmarshaled on responses.
Isolation *LKENodePoolIsolation `json:"isolation,omitempty"`
// K8sVersion and UpdateStrategy are only for LKE Enterprise to support node pool upgrades.
// It may not currently be available to all users and is under v4beta.
K8sVersion *string `json:"k8s_version,omitempty"`
UpdateStrategy *LKENodePoolUpdateStrategy `json:"update_strategy,omitempty"`
}
// LKENodePoolCreateOptions fields are those accepted by CreateLKENodePool
type LKENodePoolCreateOptions struct {
Count int `json:"count"`
Type string `json:"type"`
Disks []LKENodePoolDisk `json:"disks"`
Tags []string `json:"tags"`
Labels LKENodePoolLabels `json:"labels"`
Taints []LKENodePoolTaint `json:"taints"`
Label *string `json:"label,omitempty"`
Autoscaler *LKENodePoolAutoscaler `json:"autoscaler,omitempty"`
FirewallID *int `json:"firewall_id,omitempty"`
// NOTE: Disk encryption may not currently be available to all users.
DiskEncryption InstanceDiskEncryption `json:"disk_encryption,omitempty"`
Isolation *LKENodePoolIsolation `json:"isolation,omitempty"`
lke_clusters.go:60
RuleSetIDswas added toLKECluster, but there are no unit tests/fixtures in the current test suite validating (a) unmarshaling whenruleset_idsis present for enterprise clusters and (b) behavior when it is absent. Add unit tests similar to other LKE cluster unmarshal tests to prevent regressions in timestamp masking/custom unmarshaling.
// RuleSetIDs contains the IDs of the service-managed firewall rulesets
// automatically created for LKE Enterprise clusters.
RuleSetIDs *LKEClusterRuleSetIDs `json:"ruleset_ids,omitempty"`
}
// LKEClusterRuleSetIDs contains the inbound and outbound ruleset IDs for an LKE-E cluster.
type LKEClusterRuleSetIDs struct {
Inbound int `json:"inbound"`
Outbound int `json:"outbound"`
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aweingarten
force-pushed
the
rulesets-nodepool-isolation
branch
7 times, most recently
from
March 5, 2026 18:43
4a0d3d6 to
6030012
Compare
aweingarten
force-pushed
the
rulesets-nodepool-isolation
branch
from
March 10, 2026 18:01
6030012 to
271eb30
Compare
…ptions for network isolation
zliang-akamai
force-pushed
the
rulesets-nodepool-isolation
branch
from
June 3, 2026 22:07
8198cc7 to
a2ab3e9
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… tests accordingly
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
zliang-akamai
approved these changes
Jun 4, 2026
ezilber-akamai
approved these changes
Jun 5, 2026
ezilber-akamai
approved these changes
Jun 5, 2026
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.
📝 Description
Adds Go SDK support for node pool network isolation.
Node Pool Isolation
New
LKENodePoolIsolationstruct withPublicIPv4/PublicIPv6booleans, added toLKENodePool,LKENodePoolCreateOptions, andLKENodePoolUpdateOptions:Allows controlling whether worker nodes get public IPv4/IPv6 addresses. Essential for VPC-only deployments where nodes should have no public IPv4.
✔️ How to Test