Skip to content

Commit 113a962

Browse files
authored
add advanced networking support for baremetal admin cluster (#15643)
1 parent 522fc28 commit 113a962

File tree

3 files changed

+664
-2
lines changed

3 files changed

+664
-2
lines changed

mmv1/products/gkeonprem/BareMetalAdminCluster.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,20 @@ properties:
175175
required: true
176176
item_type:
177177
type: String
178+
- name: 'advancedNetworking'
179+
type: Boolean
180+
description: |
181+
Enables the use of advanced Anthos networking features.
182+
- name: 'multipleNetworkInterfacesConfig'
183+
type: NestedObject
184+
description: |
185+
Configuration for multiple network interfaces.
186+
properties:
187+
- name: 'enabled'
188+
type: Boolean
189+
description: |
190+
When set network_config.advanced_networking is automatically
191+
set to true.
178192
- name: 'controlPlane'
179193
type: NestedObject
180194
description: |
@@ -310,6 +324,109 @@ properties:
310324
description: |
311325
Whether manual load balancing is enabled.
312326
required: true
327+
- name: 'bgpLbConfig'
328+
type: NestedObject
329+
properties:
330+
- name: 'asn'
331+
type: Integer
332+
description: |
333+
BGP autonomous system number (ASN) of the cluster.
334+
- name: 'bgpPeerConfigs'
335+
type: Array
336+
description: |
337+
BGP autonomous system number (ASN) of the cluster.
338+
item_type:
339+
type: NestedObject
340+
properties:
341+
- name: 'asn'
342+
type: Integer
343+
- name: 'ipAddress'
344+
type: String
345+
- name: 'controlPlaneNodes'
346+
type: Array
347+
description: |
348+
The IP address of the control plane node that
349+
connects to the external peer.
350+
item_type:
351+
type: String
352+
- name: 'addressPools'
353+
type: Array
354+
description: |
355+
a list of non-overlapping IP pools used
356+
by load balancer typed services.
357+
item_type:
358+
type: NestedObject
359+
properties:
360+
- name: 'pool'
361+
type: String
362+
- name: 'addresses'
363+
type: Array
364+
description: |
365+
The addresses that are part of this pool.
366+
item_type:
367+
type: String
368+
- name: 'avoidBuggyIps'
369+
type: Boolean
370+
description: |
371+
This avoids buggy consumer devices mistakenly
372+
dropping IPv4 traffic for those special IP addresses.
373+
- name: 'manualAssign'
374+
type: Boolean
375+
description: |
376+
If true, prevent IP addresses from being automatically assigned.
377+
- name: 'loadBalancerNodePoolConfig'
378+
type: NestedObject
379+
properties:
380+
- name: 'nodePoolConfig'
381+
type: NestedObject
382+
properties:
383+
- name: 'nodeConfigs'
384+
type: Array
385+
item_type:
386+
type: NestedObject
387+
properties:
388+
- name: 'nodeIp'
389+
type: String
390+
- name: 'labels'
391+
type: KeyValuePairs
392+
description: |
393+
The labels assigned to nodes of this node pool.
394+
An object containing a list of key/value pairs.
395+
Example:
396+
{ "name": "wrench", "mass": "1.3kg", "count": "3" }.
397+
- name: 'operatingSystem'
398+
type: String
399+
description: |
400+
The available Operating Systems to be run in a Node.
401+
- name: 'taints'
402+
type: Array
403+
default_from_api: true
404+
item_type:
405+
type: NestedObject
406+
properties:
407+
- name: 'key'
408+
type: String
409+
- name: 'value'
410+
type: String
411+
- name: 'effect'
412+
type: String
413+
description: Available taint effects.
414+
- name: 'labels'
415+
type: KeyValuePairs
416+
description: |
417+
The labels assigned to nodes of this node pool.
418+
An object containing a list of key/value pairs.
419+
Example:
420+
{ "name": "wrench", "mass": "1.3kg", "count": "3" }.
421+
- name: 'kubeletConfig'
422+
type: NestedObject
423+
properties:
424+
- name: 'registryPullQps'
425+
type: Integer
426+
- name: 'registryBurst'
427+
type: Integer
428+
- name: 'serializeImagePullsDisabled'
429+
type: Boolean
313430
- name: 'storage'
314431
type: NestedObject
315432
description: |

mmv1/templates/terraform/examples/gkeonprem_bare_metal_admin_cluster_full.tf.tmpl

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ resource "google_gkeonprem_bare_metal_admin_cluster" "{{$.PrimaryResourceId}}" {
1111
service_address_cidr_blocks = ["172.26.0.0/16"]
1212
pod_address_cidr_blocks = ["10.240.0.0/13"]
1313
}
14+
advanced_networking = true
15+
multiple_network_interfaces_config {
16+
enabled = true
17+
}
1418
}
1519
node_config {
1620
max_pods_per_node = 250
@@ -51,8 +55,49 @@ resource "google_gkeonprem_bare_metal_admin_cluster" "{{$.PrimaryResourceId}}" {
5155
vip_config {
5256
control_plane_vip = "10.200.0.5"
5357
}
54-
manual_lb_config {
55-
enabled = true
58+
bgp_lb_config {
59+
asn = 123456
60+
bgp_peer_configs {
61+
asn = 123457
62+
ip_address = "10.0.0.1"
63+
control_plane_nodes = ["test-node"]
64+
}
65+
address_pools {
66+
pool = "loadBalancerAddressPool-1"
67+
addresses = [
68+
"10.200.0.14/32",
69+
"10.200.0.15/32",
70+
"10.200.0.16/32",
71+
"10.200.0.17/32",
72+
"10.200.0.18/32",
73+
"fd00:1::f/128",
74+
"fd00:1::10/128",
75+
"fd00:1::11/128",
76+
"fd00:1::12/128"
77+
]
78+
manual_assign = true
79+
avoid_buggy_ips = true
80+
}
81+
load_balancer_node_pool_config {
82+
node_pool_config {
83+
labels = {}
84+
operating_system = "LINUX"
85+
node_configs {
86+
labels = {}
87+
node_ip = "10.200.0.9"
88+
}
89+
kubelet_config {
90+
registry_burst = 12
91+
registry_pull_qps = 10
92+
serialize_image_pulls_disabled = true
93+
}
94+
taints {
95+
key = "test-key"
96+
value = "test-value"
97+
effect = "NO_EXECUTE"
98+
}
99+
}
100+
}
56101
}
57102
}
58103
storage {

0 commit comments

Comments
 (0)