File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
example/module/submodules/replaceMe Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ variable "service" {
6464 sourceRanges = optional (list (string ), [])
6565 annotations = optional (map (string ), {})
6666 remapPorts = optional (map (string ), {})
67+ forceNodePortType = optional (bool , false )
6768 })), [])
6869 })
6970
@@ -145,7 +146,7 @@ resource "kubernetes_service_v1" "loadBalancer" {
145146 }
146147
147148 spec {
148- type = " LoadBalancer"
149+ type = var . service . loadBalancer [ count . index ] . forceNodePortType ? " NodePort " : " LoadBalancer"
149150 publish_not_ready_addresses = var. service . loadBalancer [count . index ]. publishNotReadyAddresses
150151 allocate_load_balancer_node_ports = var. service . loadBalancer [count . index ]. allocateLoadBalancerNodePorts
151152 session_affinity = var. service . loadBalancer [count . index ]. sessionAffinity
Original file line number Diff line number Diff line change 1+ ## [ 2.2.0] - 2024-03-20
2+
3+ - added boolean ` var.service.loadbalancer.forceNodePortType ` to allow spawning lb service as type nodeport
4+
15## [ 2.1.0] - 2024-01-24
26
37- add ` podResourceTypeConfig.podManagementPolicy `
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ locals {
1919 }
2020 loadBalancer = [
2121 # {
22- # externalTrafficPolicy = "Cluster"
22+ # forceNodePortType = false
23+ # externalTrafficPolicy = "Cluster"
2324 # publishNotReadyAddresses = false
24- # sessionAffinity = "None"
25+ # sessionAffinity = "None"
2526 # sourceRanges = [
2627 # ]
2728 # remapPorts = {
You can’t perform that action at this time.
0 commit comments