Ruleset prefix list isolation support#2290
Open
aweingarten wants to merge 6 commits intolinode:devfrom
Open
Conversation
6878459 to
ddba969
Compare
ddba969 to
3a48f0f
Compare
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
What does this PR do and why is this change necessary?
Adds LKE Enterprise provisioning support across three areas: firewall rulesets/prefix lists, node pool isolation & disk encryption, and zero-pool cluster creation.
Dependencies
The following linodego additions are required in PR
LKEClusterRuleSetIDs(Inbound/Outbound int)discoverClusterRulesets()inlinode_lke_clusterLKECluster.RuleSetIDsLKENodePoolIsolation(PublicIPv4/PublicIPv6 bool)isolationblock onlinode_lke_cluster+linode_lke_node_poolLKENodePoolCreateOptions.DiskEncryptiondisk_encryptionon pool createLKENodePoolCreateOptions.Isolationisolationon pool createLKENodePoolUpdateOptions.Isolationisolationon pool updateClient.ListFirewallRuleSets()discoverClusterRulesets()Firewall Ruleset References
New
inbound_ruleset/outbound_rulesetattributes onlinode_firewallaccept a list of ruleset IDs. These are prepended before inline rules in the API payload and separated back out on read. This lets users wire LKE-E service-managed rulesets (control-plane, registry, DNS, etc.) directly into a firewall resource.Prefix List Support
Changed
ipv4/ipv6rule address types fromcidrtypes.IPv4PrefixType/IPv6PrefixTypetotypes.StringTypeso that prefix list tokens (e.g.pl::subnets:123,pl:system:ps:managed:container:registry) are accepted alongside CIDRs.LKE-E Cluster
ruleset_idsNew computed
ruleset_idsblock onlinode_lke_clusterexposesinboundandoutboundfirewall ruleset IDs. Discovered viaListFirewallRuleSetsmatching thelke{id}-inbound/lke{id}-outboundlabel convention, since the cluster API does not return these natively.Node Pool Isolation
New
isolationblock on bothlinode_lke_cluster(SDKv2 pools) andlinode_lke_node_pool(framework resource) withpublic_ipv4/public_ipv6booleans.Node Pool Disk Encryption
disk_encryptionchanged from computed-only to optional+computed with validation (enabled/disabled). ForceNew on the framework resource.Zero-Pool Enterprise Clusters
linode_lke_clusternow supports creating enterprise-tier clusters with zero inline node pools. The node-ready wait is skipped andcustomDiffValidateOptionalCountguards against nil pool lists.Files Changed
linode/lke/resource.godiscoverClusterRulesets()helper, zero-pool wait logic, isolation/disk_encryption on pool createlinode/lke/schema_resource.goruleset_idscomputed block,isolationblock,disk_encryptionoptional+validatedlinode/lke/cluster.goNodePoolSpecgetsDiskEncryption/Isolation, reconcile/expand/flatten updatedlinode/lkenodepool/framework_models.goNodePoolIsolationModel, flatten/create/update/copy for isolation + disk_encryptionlinode/lkenodepool/framework_resource_schema.goisolationblock,disk_encryptionoptional withRequiresReplacelinode/firewall/framework_schema_resource.goinbound_ruleset/outbound_rulesetattributes, ipv4/ipv6 →types.StringTypelinode/firewall/framework_schema_datasource.gotypes.StringTypelinode/firewall/framework_models.goseparateRulesetRefs(), ruleset expand/flatten,InboundRuleSet/OutboundRuleSetfieldslinode/firewall/firewall_helpers_unit_test.go✔️ How to Test
What are the steps to reproduce the issue or verify the changes?
tier = "enterprise"and zero inline poolslinode_lke_cluster.main.ruleset_ids[0].inbound/.outboundin alinode_firewallresource'sinbound_ruleset/outbound_rulesetipv4 = ["pl::subnets:123"])linode_lke_node_poolwithdisk_encryption = "enabled"andisolation { public_ipv4 = false; public_ipv6 = true }tofu applycompletes andtofu planshows no driftHow do I run the relevant unit tests?