mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
Support for External LB as Tech Preview
This commit is contained in:
committed by
Emilien Macchi
parent
c8c5d5973c
commit
625932f5c3
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
baseDomain: shiftstack.example.com
|
||||
controlPlane:
|
||||
hyperthreading: Enabled
|
||||
architecture: amd64
|
||||
name: master
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
compute:
|
||||
- name: worker
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
metadata:
|
||||
name: manifests1
|
||||
networking:
|
||||
clusterNetwork:
|
||||
- cidr: 10.128.0.0/14
|
||||
hostPrefix: 23
|
||||
machineNetwork:
|
||||
- cidr: 10.0.128.0/17
|
||||
networkType: OVNKubernetes
|
||||
serviceNetwork:
|
||||
- 172.30.0.0/16
|
||||
platform:
|
||||
openstack:
|
||||
cloud: ${OS_CLOUD}
|
||||
pullSecret: ${PULL_SECRET}
|
||||
27
scripts/openstack/manifest-tests/default-stable-lb/test_cluster-infra.py
Executable file
27
scripts/openstack/manifest-tests/default-stable-lb/test_cluster-infra.py
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import yaml
|
||||
|
||||
ASSETS_DIR = ""
|
||||
|
||||
class TestClusterInfraObject(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Parse the Cluster Infrastructure object into a Python data structure."""
|
||||
self.machines = []
|
||||
cluster_infra = f'{ASSETS_DIR}/manifests/cluster-infrastructure-02-config.yml'
|
||||
with open(cluster_infra) as f:
|
||||
self.cluster_infra = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
def test_load_balancer(self):
|
||||
"""Assert that the Cluster infrastructure object does not contain the LoadBalancer configuration."""
|
||||
self.assertNotIn("loadBalancer", self.cluster_infra["status"]["platformStatus"]["openstack"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ASSETS_DIR = sys.argv.pop()
|
||||
unittest.main(verbosity=2)
|
||||
@@ -0,0 +1,32 @@
|
||||
apiVersion: v1
|
||||
baseDomain: shiftstack.example.com
|
||||
controlPlane:
|
||||
hyperthreading: Enabled
|
||||
architecture: amd64
|
||||
name: master
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
compute:
|
||||
- name: worker
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
metadata:
|
||||
name: manifests1
|
||||
networking:
|
||||
clusterNetwork:
|
||||
- cidr: 10.128.0.0/14
|
||||
hostPrefix: 23
|
||||
machineNetwork:
|
||||
- cidr: 10.0.128.0/17
|
||||
networkType: OVNKubernetes
|
||||
serviceNetwork:
|
||||
- 172.30.0.0/16
|
||||
platform:
|
||||
openstack:
|
||||
cloud: ${OS_CLOUD}
|
||||
featureSet: TechPreviewNoUpgrade
|
||||
pullSecret: ${PULL_SECRET}
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import yaml
|
||||
|
||||
ASSETS_DIR = ""
|
||||
|
||||
class TestClusterInfraObject(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Parse the Cluster Infrastructure object into a Python data structure."""
|
||||
self.machines = []
|
||||
cluster_infra = f'{ASSETS_DIR}/manifests/cluster-infrastructure-02-config.yml'
|
||||
with open(cluster_infra) as f:
|
||||
self.cluster_infra = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
def test_load_balancer(self):
|
||||
"""Assert that the Cluster infrastructure object does not contain the LoadBalancer configuration."""
|
||||
self.assertNotIn("loadBalancer", self.cluster_infra["status"]["platformStatus"]["openstack"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ASSETS_DIR = sys.argv.pop()
|
||||
unittest.main(verbosity=2)
|
||||
@@ -0,0 +1,34 @@
|
||||
apiVersion: v1
|
||||
baseDomain: shiftstack.example.com
|
||||
controlPlane:
|
||||
hyperthreading: Enabled
|
||||
architecture: amd64
|
||||
name: master
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
compute:
|
||||
- name: worker
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
metadata:
|
||||
name: manifests1
|
||||
networking:
|
||||
clusterNetwork:
|
||||
- cidr: 10.128.0.0/14
|
||||
hostPrefix: 23
|
||||
machineNetwork:
|
||||
- cidr: 10.0.128.0/17
|
||||
networkType: OVNKubernetes
|
||||
serviceNetwork:
|
||||
- 172.30.0.0/16
|
||||
platform:
|
||||
openstack:
|
||||
cloud: ${OS_CLOUD}
|
||||
loadBalancer:
|
||||
type: OpenShiftManagedDefault
|
||||
featureSet: TechPreviewNoUpgrade
|
||||
pullSecret: ${PULL_SECRET}
|
||||
32
scripts/openstack/manifest-tests/openshift-managed-lb/test_cluster-infra.py
Executable file
32
scripts/openstack/manifest-tests/openshift-managed-lb/test_cluster-infra.py
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import yaml
|
||||
|
||||
ASSETS_DIR = ""
|
||||
|
||||
class TestClusterInfraObject(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Parse the Cluster Infrastructure object into a Python data structure."""
|
||||
self.machines = []
|
||||
cluster_infra = f'{ASSETS_DIR}/manifests/cluster-infrastructure-02-config.yml'
|
||||
with open(cluster_infra) as f:
|
||||
self.cluster_infra = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
def test_load_balancer(self):
|
||||
"""Assert that the Cluster infrastructure object contains the LoadBalancer configuration."""
|
||||
self.assertIn("loadBalancer", self.cluster_infra["status"]["platformStatus"]["openstack"])
|
||||
|
||||
loadBalancer = self.cluster_infra["status"]["platformStatus"]["openstack"]["loadBalancer"]
|
||||
|
||||
self.assertIn("type", loadBalancer)
|
||||
self.assertEqual("OpenShiftManagedDefault", loadBalancer["type"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ASSETS_DIR = sys.argv.pop()
|
||||
unittest.main(verbosity=2)
|
||||
@@ -0,0 +1,34 @@
|
||||
apiVersion: v1
|
||||
baseDomain: shiftstack.example.com
|
||||
controlPlane:
|
||||
hyperthreading: Enabled
|
||||
architecture: amd64
|
||||
name: master
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
compute:
|
||||
- name: worker
|
||||
platform:
|
||||
openstack:
|
||||
type: ${COMPUTE_FLAVOR}
|
||||
replicas: 3
|
||||
metadata:
|
||||
name: manifests1
|
||||
networking:
|
||||
clusterNetwork:
|
||||
- cidr: 10.128.0.0/14
|
||||
hostPrefix: 23
|
||||
machineNetwork:
|
||||
- cidr: 10.0.128.0/17
|
||||
networkType: OVNKubernetes
|
||||
serviceNetwork:
|
||||
- 172.30.0.0/16
|
||||
platform:
|
||||
openstack:
|
||||
cloud: ${OS_CLOUD}
|
||||
loadBalancer:
|
||||
type: UserManaged
|
||||
featureSet: TechPreviewNoUpgrade
|
||||
pullSecret: ${PULL_SECRET}
|
||||
32
scripts/openstack/manifest-tests/user-managed-lb/test_cluster-infra.py
Executable file
32
scripts/openstack/manifest-tests/user-managed-lb/test_cluster-infra.py
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import yaml
|
||||
|
||||
ASSETS_DIR = ""
|
||||
|
||||
class TestClusterInfraObject(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Parse the Cluster Infrastructure object into a Python data structure."""
|
||||
self.machines = []
|
||||
cluster_infra = f'{ASSETS_DIR}/manifests/cluster-infrastructure-02-config.yml'
|
||||
with open(cluster_infra) as f:
|
||||
self.cluster_infra = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
def test_load_balancer(self):
|
||||
"""Assert that the Cluster infrastructure object contains the LoadBalancer configuration."""
|
||||
self.assertIn("loadBalancer", self.cluster_infra["status"]["platformStatus"]["openstack"])
|
||||
|
||||
loadBalancer = self.cluster_infra["status"]["platformStatus"]["openstack"]["loadBalancer"]
|
||||
|
||||
self.assertIn("type", loadBalancer)
|
||||
self.assertEqual("UserManaged", loadBalancer["type"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ASSETS_DIR = sys.argv.pop()
|
||||
unittest.main(verbosity=2)
|
||||
Reference in New Issue
Block a user