Skip to content

Commit

Permalink
Add clusterLoadBalancerName and clusterLoadBalancerAlgorithm variables
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Hros <[email protected]>
  • Loading branch information
chess-knight committed Jul 3, 2024
1 parent ba78f59 commit c236a6e
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ spec:
openAPIV3Schema:
type: string
default: "lb11"
- name: clusterLoadBalancerName
required: false
schema:
openAPIV3Schema:
type: string
- name: clusterLoadBalancerAlgorithm
required: false
schema:
openAPIV3Schema:
type: string
default: "round_robin"
- name: clusterLoadBalancerExtraServices
required: false
schema:
Expand Down Expand Up @@ -192,6 +203,10 @@ spec:
path: "/spec/template/spec/controlPlaneLoadBalancer/type"
valueFrom:
variable: clusterLoadBalancerType
- op: add
path: "/spec/template/spec/controlPlaneLoadBalancer/algorithm"
valueFrom:
variable: clusterLoadBalancerAlgorithm
- op: add
path: "/spec/template/spec/controlPlaneLoadBalancer/extraServices"
valueFrom:
Expand All @@ -204,6 +219,19 @@ spec:
path: "/spec/template/spec/controlPlaneLoadBalancer/region"
valueFrom:
variable: region
- name: existing_load_balancer
enabledIf: {{ `"{{ if .clusterLoadBalancerName }}true{{end}}"` }}
definitions:
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: HetznerClusterTemplate
matchResources:
infrastructureCluster: true
jsonPatches:
- op: add
path: "/spec/template/spec/controlPlaneLoadBalancer/name"
valueFrom:
variable: clusterLoadBalancerName
- name: HetznerBareMetalMachineTemplateWorker
definitions:
- selector:
Expand Down

0 comments on commit c236a6e

Please sign in to comment.