-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NFS network for Manila to uni04delta
Manila Tempest tests need to connect to the share for Ganesha via a special (openstack) network [1]. This patch adds the NFS storage network with VLAN 24 and range 172.21.0.0/24 in uni04delta. The NFS network is connected to Ceph and Compute EDPM nodes. A NNCP, NAD, L2Advertisement and IPAddressPool are defined for the NFS network so that a pod in k8s can connect to it; such as the tempest pod which will perform the storage tests and the manilaShares pod(s). [1] https://opendev.org/openstack/manila-tempest-plugin/src/branch/master/manila_tempest_tests/config.py#L99 Jira: https://issues.redhat.com/browse/OSPRH-7417 Depends-On: openstack-k8s-operators/ci-framework#2273 Signed-off-by: John Fulton <[email protected]>
- Loading branch information
Showing
15 changed files
with
348 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
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.nfs.lb_addresses | ||
targets: | ||
- select: | ||
group: metallb.io | ||
kind: IPAddressPool | ||
name: nfs | ||
fieldPaths: | ||
- spec.addresses | ||
options: | ||
create: true | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.iface | ||
targets: | ||
- select: | ||
group: metallb.io | ||
kind: L2Advertisement | ||
name: nfs | ||
fieldPaths: | ||
- spec.interfaces.0 | ||
options: | ||
create: true |
11 changes: 11 additions & 0 deletions
11
dt/uni04delta/networking/metallb/metallb_l2advertisement.yaml
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: nfs | ||
namespace: metallb-system | ||
spec: | ||
ipAddressPools: | ||
- nfs | ||
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: nfs | ||
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.nfs.net-attach-def | ||
targets: | ||
- select: | ||
kind: NetworkAttachmentDefinition | ||
name: nfs | ||
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: nfs | ||
labels: | ||
osp/net: nfs | ||
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,45 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
patches: | ||
- target: | ||
kind: NetConfig | ||
patch: |- | ||
- op: add | ||
path: /spec/networks/- | ||
value: | ||
name: nfs | ||
dnsDomain: _replaced_ | ||
mtu: _replaced_ | ||
subnets: | ||
- _replaced_ | ||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.dnsDomain | ||
targets: | ||
- select: | ||
kind: NetConfig | ||
fieldPaths: | ||
- spec.networks.[name=nfs].dnsDomain | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.mtu | ||
targets: | ||
- select: | ||
kind: NetConfig | ||
fieldPaths: | ||
- spec.networks.[name=nfs].mtu | ||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.subnets | ||
targets: | ||
- select: | ||
kind: NetConfig | ||
fieldPaths: | ||
- spec.networks.[name=nfs].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: nfs vlan interface | ||
ipv4: | ||
address: | ||
- ip: _replaced_ | ||
prefix-length: _replaced_ | ||
enabled: true | ||
dhcp: false | ||
ipv6: | ||
enabled: false | ||
name: nfs | ||
state: up | ||
type: vlan | ||
vlan: | ||
base-iface: _replaced_ | ||
id: _replaced_ | ||
mtu: 1500 | ||
replacements: | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.base_iface | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=nfs].vlan.base-iface | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.vlan | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=nfs].vlan.id | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.node_0.nfs_ip | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-node=0" | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=nfs].ipv4.address.0.ip | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.node_1.nfs_ip | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-node=1" | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=nfs].ipv4.address.0.ip | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.node_2.nfs_ip | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
labelSelector: "osp/nncm-node=2" | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=nfs].ipv4.address.0.ip | ||
|
||
- source: | ||
kind: ConfigMap | ||
name: network-values | ||
fieldPath: data.nfs.prefix-length | ||
targets: | ||
- select: | ||
kind: NodeNetworkConfigurationPolicy | ||
fieldPaths: | ||
- spec.desiredState.interfaces.[name=nfs].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,28 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
patches: | ||
- target: | ||
kind: OpenStackDataPlaneNodeSet | ||
patch: |- | ||
- op: add | ||
path: /spec/nodeTemplate/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 | ||
- op: add | ||
path: /spec/nodes/edpm-ceph-0/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 | ||
- op: add | ||
path: /spec/nodes/edpm-ceph-1/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 | ||
- op: add | ||
path: /spec/nodes/edpm-ceph-2/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 |
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,23 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
patches: | ||
- target: | ||
kind: OpenStackDataPlaneNodeSet | ||
patch: |- | ||
- op: add | ||
path: /spec/nodeTemplate/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 | ||
- op: add | ||
path: /spec/nodes/edpm-compute-0/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 | ||
- op: add | ||
path: /spec/nodes/edpm-compute-1/networks/- | ||
value: | ||
name: nfs | ||
subnetName: subnet1 |
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
Oops, something went wrong.