aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/kubernetes_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-07-31Merge "Check for network already created k8"Emma Foley1-1/+21
2018-07-25kubernetes_utils: avoid 404 error code in delete_config_map()Mytnyk, Volodymyr1-4/+9
JIRA: YARDSTICK-1318 Change-Id: I0c04bd2928d5a4166b483f0c4f9f75fa9e5e00d2 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-25kubernetes_utils: avoid 404 error code in delete_replication_controller()Mytnyk, Volodymyr1-4/+9
JIRA: YARDSTICK-1319 Change-Id: I8370c5ef4e43e58a8bb9c3aac60a089b0981dda0 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-24kubernetes_utils: avoid 404 error code in delete_network()Mytnyk, Volodymyr1-4/+8
JIRA: YARDSTICK-1316 Change-Id: I792c873b42aba80be62ff7a93f6d02ea89e42356 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-23Merge "kubernetes_utils: avoid 404 error code in ↵Rodolfo Alonso Hernandez1-4/+8
delete_custom_resource_definition()"
2018-07-20kubernetes_utils: avoid 404 error code in delete_custom_resource_definition()Mytnyk, Volodymyr1-4/+8
JIRA: YARDSTICK-1317 Change-Id: I2dc924334199761d63dce9aebe9ce200ca0fddf8 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-20Check for network already created k8John O Loughlin1-1/+21
When creating a network the host should be checked to see if the network is already created. If the required network is already there it should be used. JIRA: YARDSTICK-1315 Change-Id: I09b114a728364ee56397af70cc48f1b7904f06cc Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-19kubernetes_utils: avoid 404 error code in delete_service()Mytnyk, Volodymyr1-5/+8
JIRA: YARDSTICK-1321 Change-Id: Id0f3a5d93f11674fd3908a7f5cf7214afcfa3600 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-18kubernetes_utils: avoid 404 error code in delete_pod()Mytnyk, Volodymyr1-3/+8
JIRA: YARDSTICK-1320 Change-Id: I5b762d4732440008630093e1d0952f7e41a8a191 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-06-14Add new Kubernetes resource kind: "Network"Rodolfo Alonso Hernandez1-0/+47
Add a new Kubernetes resource kind: "Network" [1] [2] Kubernetes network plugins (alpha definition): [3] Network definition example in Kubernetes: apiVersion: "kubernetes.com/v1" kind: Network metadata: name: flannel plugin: flannel args: '[ {delegate": {"isDefaultGateway": true}} ]' Proposed Kubernetes context network definition: context: networks: - name: flannel plugin: flannel args: (string) - name: sriov_upload plugin: sriov args: (string) [1]https://builders.intel.com/docs/networkbuilders/multiple-network-interfaces-in-kubernetes-application-note.pdf [2]http://cdn.opensourcecloud.cn/zt/k8s/01.pdf [3]https://kubernetes.io/docs/concepts/cluster-administration/network-plugins/ JIRA: YARDSTICK-1160 Change-Id: I71a49ac14e3d28ded91d2ed3cd9cc527e40303f7 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add new Kubernetes resource kind: "CustomResourceDefinition"Rodolfo Alonso Hernandez1-3/+36
Custom resource definition example in Kubernetes: apiVersion: "apiextensions.k8s.io/v1beta" kind: CustomResourceDefinition metadata: name: networks.kubernetes.com spec: group: kubernetes.com version: v1 scope: Namespaced names: plural: networks singular: network kind: Network Proposed Kubernetes context network definition: context: custom_resources:     - name: network        # name of the resource (singular)       version: v1          # optional, "v1" by default       scope: Namespaced    # optional, "Namespaced" by default From this definition, we will extract the Kubernetes parameters: - metadata.name: custom_resources.name + "s" + context_name + ".com" - spec.group: context_name + ".com" - spec.scope: custom_resources.scope - spec.version: custom_resources.version - spec.names.plural: custom_resources.name + "s" - spec.names.singular: custom_resources.name - spec.names.kind: custom_resources.name with first capital letter [1] https://kubernetes.io/docs/concepts/api-extension/custom-resources/ JIRA: YARDSTICK-1163 Change-Id: If8980dc3f6ddf9c6949bf15be8011aa98482ddc9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add "volumes" parameter in Kubernetes contextRodolfo Alonso Hernandez1-0/+6
This new parameter, "volumes", will allow the user to automatically create new volumes. Example of Kubernetes context definition: context: type: Kubernetes servers: host: image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory The volume type and the definition must be one of the supported ones in Kubernetes [1]. [1] https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes JIRA: YARDSTICK-1152 Change-Id: I44a91c605f047de4f286407e28fb5aa2e921b00a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-09Kubernetes API "delete_service" missing parameterRodolfo Alonso Hernandez1-4/+9
Kubernetes method "delete_service" calls core API function "delete_namespaced_service". The parameter "body" [1] is missing:     :param V1DeleteOptions body: (required) [1] https://github.com/kubernetes-client/python/blob/6.0.0/kubernetes/client/apis/core_v1_api.py JIRA: YARDSTICK-1154 Change-Id: I40bca2af0f5359eaa788d3b81d82897a770329f0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-09-21Add service in kubernetes contextchenjiankun1-0/+59
JIRA: YARDSTICK-803 Currently kubernetes test case can only run in master node. We need to support it run in jump server. So I add service and use nodePort type. Then we can login the pod using nodePort. Change-Id: Ia7900d263f1c5323f132435addec27ad10547ef9 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-17Kubernetes (k8s) supportchenjiankun1-0/+137
JIRA: YARDSTICK-682 We decide to support k8s in E release. We need to discuss with openretriver team and then rewrite the ping test case under k8s as the first step. Change-Id: I3f81ebca8de5c1f3a8b7d42581cd7342dc320239 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>