Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swift network for RGW to HCI scenario #386

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/va/hci/control-plane/nncp/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ transformers:
create: true

components:
- ../../../../../lib/nncp
- ../../../../../va/hci/nncp

resources:
- values.yaml
33 changes: 33 additions & 0 deletions examples/va/hci/control-plane/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ data:
tenant_ip: 172.19.0.5
ctlplane_ip: 192.168.122.10
storage_ip: 172.18.0.5
swift_ip: 172.22.0.5
fultonj marked this conversation as resolved.
Show resolved Hide resolved
node_1:
name: ostest-master-1
internalapi_ip: 172.17.0.6
tenant_ip: 172.19.0.6
ctlplane_ip: 192.168.122.11
storage_ip: 172.18.0.6
swift_ip: 172.22.0.6
node_2:
name: ostest-master-2
internalapi_ip: 172.17.0.7
tenant_ip: 172.19.0.7
ctlplane_ip: 192.168.122.12
storage_ip: 172.18.0.7
swift_ip: 172.22.0.7

# networks
ctlplane:
Expand Down Expand Up @@ -172,6 +175,36 @@ data:
gateway: 10.0.0.1
name: subnet1
mtu: 1500
swift:
dnsDomain: swift.example.com
subnets:
- allocationRanges:
- end: 172.22.0.250
start: 172.22.0.100
cidr: 172.22.0.0/24
gateway: 172.22.0.1
name: subnet1
vlan: 25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VLAN 24 and 172.21 is the next unused range, so why VLAN 25 and 172.22 in this patch?

Because #376 is using VLAN 24 and 172.21

mtu: 1500
prefix-length: 24
iface: swift
vlan: 25
base_iface: enp6s0
lb_addresses:
- 172.22.0.80-172.22.0.90
net-attach-def: |
{
"cniVersion": "0.3.1",
"name": "swift",
"type": "macvlan",
"master": "swift",
"ipam": {
"type": "whereabouts",
"range": "172.22.0.0/24",
"range_start": "172.22.0.100",
"range_end": "172.22.0.250"
}
}
datacentre:
net-attach-def: |
{
Expand Down
8 changes: 8 additions & 0 deletions examples/va/hci/edpm-pre-ceph/nodeset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ data:
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: swift
subnetName: subnet1
nodes:
edpm-compute-0:
ansible:
Expand All @@ -120,6 +122,8 @@ data:
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: swift
subnetName: subnet1
edpm-compute-1:
ansible:
ansibleHost: 192.168.122.101
Expand All @@ -137,6 +141,8 @@ data:
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: swift
subnetName: subnet1
edpm-compute-2:
ansible:
ansibleHost: 192.168.122.102
Expand All @@ -154,6 +160,8 @@ data:
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: swift
subnetName: subnet1
# The nova-custom-ceph service is omitted since it is not yet
# defined. It will be defined and set after Ceph is deployed.
# See deployment servicesOverride for effective services list.
Expand Down
6 changes: 3 additions & 3 deletions va/hci/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ transformers:
create: true

components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- ../../lib/networking/nad
- networking/metallb
- networking/netconfig
- networking/nad
- ../../lib/control-plane

# Add storagemgmt network template, as it is needed for CephHCI
Expand Down
8 changes: 8 additions & 0 deletions va/hci/networking/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

components:
- metallb
- nad
- netconfig
181 changes: 181 additions & 0 deletions va/hci/networking/metallb/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- metallb_l2advertisement.yaml
- ocp_ip_pools.yaml

patches:
- target:
kind: IPAddressPool
labelSelector: "osp/lb-addresses-type=standard"
path: ocp_ip_pool_template.yaml

replacements:
# IPAddressPool addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.lb_addresses
targets:
- select:
kind: IPAddressPool
name: ctlplane
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.lb_addresses
targets:
- select:
kind: IPAddressPool
name: internalapi
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.lb_addresses
targets:
- select:
kind: IPAddressPool
name: storage
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.lb_addresses
targets:
- select:
kind: IPAddressPool
name: tenant
fieldPaths:
- spec.addresses

# Loadbalancer address pools
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: ctlplane
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: internalapi
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: tenant
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: ctlplane
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: storage
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.swift.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: swift
fieldPaths:
- spec.addresses

# Loadbalancer interfaces
- source:
kind: ConfigMap
name: network-values
fieldPath: data.bridgeName
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: ctlplane
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: tenant
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: storage
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: internalapi
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.swift.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: swift
fieldPaths:
- spec.interfaces.0
59 changes: 59 additions & 0 deletions va/hci/networking/metallb/metallb_l2advertisement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# Additional advertisements can be added here if needed for other networks
#

---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: ctlplane
namespace: metallb-system
spec:
ipAddressPools:
- ctlplane
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: internalapi
namespace: metallb-system
spec:
ipAddressPools:
- internalapi
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: storage
namespace: metallb-system
spec:
ipAddressPools:
- storage
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: tenant
namespace: metallb-system
spec:
ipAddressPools:
- tenant
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: swift
namespace: metallb-system
spec:
ipAddressPools:
- swift
interfaces:
- _replaced_
7 changes: 7 additions & 0 deletions va/hci/networking/metallb/ocp_ip_pool_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: _ignored_
spec:
addresses: []
Loading