Skip to content

Commit 0a67efb

Browse files
committed
enable octavia in uni02beta
1 parent 49a3862 commit 0a67efb

File tree

7 files changed

+363
-3
lines changed

7 files changed

+363
-3
lines changed

dt/uni02beta/kustomization.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
apiVersion: kustomize.config.k8s.io/v1alpha1
33
kind: Component
44

5+
secretGenerator:
6+
- name: octavia-ca-passphrase
7+
literals:
8+
- server-ca-passphrase=12345678
9+
options:
10+
disableNameSuffixHash: true
11+
512
transformers:
613
- |-
714
apiVersion: builtin
@@ -271,3 +278,100 @@ replacements:
271278
- spec.heat.enabled
272279
options:
273280
create: true
281+
282+
# Octavia
283+
- source:
284+
kind: ConfigMap
285+
name: service-values
286+
fieldPath: data.octavia.enabled
287+
targets:
288+
- select:
289+
kind: OpenStackControlPlane
290+
fieldPaths:
291+
- spec.octavia.enabled
292+
options:
293+
create: true
294+
295+
- source:
296+
kind: ConfigMap
297+
name: service-values
298+
fieldPath: data.octavia.amphoraImageContainerImage
299+
targets:
300+
- select:
301+
kind: OpenStackControlPlane
302+
fieldPaths:
303+
- spec.octavia.template.amphoraImageContainerImage
304+
options:
305+
create: true
306+
307+
- source:
308+
kind: ConfigMap
309+
name: service-values
310+
fieldPath: data.octavia.apacheContainerImage
311+
targets:
312+
- select:
313+
kind: OpenStackControlPlane
314+
fieldPaths:
315+
- spec.octavia.template.apacheContainerImage
316+
options:
317+
create: true
318+
319+
- source:
320+
kind: ConfigMap
321+
name: service-values
322+
fieldPath: data.octavia.octaviaAPI.networkAttachments
323+
targets:
324+
- select:
325+
kind: OpenStackControlPlane
326+
fieldPaths:
327+
- spec.octavia.template.octaviaAPI.networkAttachments
328+
options:
329+
create: true
330+
331+
- source:
332+
kind: ConfigMap
333+
name: service-values
334+
fieldPath: data.octavia.octaviaHousekeeping.networkAttachments
335+
targets:
336+
- select:
337+
kind: OpenStackControlPlane
338+
fieldPaths:
339+
- spec.octavia.template.octaviaHousekeeping.networkAttachments
340+
options:
341+
create: true
342+
343+
- source:
344+
kind: ConfigMap
345+
name: service-values
346+
fieldPath: data.octavia.octaviaHealthManager.networkAttachments
347+
targets:
348+
- select:
349+
kind: OpenStackControlPlane
350+
fieldPaths:
351+
- spec.octavia.template.octaviaHealthManager.networkAttachments
352+
options:
353+
create: true
354+
355+
- source:
356+
kind: ConfigMap
357+
name: service-values
358+
fieldPath: data.octavia.octaviaWorker.networkAttachments
359+
targets:
360+
- select:
361+
kind: OpenStackControlPlane
362+
fieldPaths:
363+
- spec.octavia.template.octaviaWorker.networkAttachments
364+
options:
365+
create: true
366+
367+
- source:
368+
kind: ConfigMap
369+
name: service-values
370+
fieldPath: data.ovn.ovnController.nicMappings
371+
targets:
372+
- select:
373+
kind: OpenStackControlPlane
374+
fieldPaths:
375+
- spec.ovn.template.ovnController.nicMappings
376+
options:
377+
create: true

dt/uni02beta/networking/kustomization.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,21 @@ transformers:
1515
- path: metadata/name
1616
kind: Namespace
1717
create: true
18+
1819
components:
19-
- ../../../lib/networking/metallb
20-
- ../../../lib/networking/netconfig
2120
- ../../../lib/networking/nad
21+
22+
resources:
23+
- nad.yaml
24+
25+
replacements:
26+
- source:
27+
kind: ConfigMap
28+
name: network-values
29+
fieldPath: data.octavia.net-attach-def
30+
targets:
31+
- select:
32+
kind: NetworkAttachmentDefinition
33+
name: octavia
34+
fieldPaths:
35+
- spec.config

dt/uni02beta/networking/nad.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: k8s.cni.cncf.io/v1
3+
kind: NetworkAttachmentDefinition
4+
metadata:
5+
name: octavia
6+
labels:
7+
osp/net: octavia
8+
osp/net-attach-def-type: standard
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
5+
transformers:
6+
- |-
7+
apiVersion: builtin
8+
kind: NamespaceTransformer
9+
metadata:
10+
name: _ignored_
11+
namespace: openstack
12+
setRoleBindingSubjects: none
13+
unsetOnly: true
14+
fieldSpecs:
15+
- path: metadata/name
16+
kind: Namespace
17+
create: true
18+
19+
components:
20+
- ../../../../lib/nncp
21+
22+
patches:
23+
- target:
24+
kind: NodeNetworkConfigurationPolicy
25+
name: master-0
26+
patch: |-
27+
- op: add
28+
path: /spec/desiredState/interfaces/-
29+
value:
30+
description: Octavia vlan host interface
31+
name: octavia
32+
state: up
33+
type: vlan
34+
vlan:
35+
base-iface: _replaced_
36+
id: _replaced_
37+
38+
- target:
39+
kind: NodeNetworkConfigurationPolicy
40+
name: master-0
41+
patch: |-
42+
- op: add
43+
path: /spec/desiredState/interfaces/-
44+
value:
45+
description: Octavia bridge
46+
mtu: 1500
47+
name: octbr
48+
type: linux-bridge
49+
bridge:
50+
options:
51+
stp:
52+
enabled: false
53+
port:
54+
- name: octavia
55+
56+
- target:
57+
kind: NodeNetworkConfigurationPolicy
58+
name: master-1
59+
patch: |-
60+
- op: add
61+
path: /spec/desiredState/interfaces/-
62+
value:
63+
description: Octavia vlan host interface
64+
name: octavia
65+
state: up
66+
type: vlan
67+
vlan:
68+
base-iface: _replaced_
69+
id: _replaced_
70+
71+
- target:
72+
kind: NodeNetworkConfigurationPolicy
73+
name: master-1
74+
patch: |-
75+
- op: add
76+
path: /spec/desiredState/interfaces/-
77+
value:
78+
description: Octavia bridge
79+
mtu: 1500
80+
name: octbr
81+
type: linux-bridge
82+
bridge:
83+
options:
84+
stp:
85+
enabled: false
86+
port:
87+
- name: octavia
88+
89+
- target:
90+
kind: NodeNetworkConfigurationPolicy
91+
name: master-2
92+
patch: |-
93+
- op: add
94+
path: /spec/desiredState/interfaces/-
95+
value:
96+
description: Octavia vlan host interface
97+
name: octavia
98+
state: up
99+
type: vlan
100+
vlan:
101+
base-iface: _replaced_
102+
id: _replaced_
103+
104+
- target:
105+
kind: NodeNetworkConfigurationPolicy
106+
name: master-2
107+
patch: |-
108+
- op: add
109+
path: /spec/desiredState/interfaces/-
110+
value:
111+
description: Octavia bridge
112+
mtu: 1500
113+
name: octbr
114+
type: linux-bridge
115+
bridge:
116+
options:
117+
stp:
118+
enabled: false
119+
port:
120+
- name: octavia
121+
122+
replacements:
123+
- source:
124+
kind: ConfigMap
125+
name: network-values
126+
fieldPath: data.octavia.base_iface
127+
targets:
128+
- select:
129+
kind: NodeNetworkConfigurationPolicy
130+
name: master-0
131+
fieldPaths:
132+
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
133+
134+
- source:
135+
kind: ConfigMap
136+
name: network-values
137+
fieldPath: data.octavia.vlan
138+
targets:
139+
- select:
140+
kind: NodeNetworkConfigurationPolicy
141+
name: master-0
142+
fieldPaths:
143+
- spec.desiredState.interfaces.[name=octavia].vlan.id
144+
145+
- source:
146+
kind: ConfigMap
147+
name: network-values
148+
fieldPath: data.octavia.base_iface
149+
targets:
150+
- select:
151+
kind: NodeNetworkConfigurationPolicy
152+
name: master-1
153+
fieldPaths:
154+
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
155+
156+
- source:
157+
kind: ConfigMap
158+
name: network-values
159+
fieldPath: data.octavia.vlan
160+
targets:
161+
- select:
162+
kind: NodeNetworkConfigurationPolicy
163+
name: master-1
164+
fieldPaths:
165+
- spec.desiredState.interfaces.[name=octavia].vlan.id
166+
167+
- source:
168+
kind: ConfigMap
169+
name: network-values
170+
fieldPath: data.octavia.base_iface
171+
targets:
172+
- select:
173+
kind: NodeNetworkConfigurationPolicy
174+
name: master-2
175+
fieldPaths:
176+
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
177+
178+
- source:
179+
kind: ConfigMap
180+
name: network-values
181+
fieldPath: data.octavia.vlan
182+
targets:
183+
- select:
184+
kind: NodeNetworkConfigurationPolicy
185+
name: master-2
186+
fieldPaths:
187+
- spec.desiredState.interfaces.[name=octavia].vlan.id

examples/dt/uni02beta/control-plane/networking/nncp/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ transformers:
1717
create: true
1818
1919
components:
20-
- ../../../../../../lib/nncp
20+
- ../../../../../../dt/uni02beta/networking/nncp
2121

2222
resources:
2323
- values.yaml

examples/dt/uni02beta/control-plane/networking/nncp/values.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,30 @@ data:
169169
"range_end": "172.19.0.70"
170170
}
171171
}
172+
octavia:
173+
dnsDomain: octavia.openstack.lab
174+
mtu: 1500
175+
vlan: 23
176+
base_iface: enp7s0
177+
net-attach-def: |
178+
{
179+
"cniVersion": "0.3.1",
180+
"name": "octavia",
181+
"type": "bridge",
182+
"bridge": "octbr",
183+
"ipam": {
184+
"type": "whereabouts",
185+
"range": "172.23.0.0/24",
186+
"range_start": "172.23.0.30",
187+
"range_end": "172.23.0.70",
188+
"routes": [
189+
{
190+
"dst": "172.24.0.0/16",
191+
"gw": "172.23.0.150"
192+
}
193+
]
194+
}
195+
}
172196
external:
173197
dnsDomain: external.example.com
174198
subnets:

0 commit comments

Comments
 (0)