forked from openstack-k8s-operators/architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openstack-k8s-operators#404 from fultonj/net2
Add Swift network for RGW to HCI scenario When Ceph RGW is used, an endpoint for Swift storage is hosted not in a pod on k8s but on an EDPM node. Thus, a service hosted on an EDPM node will need to be accessed by cloud users from a separate network. This patch adds the Swift storage network (swift) with VLAN 25 and range 172.22.0.0/24 in the HCI values example. The Swift network is configured on the HCI EDPM nodes and an NNCP, NAD, L2Advertisement and IPAddressPool are defined so that a pod in k8s can connect to it; such as the tempest pod which will perform object storage tests. Jira: https://issues.redhat.com/browse/OSPRH-6675 Reviewed-by: Andrew Bays <[email protected]> Reviewed-by: John Fulton <[email protected]> Reviewed-by: Francesco Pantano <[email protected]>
- Loading branch information
Showing
14 changed files
with
300 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ transformers: | |
components: | ||
- ../../../../lib/dataplane/nodeset | ||
- ../../../../va/hci/nodeset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
resources: | ||
- metallb_l2advertisement.yaml | ||
- ocp_ip_pools.yaml | ||
|
||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.lb_addresses | ||
targets: | ||
- select: | ||
group: metallb.io | ||
kind: IPAddressPool | ||
name: swift | ||
fieldPaths: | ||
- spec.addresses | ||
options: | ||
create: true | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.iface | ||
targets: | ||
- select: | ||
group: metallb.io | ||
kind: L2Advertisement | ||
name: swift | ||
fieldPaths: | ||
- spec.interfaces.0 | ||
options: | ||
create: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
apiVersion: metallb.io/v1beta1 | ||
kind: L2Advertisement | ||
metadata: | ||
name: swift | ||
namespace: metallb-system | ||
spec: | ||
ipAddressPools: | ||
- swift | ||
interfaces: | ||
- _replaced_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
apiVersion: metallb.io/v1beta1 | ||
kind: IPAddressPool | ||
metadata: | ||
namespace: metallb-system | ||
name: swift | ||
labels: | ||
osp/lb-addresses-type: standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
transformers: | ||
# Set namespace to OpenStack on all namespaced objects without a namespace | ||
- |- | ||
apiVersion: builtin | ||
kind: NamespaceTransformer | ||
metadata: | ||
name: _ignored_ | ||
namespace: openstack | ||
setRoleBindingSubjects: none | ||
unsetOnly: true | ||
fieldSpecs: | ||
- path: metadata/name | ||
kind: Namespace | ||
create: true | ||
resources: | ||
- ocp_networks_netattach.yaml | ||
|
||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.net-attach-def | ||
targets: | ||
- select: | ||
kind: NetworkAttachmentDefinition | ||
name: swift | ||
fieldPaths: | ||
- spec.config | ||
options: | ||
create: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
apiVersion: k8s.cni.cncf.io/v1 | ||
kind: NetworkAttachmentDefinition | ||
metadata: | ||
name: swift | ||
labels: | ||
osp/net: swift | ||
osp/net-attach-def-type: standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
patches: | ||
- target: | ||
kind: NetConfig | ||
patch: |- | ||
- op: add | ||
path: /spec/networks/- | ||
value: | ||
name: swift | ||
mtu: 1500 | ||
dnsDomain: _replaced_ | ||
subnets: | ||
- _replaced_ | ||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.dnsDomain | ||
targets: | ||
- select: | ||
kind: NetConfig | ||
fieldPaths: | ||
- spec.networks.[name=swift].dnsDomain | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.subnets | ||
targets: | ||
- select: | ||
kind: NetConfig | ||
fieldPaths: | ||
- spec.networks.[name=swift].subnets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
transformers: | ||
# Set namespace to OpenStack on all namespaced objects without a namespace | ||
- |- | ||
apiVersion: builtin | ||
kind: NamespaceTransformer | ||
metadata: | ||
name: _ignored_ | ||
namespace: openstack | ||
setRoleBindingSubjects: none | ||
unsetOnly: true | ||
fieldSpecs: | ||
- path: metadata/name | ||
kind: Namespace | ||
create: true | ||
components: | ||
- ../../../lib/nncp | ||
|
||
patches: | ||
- target: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-config-type=standard" | ||
patch: |- | ||
- op: add | ||
path: /spec/desiredState/interfaces/- | ||
value: | ||
description: swift vlan interface | ||
ipv4: | ||
address: | ||
- ip: _replaced_ | ||
prefix-length: _replaced_ | ||
enabled: true | ||
dhcp: false | ||
ipv6: | ||
enabled: false | ||
name: swift | ||
state: up | ||
type: vlan | ||
vlan: | ||
base-iface: _replaced_ | ||
id: _replaced_ | ||
mtu: 1500 | ||
replacements: | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.base_iface | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=swift].vlan.base-iface | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.vlan | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=swift].vlan.id | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.node_0.swift_ip | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-node=0" | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=swift].ipv4.address.0.ip | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.node_1.swift_ip | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-node=1" | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=swift].ipv4.address.0.ip | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.node_2.swift_ip | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-node=2" | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=swift].ipv4.address.0.ip | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.swift.prefix-length | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=swift].ipv4.address.0.prefix-length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
patches: | ||
- target: | ||
kind: OpenStackDataPlaneNodeSet | ||
patch: |- | ||
- op: add | ||
path: /spec/nodeTemplate/networks/- | ||
value: | ||
name: swift | ||
subnetName: subnet1 |