Define several containers per pod in a replication controller 89/57089/8
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Sat, 5 May 2018 10:13:28 +0000 (11:13 +0100)
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Thu, 14 Jun 2018 07:15:23 +0000 (07:15 +0000)
commit34292694f596561de9c78f0feb663ffa5de0dc2d
tree2460af044a7f541cc7e103ee542f59379a2d6c25
parent01edaefa20775921200a6a1b17fbfd67f7aca77e
Define several containers per pod in a replication controller

Add the ability to define not only one but many containers per pod in a
replication controller descriptor. This feature must be backwards
compatible; all current test cases using the "single container" server
definition must be accepted.

Example of single container pod definition:

  context:
    type: Kubernetes
    servers:
      host:
        image: ...
        commands: ...
        volumes:
          - name: volume1              # mandatory
            <volume type definition>   # mandatory

Example of several container pod definition:

  context:
    type: Kubernetes
    servers:
      host:
        containers:  # if this key is present, all container specific
                       parameters (image, commands, args, volumeMounts, etc.)
                       must be defined per container
          - image: ...
            commands: ...
          - image: ...
            commands: ...
        volumes:
          - name: volume1              # mandatory
            <volume type definition>   # mandatory

NOTE: other parameters, like "volumes" or "nodeSelector", are common to all
containers in the pod.

JIRA: YARDSTICK-1155

Change-Id: Ib95668c68e9c09e6de3f1aa41c903cc52e6809ad
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
yardstick/orchestrator/kubernetes.py
yardstick/tests/unit/orchestrator/test_kubernetes.py