k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/huge-service/modules/service.yaml (about)

     1  {{$endpoints := .endpoints}}
     2  {{$statefulsetEndpoints := .statefulsetEndpoints}}
     3  {{$isHeadless := .isHeadless}}
     4  {{$serviceName := .serviceName}}
     5  
     6  ## CL2 params
     7  {{$CHECK_IF_PODS_ARE_UPDATED := DefaultParam .CL2_CHECK_IF_PODS_ARE_UPDATED true}}
     8  {{$ENABLE_LARGE_STATEFULSET := DefaultParam .CL2_ENABLE_LARGE_STATEFULSET false}}
     9  
    10  steps:
    11  {{if $ENABLE_LARGE_STATEFULSET}}
    12  - module:
    13      path: modules/statefulset.yaml
    14      params:
    15        action: "create"
    16        replicasPerNamespace: 1
    17        endpoints: {{$statefulsetEndpoints}}
    18        serviceName: {{$serviceName}}-statefulset
    19  {{end}}
    20  
    21  - name: Create {{$serviceName}}
    22    phases:
    23    - namespaceRange:
    24        min: 1
    25        max: 1
    26      replicasPerNamespace: 1
    27      tuningSet: Sequence
    28      objectBundle:
    29      - basename: {{$serviceName}}
    30        objectTemplatePath: service.yaml
    31        templateFillMap:
    32          HeadlessService: {{$isHeadless}}
    33  - name: Creating {{$serviceName}} measurements
    34    measurements:
    35    - Identifier: WaitForHugeServiceDeployments
    36      Method: WaitForControlledPodsRunning
    37      Params:
    38        action: start
    39        apiVersion: apps/v1
    40        checkIfPodsAreUpdated: {{$CHECK_IF_PODS_ARE_UPDATED}}
    41        kind: Deployment
    42        labelSelector: group = {{$serviceName}}
    43        operationTimeout: 30m
    44  - name: Creating {{$serviceName}} pods
    45    phases:
    46    - namespaceRange:
    47        min: 1
    48        max: 1
    49      replicasPerNamespace: 1
    50      tuningSet: Sequence
    51      objectBundle:
    52      - basename: huge-service-deployment
    53        objectTemplatePath: simple-deployment.yaml
    54        templateFillMap:
    55          Replicas: {{$endpoints}}
    56          EnvVar: a
    57          Group: huge-service
    58          CpuRequest: 1m
    59          MemoryRequest: 10M
    60          SvcName: {{$serviceName}}
    61  - name: Waiting for {{$serviceName}} pods to be created
    62    measurements:
    63    - Identifier: WaitForHugeServiceDeployments
    64      Method: WaitForControlledPodsRunning
    65      Params:
    66        action: gather
    67  
    68  - module:
    69      path: ../load/modules/dns-k8s-hostnames.yaml
    70  
    71  - name: Updating {{$serviceName}} pods
    72    phases:
    73    - namespaceRange:
    74        min: 1
    75        max: 1
    76      replicasPerNamespace: 1
    77      tuningSet: Sequence
    78      objectBundle:
    79      - basename: huge-service-deployment
    80        objectTemplatePath: simple-deployment.yaml
    81        templateFillMap:
    82          Replicas: {{$endpoints}}
    83          EnvVar: b
    84          Group: huge-service
    85          CpuRequest: 1m
    86          MemoryRequest: 10M
    87          SvcName: {{$serviceName}}
    88  - name: Waiting for {{$serviceName}} pods to be updated
    89    measurements:
    90    - Identifier: WaitForHugeServiceDeployments
    91      Method: WaitForControlledPodsRunning
    92      Params:
    93        action: gather
    94  
    95  {{if $ENABLE_LARGE_STATEFULSET}}
    96  - module:
    97      path: modules/statefulset.yaml
    98      params:
    99        action: "delete"
   100        replicasPerNamespace: 0
   101        serviceName: {{$serviceName}}-statefulset
   102  {{end}}      
   103  
   104  - name: Deleting {{$serviceName}} pods
   105    phases:
   106    - namespaceRange:
   107        min: 1
   108        max: 1
   109      replicasPerNamespace: 0
   110      tuningSet: Sequence
   111      objectBundle:
   112      - basename: huge-service-deployment
   113        objectTemplatePath: simple-deployment.yaml
   114        templateFillMap:
   115          Replicas: {{$endpoints}}
   116          Group: {{$serviceName}}
   117          CpuRequest: 1m
   118          MemoryRequest: 10M
   119          SvcName: {{$serviceName}}
   120  - name: Waiting for {{$serviceName}} pods to be deleted
   121    measurements:
   122    - Identifier: WaitForHugeServiceDeployments
   123      Method: WaitForControlledPodsRunning
   124      Params:
   125        action: gather
   126  - name: Delete {{$serviceName}}
   127    phases:
   128    - namespaceRange:
   129        min: 1
   130        max: 1
   131      replicasPerNamespace: 0
   132      tuningSet: Sequence
   133      objectBundle:
   134      - basename: {{$serviceName}}
   135        objectTemplatePath: service.yaml
   136        templateFillMap:
   137          HeadlessService: {{$isHeadless}}