Merge "Use hostNetwork for ephemeral heat pod"
This commit is contained in:
commit
d53424b054
@ -5,6 +5,7 @@ metadata:
|
|||||||
app: {{ heat_pod_name }}
|
app: {{ heat_pod_name }}
|
||||||
name: {{ heat_pod_name }}
|
name: {{ heat_pod_name }}
|
||||||
spec:
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
- command:
|
- command:
|
||||||
- heat-engine
|
- heat-engine
|
||||||
@ -41,10 +42,6 @@ spec:
|
|||||||
- heat-api
|
- heat-api
|
||||||
- --config-file
|
- --config-file
|
||||||
- /etc/heat/heat.conf
|
- /etc/heat/heat.conf
|
||||||
ports:
|
|
||||||
- containerPort: {{ api_port }}
|
|
||||||
hostPort: {{ api_port }}
|
|
||||||
hostIP: {{ ctlplane_ip }}
|
|
||||||
env:
|
env:
|
||||||
- name: PATH
|
- name: PATH
|
||||||
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
@ -782,8 +782,6 @@ class HeatPodLauncher(HeatContainerLauncher):
|
|||||||
pod_vars = {
|
pod_vars = {
|
||||||
"install_dir": self.install_dir,
|
"install_dir": self.install_dir,
|
||||||
"heat_dir": self.heat_dir,
|
"heat_dir": self.heat_dir,
|
||||||
"ctlplane_ip": self.host,
|
|
||||||
"api_port": self.api_port,
|
|
||||||
"api_image": self.api_container_image,
|
"api_image": self.api_container_image,
|
||||||
"engine_image": self.engine_container_image,
|
"engine_image": self.engine_container_image,
|
||||||
"heat_pod_name": EPHEMERAL_HEAT_POD_NAME
|
"heat_pod_name": EPHEMERAL_HEAT_POD_NAME
|
||||||
|
@ -550,15 +550,11 @@ class TestHeatPodLauncher(base.TestCase):
|
|||||||
def test_write_heat_pod(self):
|
def test_write_heat_pod(self):
|
||||||
launcher = self.get_launcher()
|
launcher = self.get_launcher()
|
||||||
launcher.install_dir = 'install-dir'
|
launcher.install_dir = 'install-dir'
|
||||||
launcher.host = '1.1.1.1'
|
|
||||||
launcher.api_port = '1234'
|
|
||||||
launcher.api_container_image = 'api-image'
|
launcher.api_container_image = 'api-image'
|
||||||
launcher.engine_container_image = 'engine-image'
|
launcher.engine_container_image = 'engine-image'
|
||||||
launcher._write_heat_pod()
|
launcher._write_heat_pod()
|
||||||
with open(os.path.join(launcher.heat_dir, 'heat-pod.yaml')) as f:
|
with open(os.path.join(launcher.heat_dir, 'heat-pod.yaml')) as f:
|
||||||
pod = f.read()
|
pod = f.read()
|
||||||
self.assertIn('hostPort: 1234', pod)
|
|
||||||
self.assertIn('hostIP: 1.1.1.1', pod)
|
|
||||||
self.assertIn('image: api-image', pod)
|
self.assertIn('image: api-image', pod)
|
||||||
self.assertIn('image: engine-image', pod)
|
self.assertIn('image: engine-image', pod)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user