diff options
author | Rex Lee <limingjiang@huawei.com> | 2017-09-26 08:19:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-26 08:19:13 +0000 |
commit | ceb2bd1a0a3266d3bb72adbbf5ddad8ec86e3128 (patch) | |
tree | caadf2930e25984c859a56815f09ab90645b2f3d /tests/unit/orchestrator | |
parent | 9ea225f671b774c6e373dbaab146d68cac16194e (diff) | |
parent | 0f4cf413a3c527ddf2eab3d724ae758e39af1aa0 (diff) |
Merge "Add nodeSelector to enable selecting the desired Kubernetes running node when creating containers for Kubernetes context"
Diffstat (limited to 'tests/unit/orchestrator')
-rw-r--r-- | tests/unit/orchestrator/test_kubernetes.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/orchestrator/test_kubernetes.py b/tests/unit/orchestrator/test_kubernetes.py index 51718ab86..1a3291c89 100644 --- a/tests/unit/orchestrator/test_kubernetes.py +++ b/tests/unit/orchestrator/test_kubernetes.py @@ -62,7 +62,10 @@ service ssh restart;while true ; do sleep 10000; done" }, "name": "k8s-86096c30-key" } - ] + ], + "nodeSelector": { + "kubernetes.io/hostname": "node-01" + } } } } @@ -71,7 +74,8 @@ service ssh restart;while true ; do sleep 10000; done" 'command': '/bin/bash', 'args': ['-c', 'chmod 700 ~/.ssh; chmod 600 ~/.ssh/*; \ service ssh restart;while true ; do sleep 10000; done'], - 'ssh_key': 'k8s-86096c30-key' + 'ssh_key': 'k8s-86096c30-key', + 'nodeSelector': { 'kubernetes.io/hostname': 'node-01'} } name = 'host-k8s-86096c30' output_r = KubernetesObject(name, **input_s).get_template() |