From bfd8f60736cda10ad6230f32bc767642c0eafee7 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Sat, 25 Jan 2025 18:48:01 -0500 Subject: [PATCH 01/95] - adjusted ccnp and cnp policies - made repeats available for user input - added additional cilium metrics - changed stage name --- .../slo/config/ccnp_template.yaml | 5 +- .../slo/config/cnp_template.yaml | 10 +- .../config/modules/cilium-measurements.yaml | 108 ++++++++++++++++++ modules/python/clusterloader2/slo/slo.py | 4 +- .../CNI Benchmark/cnp-ccnp-feature.yml | 5 +- steps/engine/clusterloader2/slo/collect.yml | 2 +- steps/engine/clusterloader2/slo/execute.yml | 2 +- 7 files changed, 122 insertions(+), 14 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/ccnp_template.yaml b/modules/python/clusterloader2/slo/config/ccnp_template.yaml index 0c394d0c26..d46edac450 100644 --- a/modules/python/clusterloader2/slo/config/ccnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/ccnp_template.yaml @@ -7,9 +7,8 @@ spec: matchLabels: group: cnp-ccnp ingressDeny: - - fromEndpoints: - - matchLabels: - io.kubernetes.pod.namespace: default + - fromEntities: + - host egress: - toPorts: - ports: diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index ec1613ccff..8f9919f915 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -8,13 +8,13 @@ spec: matchLabels: group: cnp-ccnp ingressDeny: - - fromEndpoints: - - matchLabels: - io.kubernetes.pod.namespace: default + - fromEntities: + - host + - world egress: - toPorts: - ports: - port: "443" protocol: TCP - toCIDR: - - 0.0.0.0/0 \ No newline at end of file + toEntities: + - cluster \ No newline at end of file diff --git a/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml b/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml index 8c9278c614..0137b04892 100644 --- a/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml +++ b/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml @@ -180,3 +180,111 @@ steps: - name: Perc50 query: quantile(0.5, avg_over_time(cilium_operator_process_resident_memory_bytes[%v:]) / 1024 / 1024) + - Identifier: AvgCiliumBPFMapPressure + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Avg Cilium BPF Map Pressure + metricVersion: v1 + unit: ratio + dimensions: + - map_name + enableViolations: true + queries: + - name: avg bpf map pressure over time + query: avg(avg_over_time(cilium_bpf_map_pressure[%v:])) by (map_name) + - Identifier: MaxCiliumBPFMapPressure + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Max Cilium BPF Map Pressure + metricVersion: v1 + unit: ratio + dimensions: + - map_name + enableViolations: true + queries: + - name: max bpf map pressure over time + query: max(max_over_time(cilium_bpf_map_pressure[%v:])) by (map_name) + - Identifier: MaxCiliumPoliciesLoadedCount + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Max number of Cilium Policies Loaded + metricVersion: v1 + unit: policies + enableViolations: true + queries: + - name: max number of cilium policies loaded over time + query: max(max_over_time(cilium_policy[%v:])) + - Identifier: AvgCiliumPoliciesLoadedCount + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Avg number of Cilium Policies Loaded + metricVersion: v1 + unit: policies + enableViolations: true + queries: + - name: avg number of cilium policies loaded over time + query: avg(avg_over_time(cilium_policy[%v:])) + - Identifier: CiliumBPFMapsAvgMemoryUsage + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Cilium BPF Maps Avg Memory Usage + metricVersion: v1 + unit: MB + enableViolations: true + queries: + - name: Perc99 + query: quantile(0.99, avg_over_time(cilium_bpf_maps_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc90 + query: quantile(0.90, avg_over_time(cilium_bpf_maps_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc50 + query: quantile(0.50, avg_over_time(cilium_bpf_maps_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - Identifier: CiliumBPFMapsMaxMemoryUsage + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Cilium BPF Maps Max Memory Usage + metricVersion: v1 + unit: MB + enableViolations: true + queries: + - name: Perc99 + query: quantile(0.99, max_over_time(cilium_bpf_maps_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc90 + query: quantile(0.90, max_over_time(cilium_bpf_maps_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc50 + query: quantile(0.50, max_over_time(cilium_bpf_maps_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - Identifier: CiliumBPFProgramsAvgMemoryUsage + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Cilium BPF Programs Avg Memory Usage + metricVersion: v1 + unit: MB + enableViolations: true + queries: + - name: Perc99 + query: quantile(0.99, avg_over_time(cilium_bpf_progs_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc90 + query: quantile(0.90, avg_over_time(cilium_bpf_progs_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc50 + query: quantile(0.50, avg_over_time(cilium_bpf_progs_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - Identifier: CiliumBPFProgramsMaxMemoryUsage + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Cilium BPF Programs Max Memory Usage + metricVersion: v1 + unit: MB + enableViolations: true + queries: + - name: Perc99 + query: quantile(0.99, max_over_time(cilium_bpf_progs_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc90 + query: quantile(0.90, max_over_time(cilium_bpf_progs_virtual_memory_max_bytes[%v:]) / 1024 / 1024) + - name: Perc50 + query: quantile(0.50, max_over_time(cilium_bpf_progs_virtual_memory_max_bytes[%v:]) / 1024 / 1024) diff --git a/modules/python/clusterloader2/slo/slo.py b/modules/python/clusterloader2/slo/slo.py index 76392d3340..f1ebcfa5d0 100644 --- a/modules/python/clusterloader2/slo/slo.py +++ b/modules/python/clusterloader2/slo/slo.py @@ -220,7 +220,7 @@ def main(): parser_configure.add_argument("node_count", type=int, help="Number of nodes") parser_configure.add_argument("node_per_step", type=int, help="Number of nodes per scaling step") parser_configure.add_argument("max_pods", type=int, nargs='?', default=0, help="Maximum number of pods per node") - parser_configure.add_argument("repeats", type=int, help="Number of times to repeat the deployment churn") + parser_configure.add_argument("repeats", type=int, nargs='?', default=1, help="Number of times to repeat the deployment churn") parser_configure.add_argument("operation_timeout", type=str, help="Timeout before failing the scale up test") parser_configure.add_argument("provider", type=str, help="Cloud provider name") parser_configure.add_argument("cilium_enabled", type=eval, choices=[True, False], default=False, @@ -256,7 +256,7 @@ def main(): parser_collect.add_argument("cpu_per_node", type=int, help="CPU per node") parser_collect.add_argument("node_count", type=int, help="Number of nodes") parser_collect.add_argument("max_pods", type=int, nargs='?', default=0, help="Maximum number of pods per node") - parser_collect.add_argument("repeats", type=int, help="Number of times to repeat the deployment churn") + parser_collect.add_argument("repeats", type=int, nargs='?', default=1, help="Number of times to repeat the deployment churn") parser_collect.add_argument("cl2_report_dir", type=str, help="Path to the CL2 report directory") parser_collect.add_argument("cloud_info", type=str, help="Cloud information") parser_collect.add_argument("run_id", type=str, help="Run ID") diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml index 5e495b7433..cfcbe7c6c7 100644 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml @@ -3,10 +3,11 @@ trigger: none variables: SCENARIO_TYPE: perf-eval SCENARIO_NAME: cnp-ccnp-feature + SCENARIO_VERSION: additionstoccnp-cnpPipeline OWNER: aks stages: - - stage: azure_eastus2 + - stage: azure_cnp_ccnp dependsOn: [] jobs: - template: /jobs/competitive-test.yml @@ -24,7 +25,7 @@ stages: node_count: $(NODES) node_per_step: $(STEP_NODES) max_pods: $(MAX_PODS_IN_NODE) - repeats: 1 + repeats: $(NUM_REPEATS) scale_timeout: "15m" cilium_enabled: True network_policy: cilium diff --git a/steps/engine/clusterloader2/slo/collect.yml b/steps/engine/clusterloader2/slo/collect.yml index 569f4467ca..6dc6d0a65c 100644 --- a/steps/engine/clusterloader2/slo/collect.yml +++ b/steps/engine/clusterloader2/slo/collect.yml @@ -17,7 +17,7 @@ steps: PYTHONPATH=$PYTHONPATH:$(pwd) python3 $PYTHON_SCRIPT_FILE collect \ $CPU_PER_NODE $NODE_COUNT ${MAX_PODS:-0} \ - $REPEATS $CL2_REPORT_DIR "$CLOUD_INFO" $RUN_ID $RUN_URL $SERVICE_TEST ${CNP_TEST:-False} \ + ${REPEATS:-1} $CL2_REPORT_DIR "$CLOUD_INFO" $RUN_ID $RUN_URL $SERVICE_TEST ${CNP_TEST:-False} \ ${CCNP_TEST:-False} ${NUM_CNPS:-0} ${NUM_CCNPS:-0} ${DUALSTACK:-False} $TEST_RESULTS_FILE \ $TEST_TYPE $SLO_START_TIME workingDirectory: modules/python/clusterloader2 diff --git a/steps/engine/clusterloader2/slo/execute.yml b/steps/engine/clusterloader2/slo/execute.yml index f45bb458af..3fb1818c96 100644 --- a/steps/engine/clusterloader2/slo/execute.yml +++ b/steps/engine/clusterloader2/slo/execute.yml @@ -21,7 +21,7 @@ steps: PYTHONPATH=$PYTHONPATH:$(pwd) python3 $PYTHON_SCRIPT_FILE configure \ $CPU_PER_NODE $NODE_COUNT $NODE_PER_STEP ${MAX_PODS:-0} \ - $REPEATS $SCALE_TIMEOUT $CLOUD $CILIUM_ENABLED \ + ${REPEATS:-1} $SCALE_TIMEOUT $CLOUD $CILIUM_ENABLED \ $SERVICE_TEST ${CNP_TEST:-False} ${CCNP_TEST:-False} ${NUM_CNPS:-0} ${NUM_CCNPS:-0} ${DUALSTACK:-False} ${CL2_CONFIG_DIR}/overrides.yaml PYTHONPATH=$PYTHONPATH:$(pwd) python3 $PYTHON_SCRIPT_FILE execute \ ${CL2_IMAGE} ${CL2_CONFIG_DIR} $CL2_REPORT_DIR $CL2_CONFIG_FILE \ From 2a2067bda16895edb06826f83e6e55bbcb4bcc93 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 31 Jan 2025 11:59:03 -0500 Subject: [PATCH 02/95] changed scenario version back to main --- pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml index cfcbe7c6c7..1b3a235620 100644 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml @@ -3,7 +3,7 @@ trigger: none variables: SCENARIO_TYPE: perf-eval SCENARIO_NAME: cnp-ccnp-feature - SCENARIO_VERSION: additionstoccnp-cnpPipeline + SCENARIO_VERSION: main OWNER: aks stages: From 29216b648cebae4626bd921385fd71c7819ae590 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Sun, 2 Feb 2025 17:47:36 -0500 Subject: [PATCH 03/95] fixed templates --- .../slo/config/ccnp_template.yaml | 23 ++++++++++++++---- .../slo/config/cnp_template.yaml | 24 +++++++++++++++---- .../CNI Benchmark/cnp-ccnp-feature.yml | 2 +- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/ccnp_template.yaml b/modules/python/clusterloader2/slo/config/ccnp_template.yaml index d46edac450..48b1fab762 100644 --- a/modules/python/clusterloader2/slo/config/ccnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/ccnp_template.yaml @@ -1,18 +1,31 @@ apiVersion: cilium.io/v2 kind: CiliumClusterwideNetworkPolicy metadata: - name: {{.basename}} + name: ccnp spec: endpointSelector: matchLabels: group: cnp-ccnp + ingress: + - icmps: + - fields: + - type: 8 + family: IPv4 + - type: 128 + family: IPv6 ingressDeny: - - fromEntities: - - host + - fromEntities: + - world egress: + - icmps: + - fields: + - type: 8 + family: IPv4 + - type: 128 + family: IPv6 - toPorts: - ports: - - port: "53" - protocol: UDP + - port: "443" + protocol: ANY toEntities: - cluster \ No newline at end of file diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 8f9919f915..c5b9f79a75 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,20 +1,36 @@ apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: - name: {{.basename}} + name: cnp namespace: slo-1 # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns spec: endpointSelector: matchLabels: group: cnp-ccnp + ingress: + - icmps: + - fields: + - type: 8 + family: IPv4 + - type: 128 + family: IPv6 ingressDeny: - - fromEntities: - - host - - world + - fromEntities: + - all egress: + - icmps: + - fields: + - type: 8 + family: IPv4 + - type: 128 + family: IPv6 + toEntities: + - cluster - toPorts: - ports: - port: "443" protocol: TCP + - port: "53" + protocol: UDP toEntities: - cluster \ No newline at end of file diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml index 1b3a235620..94dcd150d5 100644 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml @@ -2,7 +2,7 @@ trigger: none variables: SCENARIO_TYPE: perf-eval - SCENARIO_NAME: cnp-ccnp-feature + SCENARIO_NAME: additionstoccnp-cnpPipeline SCENARIO_VERSION: main OWNER: aks From aa5291df0000cfc136315e9b7f93bfe7e645c75c Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Sun, 2 Feb 2025 17:49:10 -0500 Subject: [PATCH 04/95] fix --- pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml index 94dcd150d5..cfcbe7c6c7 100644 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml @@ -2,8 +2,8 @@ trigger: none variables: SCENARIO_TYPE: perf-eval - SCENARIO_NAME: additionstoccnp-cnpPipeline - SCENARIO_VERSION: main + SCENARIO_NAME: cnp-ccnp-feature + SCENARIO_VERSION: additionstoccnp-cnpPipeline OWNER: aks stages: From 446218fd0ea82d2b988dacc69e263f40f3e6d350 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Sun, 2 Feb 2025 17:52:44 -0500 Subject: [PATCH 05/95] temp keeping cluster scaled --- .../slo/config/ccnp_template.yaml | 2 +- .../slo/config/cnp_template.yaml | 2 +- .../slo/config/load-config.yaml | 138 +++++++++--------- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/ccnp_template.yaml b/modules/python/clusterloader2/slo/config/ccnp_template.yaml index 48b1fab762..695d8dc0e1 100644 --- a/modules/python/clusterloader2/slo/config/ccnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/ccnp_template.yaml @@ -1,7 +1,7 @@ apiVersion: cilium.io/v2 kind: CiliumClusterwideNetworkPolicy metadata: - name: ccnp + name: {{.basename}} spec: endpointSelector: matchLabels: diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index c5b9f79a75..34cffda48a 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,7 +1,7 @@ apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: - name: cnp + name: {{.basename}} namespace: slo-1 # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns spec: endpointSelector: diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 6d97ec8761..e33544b5d7 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -140,75 +140,75 @@ steps: Group: {{$groupName}} deploymentLabel: start - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart - - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart + +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# ccnps: 0 +# {{end}} + {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From 041db951ac9ec1713bd4c78ab4db0904d447fd73 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Sun, 2 Feb 2025 18:00:52 -0500 Subject: [PATCH 06/95] end label --- modules/python/clusterloader2/slo/config/load-config.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index e33544b5d7..a93fc70ce2 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -138,7 +138,9 @@ steps: CpuRequest: {{$latencyPodCpu}}m MemoryRequest: {{$latencyPodMemory}}M Group: {{$groupName}} - deploymentLabel: start + deploymentLabel: start + {{end}} + # - module: # path: /modules/reconcile-objects.yaml @@ -208,7 +210,7 @@ steps: # namespaces: {{$namespaces}} # ccnps: 0 # {{end}} - {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From 21aee10eb7dedd19aaea08c188901fe26d2cb0c3 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 3 Feb 2025 15:40:21 -0500 Subject: [PATCH 07/95] removed extra end --- modules/python/clusterloader2/slo/config/load-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index a93fc70ce2..183a32e9e5 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -139,7 +139,7 @@ steps: MemoryRequest: {{$latencyPodMemory}}M Group: {{$groupName}} deploymentLabel: start - {{end}} + # - module: From 808b8b620f3555c9663d4bbe76528bcff0dad528 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 3 Feb 2025 17:09:39 -0500 Subject: [PATCH 08/95] skip scaling down --- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 94d456b8a3100dd8b77dc4a2be8a5acb1267fce5 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 3 Feb 2025 19:59:34 -0500 Subject: [PATCH 09/95] changed deletion of ns to false temp --- modules/python/clusterloader2/slo/config/load-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 183a32e9e5..c58e9af0d8 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -50,8 +50,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: From 399183f4ccd60a9b61bf33c28124bc50a9b276a7 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 3 Feb 2025 20:23:16 -0500 Subject: [PATCH 10/95] dont cleanup resources --- jobs/competitive-test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} From f2875fd5b7529133f9fe4218c84c70aaf65fc407 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 4 Feb 2025 11:55:40 -0500 Subject: [PATCH 11/95] adjusted deployment numbers --- modules/python/clusterloader2/slo/config/load-config.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index c58e9af0d8..0824fba557 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -46,6 +46,7 @@ name: load-config {{$CNPS_PER_NAMESPACE := DefaultParam .CL2_CNPS_PER_NAMESPACE 0}} {{$CCNPS := DefaultParam .CL2_CCNPS 0}} {{$DUALSTACK := DefaultParam .CL2_DUALSTACK false}} +{{$smallDeploymentsPerNamespaceCNP := DivideInt $podsPerNamespace $SMALL_GROUP_SIZE}} namespace: number: {{$namespaces}} @@ -127,14 +128,16 @@ steps: {{if or $CCNP_TEST $CNP_TEST}} bigDeploymentSize: 0 bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} cnp_test: {{$CNP_TEST}} ccnp_test: {{$CCNP_TEST}} {{else}} bigDeploymentSize: {{$BIG_GROUP_SIZE}} bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - {{end}} smallDeploymentSize: {{$SMALL_GROUP_SIZE}} smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} CpuRequest: {{$latencyPodCpu}}m MemoryRequest: {{$latencyPodMemory}}M Group: {{$groupName}} From d419195358e290666a3ada33ee939258651be7c1 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 4 Feb 2025 12:15:52 -0500 Subject: [PATCH 12/95] 1-1 cnp-deployment --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 1 + .../clusterloader2/slo/config/modules/reconcile-objects.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 34cffda48a..62628cae1c 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -7,6 +7,7 @@ spec: endpointSelector: matchLabels: group: cnp-ccnp + deployment: {{.basename}} ingress: - icmps: - fields: diff --git a/modules/python/clusterloader2/slo/config/modules/reconcile-objects.yaml b/modules/python/clusterloader2/slo/config/modules/reconcile-objects.yaml index d3e08b0f8e..802b06d73d 100644 --- a/modules/python/clusterloader2/slo/config/modules/reconcile-objects.yaml +++ b/modules/python/clusterloader2/slo/config/modules/reconcile-objects.yaml @@ -54,7 +54,7 @@ steps: replicasPerNamespace: {{$smallDeploymentsPerNamespace}} tuningSet: {{$tuningSet}} objectBundle: - - basename: small-deployment + - basename: cnp objectTemplatePath: deployment_template.yaml templateFillMap: Replicas: {{$smallDeploymentSize}} From 6dd72fab4cd04db20d880250418eff97e3f33903 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 4 Feb 2025 12:17:50 -0500 Subject: [PATCH 13/95] name --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 62628cae1c..bcc5810f1f 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,13 +1,13 @@ apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: - name: {{.basename}} + name: {{.Name}} namespace: slo-1 # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns spec: endpointSelector: matchLabels: group: cnp-ccnp - deployment: {{.basename}} + deployment: {{.Name}} ingress: - icmps: - fields: From 84e0c8bf013ed706b41a299f9392a9c95c295163 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 4 Feb 2025 12:22:23 -0500 Subject: [PATCH 14/95] name adjustment --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index bcc5810f1f..4d80e71d5d 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -7,7 +7,7 @@ spec: endpointSelector: matchLabels: group: cnp-ccnp - deployment: {{.Name}} + name: {{.Name}} ingress: - icmps: - fields: From fb7cdd25f30e00f09ae609e9f233b008a2dec8a3 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 4 Feb 2025 12:30:34 -0500 Subject: [PATCH 15/95] added name deployment label --- .../python/clusterloader2/slo/config/deployment_template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/python/clusterloader2/slo/config/deployment_template.yaml b/modules/python/clusterloader2/slo/config/deployment_template.yaml index 91929229c9..2ebf4fb5c8 100644 --- a/modules/python/clusterloader2/slo/config/deployment_template.yaml +++ b/modules/python/clusterloader2/slo/config/deployment_template.yaml @@ -11,6 +11,7 @@ metadata: name: {{.Name}} labels: group: {{.Group}} + name: {{.Name}} {{if .SvcName}} svc: {{.SvcName}}-{{.Index}} {{end}} From b35242b1cda8732eacfd7a4c7ed44a50f5e541a0 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Wed, 5 Feb 2025 11:19:35 -0500 Subject: [PATCH 16/95] uncommented out --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 142 +++++++++--------- .../collect-clusterloader2.yml | 12 +- 3 files changed, 84 insertions(+), 84 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 0824fba557..781fdae64d 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -51,8 +51,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: @@ -145,75 +145,75 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart - -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart + + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 78f44564d5c9199534ab1df8bbda82f23fa8a8e2 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Wed, 5 Feb 2025 14:13:13 -0500 Subject: [PATCH 17/95] multiple ns --- modules/python/clusterloader2/slo/config/load-config.yaml | 2 +- modules/python/clusterloader2/slo/slo.py | 5 ++++- pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml | 1 + steps/engine/clusterloader2/slo/execute.yml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 781fdae64d..e09c2a5e4e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -14,7 +14,7 @@ name: load-config {{$groupName := DefaultParam .CL2_GROUP_NAME "service-discovery"}} # TODO(jshr-w): This should eventually use >1 namespace. -{{$namespaces := 1}} +{{$namespaces := DefaultParam .CL2_NO_OF_NAMESPACES 1}} {{$nodes := DefaultParam .CL2_NODES 1000}} {{$deploymentQPS := DivideFloat $loadTestThroughput $deploymentSize}} diff --git a/modules/python/clusterloader2/slo/slo.py b/modules/python/clusterloader2/slo/slo.py index f1ebcfa5d0..e4d1b8e2b2 100644 --- a/modules/python/clusterloader2/slo/slo.py +++ b/modules/python/clusterloader2/slo/slo.py @@ -58,6 +58,7 @@ def configure_clusterloader2( num_cnps, num_ccnps, dualstack, + no_of_namespaces, override_file): steps = node_count // node_per_step @@ -95,6 +96,7 @@ def configure_clusterloader2( file.write("CL2_CNP_TEST: true\n") file.write(f"CL2_CNPS_PER_NAMESPACE: {num_cnps}\n") file.write(f"CL2_DUALSTACK: {dualstack}\n") + file.write(f"CL2_NO_OF_NAMESPACES: {no_of_namespaces}\n") file.write("CL2_GROUP_NAME: cnp-ccnp\n") if ccnp_test: @@ -235,6 +237,7 @@ def main(): parser_configure.add_argument("num_ccnps", type=int, nargs='?', default=0, help="Number of ccnps") parser_configure.add_argument("dualstack", type=eval, choices=[True, False], nargs='?', default=False, help="Whether cluster is dualstack. Must be either True or False") + parser_configure.add_argument("no_of_namespaces", type=int, nargs='?', default=1, help="Number of namespaces to create") parser_configure.add_argument("cl2_override_file", type=str, help="Path to the overrides of CL2 config file") # Sub-command for validate_clusterloader2 @@ -281,7 +284,7 @@ def main(): if args.command == "configure": configure_clusterloader2(args.cpu_per_node, args.node_count, args.node_per_step, args.max_pods, args.repeats, args.operation_timeout, args.provider, args.cilium_enabled, - args.service_test, args.cnp_test, args.ccnp_test, args.num_cnps, args.num_ccnps, args.dualstack, args.cl2_override_file) + args.service_test, args.cnp_test, args.ccnp_test, args.num_cnps, args.num_ccnps, args.dualstack, args.no_of_namespaces, args.cl2_override_file) elif args.command == "validate": validate_clusterloader2(args.node_count, args.operation_timeout) elif args.command == "execute": diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml index cfcbe7c6c7..81f55ea418 100644 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp-feature.yml @@ -36,6 +36,7 @@ stages: num_cnps: $(CNPS_NUM) num_ccnps: $(CCNPS_NUM) dualstack: $(DUAL) + no_of_namespaces: $(NUMBER_NAMESPACES) cl2_config_file: load-config.yaml max_parallel: 2 timeout_in_minutes: 720 diff --git a/steps/engine/clusterloader2/slo/execute.yml b/steps/engine/clusterloader2/slo/execute.yml index 3fb1818c96..095256e54b 100644 --- a/steps/engine/clusterloader2/slo/execute.yml +++ b/steps/engine/clusterloader2/slo/execute.yml @@ -22,7 +22,7 @@ steps: PYTHONPATH=$PYTHONPATH:$(pwd) python3 $PYTHON_SCRIPT_FILE configure \ $CPU_PER_NODE $NODE_COUNT $NODE_PER_STEP ${MAX_PODS:-0} \ ${REPEATS:-1} $SCALE_TIMEOUT $CLOUD $CILIUM_ENABLED \ - $SERVICE_TEST ${CNP_TEST:-False} ${CCNP_TEST:-False} ${NUM_CNPS:-0} ${NUM_CCNPS:-0} ${DUALSTACK:-False} ${CL2_CONFIG_DIR}/overrides.yaml + $SERVICE_TEST ${CNP_TEST:-False} ${CCNP_TEST:-False} ${NUM_CNPS:-0} ${NUM_CCNPS:-0} ${DUALSTACK:-False} ${NO_OF_NAMESPACES:-1} ${CL2_CONFIG_DIR}/overrides.yaml PYTHONPATH=$PYTHONPATH:$(pwd) python3 $PYTHON_SCRIPT_FILE execute \ ${CL2_IMAGE} ${CL2_CONFIG_DIR} $CL2_REPORT_DIR $CL2_CONFIG_FILE \ ${HOME}/.kube/config $CLOUD From cbebb96d667cb8666ebb0e4a29f672390f0d30d4 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 10:11:58 -0500 Subject: [PATCH 18/95] slo parameter passing in --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- .../clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 4d80e71d5d..879669da68 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -2,7 +2,7 @@ apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: name: {{.Name}} - namespace: slo-1 # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns + namespace: {{.ns}} # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns spec: endpointSelector: matchLabels: diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index d52f8e9c97..eb0911db83 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -17,3 +17,5 @@ steps: objectBundle: - basename: cnp objectTemplatePath: cnp_template.yaml + params: + ns: "{{.namespaceRange.basename}}-{{.i}}" From efe2aaa16f58adbe202f25064050f4ab6f267e4c Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 12:46:42 -0500 Subject: [PATCH 19/95] adjustments --- .../slo/config/modules/ciliumnetworkpolicy.yaml | 3 ++- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index eb0911db83..76e48a9336 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -17,5 +17,6 @@ steps: objectBundle: - basename: cnp objectTemplatePath: cnp_template.yaml - params: + templateFillMap: ns: "{{.namespaceRange.basename}}-{{.i}}" +- echo: "Namespace: {{.namespaceRange.basename}}-{{.i}}" diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 306e0c74bb..37df61848a 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 500 - enable_autoscale: "false" + # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + # parameters: + # role: ces + # region: ${{ parameters.regions[0] }} + # nodes_per_nodepool: 500 + # enable_autoscale: "false" From 7085205230f5ba016e178ff75de46762b91f5538 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 12:57:19 -0500 Subject: [PATCH 20/95] fix --- .../clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 76e48a9336..c3fb5a728f 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -19,4 +19,4 @@ steps: objectTemplatePath: cnp_template.yaml templateFillMap: ns: "{{.namespaceRange.basename}}-{{.i}}" -- echo: "Namespace: {{.namespaceRange.basename}}-{{.i}}" + - name: "{{.namespaceRange.basename}}-{{.i}}" From 255e17706db34be06b3752ea559ecaa788499df5 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 13:37:16 -0500 Subject: [PATCH 21/95] adjustment --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- .../clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 879669da68..f73e84e179 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -2,7 +2,7 @@ apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: name: {{.Name}} - namespace: {{.ns}} # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns + namespace: slo-1 spec: endpointSelector: matchLabels: diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index c3fb5a728f..9e9e36dd23 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -15,8 +15,7 @@ steps: replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence objectBundle: - - basename: cnp + - basename: "{{.namespaceRange.basename}}-{{.i}}" objectTemplatePath: cnp_template.yaml templateFillMap: ns: "{{.namespaceRange.basename}}-{{.i}}" - - name: "{{.namespaceRange.basename}}-{{.i}}" From e2212809376baf7d087418e162991477ab14c52e Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 14:37:26 -0500 Subject: [PATCH 22/95] basename --- .../clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 9e9e36dd23..2f11abc98b 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -15,7 +15,7 @@ steps: replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence objectBundle: - - basename: "{{.namespaceRange.basename}}-{{.i}}" + - basename: "{{.basename}}-{{.i}}" objectTemplatePath: cnp_template.yaml templateFillMap: ns: "{{.namespaceRange.basename}}-{{.i}}" From d63960ba26b1fb63da338f4e356cc1b733d0194a Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 14:41:04 -0500 Subject: [PATCH 23/95] fix --- .../slo/config/modules/ciliumnetworkpolicy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 2f11abc98b..9ad5257b1f 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -15,7 +15,7 @@ steps: replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence objectBundle: - - basename: "{{.basename}}-{{.i}}" + - basename: "slo-{{.i}}" objectTemplatePath: cnp_template.yaml templateFillMap: - ns: "{{.namespaceRange.basename}}-{{.i}}" + ns: "slo-{{.i}}" From 750f9073026471bd67cee8c7069fcb85680635f8 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 14:47:47 -0500 Subject: [PATCH 24/95] passing in ns --- .../slo/config/modules/ciliumnetworkpolicy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 9ad5257b1f..4e3f7b740c 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -15,7 +15,7 @@ steps: replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence objectBundle: - - basename: "slo-{{.i}}" + - basename: "slo-{{i}}" objectTemplatePath: cnp_template.yaml templateFillMap: - ns: "slo-{{.i}}" + ns: "{slo-{{i}}" From 8fcc02d78e101e231f3227c2bf38fb9ac5239e96 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 15:04:48 -0500 Subject: [PATCH 25/95] cnp basename --- .../slo/config/modules/ciliumnetworkpolicy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 4e3f7b740c..3d1bee69a7 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -15,7 +15,7 @@ steps: replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence objectBundle: - - basename: "slo-{{i}}" + - basename: cnp objectTemplatePath: cnp_template.yaml templateFillMap: - ns: "{slo-{{i}}" + ns: "{{.namespaceRange.basename}}-{{.i}}" From dd2fa8056f55592abd5dd28b83bddd498ec1b8d5 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 6 Feb 2025 16:18:27 -0500 Subject: [PATCH 26/95] adjusted ns --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- .../slo/config/modules/ciliumnetworkpolicy.yaml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index f73e84e179..52a0a374d8 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -2,7 +2,7 @@ apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: name: {{.Name}} - namespace: slo-1 + namespace: {{.Namespace}} spec: endpointSelector: matchLabels: diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 3d1bee69a7..cc72a85300 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -16,6 +16,4 @@ steps: tuningSet: Sequence objectBundle: - basename: cnp - objectTemplatePath: cnp_template.yaml - templateFillMap: - ns: "{{.namespaceRange.basename}}-{{.i}}" + objectTemplatePath: cnp_template.yaml \ No newline at end of file From 0546e75e79d98af1023c6a6bd1064e1adfbc40f7 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 10:17:45 -0500 Subject: [PATCH 27/95] randomized namespace --- .../clusterloader2/slo/config/cnp_template.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 52a0a374d8..51ce605dd9 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,3 +1,12 @@ +{{- $namespacesList := list "slo-1" "slo-2" "slo-3" "slo-4" "slo-5" "slo-6" "slo-7" "slo-8" "slo-9" "slo-10" -}} +{{- $randomNamespace := "" -}} +{{- range $index, $ns := $namespacesList -}} + {{- if ne $ns .Namespace -}} + {{- $randomNamespace = $ns -}} + {{- break -}} + {{- end -}} +{{- end -}} + apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: @@ -9,15 +18,15 @@ spec: group: cnp-ccnp name: {{.Name}} ingress: + - fromEndpoints: + - matchLabels: + k8s:io.kubernetes.pod.namespace: {{.randomNamespace}} - icmps: - fields: - type: 8 family: IPv4 - type: 128 family: IPv6 - ingressDeny: - - fromEntities: - - all egress: - icmps: - fields: From dcb39f4c481e1d54156f6a04be4ed45f6620c12a Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 10:21:37 -0500 Subject: [PATCH 28/95] adjustment --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 51ce605dd9..ca19bc0294 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -20,7 +20,7 @@ spec: ingress: - fromEndpoints: - matchLabels: - k8s:io.kubernetes.pod.namespace: {{.randomNamespace}} + k8s:io.kubernetes.pod.namespace: {{$randomNamespace}} - icmps: - fields: - type: 8 From a7d4d9f937e82dcaf8047e251a63d8f4bff4579a Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 10:45:41 -0500 Subject: [PATCH 29/95] slice function --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index ca19bc0294..798dee0c98 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,4 +1,4 @@ -{{- $namespacesList := list "slo-1" "slo-2" "slo-3" "slo-4" "slo-5" "slo-6" "slo-7" "slo-8" "slo-9" "slo-10" -}} +{{- $namespacesList := slice "slo-1" "slo-2" "slo-3" "slo-4" "slo-5" "slo-6" "slo-7" "slo-8" "slo-9" "slo-10" -}} {{- $randomNamespace := "" -}} {{- range $index, $ns := $namespacesList -}} {{- if ne $ns .Namespace -}} From f2d104b740679819f22fae8a418bc112e94a7eaa Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 11:03:32 -0500 Subject: [PATCH 30/95] fixed slice --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 798dee0c98..dbf349fe0d 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,4 +1,4 @@ -{{- $namespacesList := slice "slo-1" "slo-2" "slo-3" "slo-4" "slo-5" "slo-6" "slo-7" "slo-8" "slo-9" "slo-10" -}} +{{- $namespacesList := (slice "slo-1" "slo-2") -}} {{- $randomNamespace := "" -}} {{- range $index, $ns := $namespacesList -}} {{- if ne $ns .Namespace -}} From f9524b0e4bc43b7b17262881923a5c8378e82285 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 11:13:49 -0500 Subject: [PATCH 31/95] map --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index dbf349fe0d..fec82a6c23 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,6 +1,6 @@ -{{- $namespacesList := (slice "slo-1" "slo-2") -}} +{{- $namespacesMap := dict "ns1" "slo-1" "ns2" "slo-2" -}} {{- $randomNamespace := "" -}} -{{- range $index, $ns := $namespacesList -}} +{{- range $key, $ns := $namespacesMap -}} {{- if ne $ns .Namespace -}} {{- $randomNamespace = $ns -}} {{- break -}} From a11ef0851f2fd716f09146c48969b18a62c039aa Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 11:29:46 -0500 Subject: [PATCH 32/95] array --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index fec82a6c23..7e0259f23d 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,6 +1,6 @@ -{{- $namespacesMap := dict "ns1" "slo-1" "ns2" "slo-2" -}} +{{- $namespacesList := ["slo-1", "slo-2", "slo-3", "slo-4", "slo-5", "slo-6", "slo-7", "slo-8", "slo-9", "slo-10"] -}} {{- $randomNamespace := "" -}} -{{- range $key, $ns := $namespacesMap -}} +{{- range $key, $ns := $namespacesList -}} {{- if ne $ns .Namespace -}} {{- $randomNamespace = $ns -}} {{- break -}} From 9d28d002957d45b7d329df08a906453ff816f3bf Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 11:41:58 -0500 Subject: [PATCH 33/95] using sprig --- .../clusterloader2/slo/config/cnp_template.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 7e0259f23d..f5b0c3fe3d 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,8 +1,13 @@ -{{- $namespacesList := ["slo-1", "slo-2", "slo-3", "slo-4", "slo-5", "slo-6", "slo-7", "slo-8", "slo-9", "slo-10"] -}} +{{- $sprig := import "github.com/Masterminds/sprig" -}} +{{- $namespacesMap := $sprig.dict "ns1" "slo-1" "ns2" "slo-2" "ns3" "slo-3" "ns4" "slo-4" "ns5" "slo-5" "ns6" "slo-6" "ns7" "slo-7" "ns8" "slo-8" "ns9" "slo-9" "ns10" "slo-10" -}} {{- $randomNamespace := "" -}} -{{- range $key, $ns := $namespacesList -}} - {{- if ne $ns .Namespace -}} - {{- $randomNamespace = $ns -}} +{{- $keys := $sprig.keys $namespacesMap | $sprig.shuffle -}} +{{- range $i, $key := $keys -}} + {{- $tempNs := index $namespacesMap $key -}} + {{- if eq $tempNs .Namespace -}} + {{- continue -}} + {{- else -}} + {{- $randomNamespace = $tempNs -}} {{- break -}} {{- end -}} {{- end -}} From fc078f32bf16eb32898c3c66ade3b28f2bfd9965 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 11:44:11 -0500 Subject: [PATCH 34/95] 2 ns --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index f5b0c3fe3d..4aa2bfebcb 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,5 +1,5 @@ {{- $sprig := import "github.com/Masterminds/sprig" -}} -{{- $namespacesMap := $sprig.dict "ns1" "slo-1" "ns2" "slo-2" "ns3" "slo-3" "ns4" "slo-4" "ns5" "slo-5" "ns6" "slo-6" "ns7" "slo-7" "ns8" "slo-8" "ns9" "slo-9" "ns10" "slo-10" -}} +{{- $namespacesMap := $sprig.dict "ns1" "slo-1" "ns2" "slo-2" -}} {{- $randomNamespace := "" -}} {{- $keys := $sprig.keys $namespacesMap | $sprig.shuffle -}} {{- range $i, $key := $keys -}} From 27e1f7d560633fc18a9a06784d8479af0a541cf2 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 12:15:52 -0500 Subject: [PATCH 35/95] change --- .../slo/config/cnp_template.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 4aa2bfebcb..0b9a969572 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,16 +1,12 @@ -{{- $sprig := import "github.com/Masterminds/sprig" -}} -{{- $namespacesMap := $sprig.dict "ns1" "slo-1" "ns2" "slo-2" -}} {{- $randomNamespace := "" -}} -{{- $keys := $sprig.keys $namespacesMap | $sprig.shuffle -}} -{{- range $i, $key := $keys -}} - {{- $tempNs := index $namespacesMap $key -}} - {{- if eq $tempNs .Namespace -}} - {{- continue -}} - {{- else -}} - {{- $randomNamespace = $tempNs -}} - {{- break -}} + {{- while eq $randomNamespace "" -}} + {{- $randNum := randInt 1 3 -}} + {{- if eq (printf "slo-%d" $randNum) .Namespace -}} + {{- continue -}} + {{- else -}} + {{- $randomNamespace = printf "slo-%d" $randNum -}} + {{- end -}} {{- end -}} -{{- end -}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy From 4d8656b30076a68b12150ba0cfa227bc805e93fd Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 12:16:25 -0500 Subject: [PATCH 36/95] fix --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 0b9a969572..a837a0ec5e 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,6 +1,6 @@ {{- $randomNamespace := "" -}} {{- while eq $randomNamespace "" -}} - {{- $randNum := randInt 1 3 -}} + {{- $randNum := randInt 1 2 -}} {{- if eq (printf "slo-%d" $randNum) .Namespace -}} {{- continue -}} {{- else -}} From af58cc954ff5ffd210fe2add4d42271281d7359b Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 12:22:12 -0500 Subject: [PATCH 37/95] randNamspace --- .../slo/config/cnp_template.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index a837a0ec5e..a6f5ceb487 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,12 +1,14 @@ -{{- $randomNamespace := "" -}} - {{- while eq $randomNamespace "" -}} - {{- $randNum := randInt 1 2 -}} - {{- if eq (printf "slo-%d" $randNum) .Namespace -}} - {{- continue -}} - {{- else -}} - {{- $randomNamespace = printf "slo-%d" $randNum -}} - {{- end -}} +{{- define "generateNamespace" -}} + {{- $randNum := randInt 1 3 -}} + {{- $newNamespace := printf "slo-%d" $randNum -}} + {{- if eq $newNamespace .Namespace -}} + {{- template "generateNamespace" . -}} + {{- else -}} + {{- $newNamespace -}} {{- end -}} +{{- end -}} + +{{- $randomNamespace := include "generateNamespace" . -}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy From 5c4e2a83f30566ee7c84db90be95faf290fef814 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 12:24:15 -0500 Subject: [PATCH 38/95] took out - --- .../slo/config/cnp_template.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index a6f5ceb487..011d442e02 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,12 +1,12 @@ -{{- define "generateNamespace" -}} - {{- $randNum := randInt 1 3 -}} - {{- $newNamespace := printf "slo-%d" $randNum -}} - {{- if eq $newNamespace .Namespace -}} - {{- template "generateNamespace" . -}} - {{- else -}} - {{- $newNamespace -}} - {{- end -}} -{{- end -}} +{{define "generateNamespace"}} + {{$randNum := randInt 1 3}} + {{$newNamespace := printf "slo-%d" $randNum}} + {{if eq $newNamespace .Namespace}} + {{template "generateNamespace" .}} + {{else}} + {{$newNamespace}} + {{end}} +{{end}} {{- $randomNamespace := include "generateNamespace" . -}} From 0ac443adac1f32664253a5e155593b39f7cb4c56 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 15:18:03 -0500 Subject: [PATCH 39/95] randomNs --- .../clusterloader2/slo/config/cnp_template.yaml | 12 ------------ .../slo/config/modules/ciliumnetworkpolicy.yaml | 3 +++ modules/python/clusterloader2/slo/randomNs.py | 13 +++++++++++++ 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 modules/python/clusterloader2/slo/randomNs.py diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 011d442e02..b8bca974d4 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,15 +1,3 @@ -{{define "generateNamespace"}} - {{$randNum := randInt 1 3}} - {{$newNamespace := printf "slo-%d" $randNum}} - {{if eq $newNamespace .Namespace}} - {{template "generateNamespace" .}} - {{else}} - {{$newNamespace}} - {{end}} -{{end}} - -{{- $randomNamespace := include "generateNamespace" . -}} - apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index cc72a85300..1b3e38b115 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -14,6 +14,9 @@ steps: max: {{$namespaces}} replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence + runScript: + name: "Run Python Script" + command: "python modules/python/clusterloader2/slo/randomNs.py" objectBundle: - basename: cnp objectTemplatePath: cnp_template.yaml \ No newline at end of file diff --git a/modules/python/clusterloader2/slo/randomNs.py b/modules/python/clusterloader2/slo/randomNs.py new file mode 100644 index 0000000000..97a4847c12 --- /dev/null +++ b/modules/python/clusterloader2/slo/randomNs.py @@ -0,0 +1,13 @@ +import random + +namespaces = ["slo-1", "slo-2"] +namespace = {{.Namespace}} +randomNamespace = "" + +while randomNamespace == "": + randomIndex = random.randint(0, len(namespaces) - 1) + if namespaces[randomIndex] != namespace: + randomNamespace = namespaces[randomIndex] + break + +print(f"Selected random namespace: {randomNamespace}") \ No newline at end of file From 3b721b80c7f05b93e219e95a7cc20ab994e6b130 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 15:37:47 -0500 Subject: [PATCH 40/95] changes --- .../config/modules/ciliumnetworkpolicy.yaml | 2 +- .../clusterloader2/slo/process_template.py | 18 ++++++++++++++++++ modules/python/clusterloader2/slo/randomNs.py | 9 +++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 modules/python/clusterloader2/slo/process_template.py diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index 1b3e38b115..d127962fe6 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -16,7 +16,7 @@ steps: tuningSet: Sequence runScript: name: "Run Python Script" - command: "python modules/python/clusterloader2/slo/randomNs.py" + command: "python modules/python/clusterloader2/slo/randomNs.py && python modules/python/clusterloader2/slo/config/process_template.py" objectBundle: - basename: cnp objectTemplatePath: cnp_template.yaml \ No newline at end of file diff --git a/modules/python/clusterloader2/slo/process_template.py b/modules/python/clusterloader2/slo/process_template.py new file mode 100644 index 0000000000..7f5f16d91d --- /dev/null +++ b/modules/python/clusterloader2/slo/process_template.py @@ -0,0 +1,18 @@ +import os + +# Read the random namespace from the file +with open("random_namespace.txt", "r") as file: + random_namespace = file.read().strip() + +# Read the template file +with open("cnp_template.yaml", "r") as file: + template = file.read() + +# Replace the placeholder with the random namespace +template = template.replace("{{$randomNamespace}}", random_namespace) + +# Write the processed template back to the same file +with open("cnp_template.yaml", "w") as file: + file.write(template) + +print("Processed template written to cnp_template.yaml") \ No newline at end of file diff --git a/modules/python/clusterloader2/slo/randomNs.py b/modules/python/clusterloader2/slo/randomNs.py index 97a4847c12..a795f7baef 100644 --- a/modules/python/clusterloader2/slo/randomNs.py +++ b/modules/python/clusterloader2/slo/randomNs.py @@ -1,7 +1,7 @@ import random namespaces = ["slo-1", "slo-2"] -namespace = {{.Namespace}} +namespace = "{{.Namespace}}" randomNamespace = "" while randomNamespace == "": @@ -10,4 +10,9 @@ randomNamespace = namespaces[randomIndex] break -print(f"Selected random namespace: {randomNamespace}") \ No newline at end of file +def get_random_namespace(): + return randomNamespace + +# Write the random namespace to a file +with open("random_namespace.txt", "w") as file: + file.write(get_random_namespace()) \ No newline at end of file From 5f9de47146d30338846b4394d292bcbb2387c5f8 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 15:50:30 -0500 Subject: [PATCH 41/95] fix --- .../clusterloader2/slo/config/cnp_template.yaml | 11 +++++++++++ .../slo/config/modules/ciliumnetworkpolicy.yaml | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index b8bca974d4..848269eb41 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,3 +1,14 @@ +{{define "generateNamespace"}} + {{$randNum := RandIntRange 1 3}} + {{$newNamespace := printf "slo-%d" $randNum}} + {{if eq $newNamespace .Namespace}} + {{template "generateNamespace" .}} + {{else}} + {{$randomNamespace := $newNamespace}} + {{break}} + {{end}} +{{end}} + apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index d127962fe6..cc72a85300 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -14,9 +14,6 @@ steps: max: {{$namespaces}} replicasPerNamespace: {{$cnpsPerNamespace}} tuningSet: Sequence - runScript: - name: "Run Python Script" - command: "python modules/python/clusterloader2/slo/randomNs.py && python modules/python/clusterloader2/slo/config/process_template.py" objectBundle: - basename: cnp objectTemplatePath: cnp_template.yaml \ No newline at end of file From 53bd6e31e4bebb728bceb2380208b321820b2969 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 15:59:02 -0500 Subject: [PATCH 42/95] removed break --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 848269eb41..cf0381e560 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -5,7 +5,6 @@ {{template "generateNamespace" .}} {{else}} {{$randomNamespace := $newNamespace}} - {{break}} {{end}} {{end}} From 3bfc70ef59b2c1bf4d30e4eae7b0545ed032796a Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 16:09:51 -0500 Subject: [PATCH 43/95] fixes --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index cf0381e560..07b97d23d3 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,13 +1,16 @@ +{{$randomNamespace := ""}} {{define "generateNamespace"}} {{$randNum := RandIntRange 1 3}} {{$newNamespace := printf "slo-%d" $randNum}} {{if eq $newNamespace .Namespace}} {{template "generateNamespace" .}} {{else}} - {{$randomNamespace := $newNamespace}} + {{- $randomNamespace = $newNamespace -}} {{end}} {{end}} +{{template "generateNamespace" .}} + apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: From f01e45f4a79b906f46af0a2beda5b6afeed654c8 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 16:28:39 -0500 Subject: [PATCH 44/95] fix --- .../clusterloader2/slo/config/cnp_template.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index 07b97d23d3..ba8edaab56 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,15 +1,14 @@ -{{$randomNamespace := ""}} {{define "generateNamespace"}} - {{$randNum := RandIntRange 1 3}} - {{$newNamespace := printf "slo-%d" $randNum}} - {{if eq $newNamespace .Namespace}} - {{template "generateNamespace" .}} - {{else}} - {{- $randomNamespace = $newNamespace -}} - {{end}} + {{- $randNum := RandIntRange 1 3 -}} + {{- $newNamespace := printf "slo-%d" $randNum -}} + {{- if eq $newNamespace .Namespace -}} + {{- template "generateNamespace" . -}} + {{- else -}} + {{- $newNamespace -}} + {{- end -}} {{end}} -{{template "generateNamespace" .}} +{{$randomNamespace := (print (template "generateNamespace" .))}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy From 96b3d01e28c7608e04fc44461c428e56368a65f8 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 17:05:03 -0500 Subject: [PATCH 45/95] fix to template --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index ba8edaab56..d500246435 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -8,7 +8,7 @@ {{- end -}} {{end}} -{{$randomNamespace := (print (template "generateNamespace" .))}} +{{$randomNamespace := (template "generateNamespace" .)}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy From d5373e9a52226f719ece3edd5b779e4df389248e Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 7 Feb 2025 17:11:32 -0500 Subject: [PATCH 46/95] fixes --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index d500246435..bff1ffc4ef 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,5 +1,5 @@ {{define "generateNamespace"}} - {{- $randNum := RandIntRange 1 3 -}} + {{- $randNum := RandIntRange 1 2 -}} {{- $newNamespace := printf "slo-%d" $randNum -}} {{- if eq $newNamespace .Namespace -}} {{- template "generateNamespace" . -}} @@ -8,7 +8,6 @@ {{- end -}} {{end}} -{{$randomNamespace := (template "generateNamespace" .)}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy @@ -23,7 +22,7 @@ spec: ingress: - fromEndpoints: - matchLabels: - k8s:io.kubernetes.pod.namespace: {{$randomNamespace}} + k8s:io.kubernetes.pod.namespace: {{template "generateNamespace" .}} - icmps: - fields: - type: 8 From 65c5a5ae5bfdca48dcb4b91b6c9ecf2f78df0bad Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 10 Feb 2025 10:33:16 -0500 Subject: [PATCH 47/95] switched to for loop --- .../slo/config/cnp_template.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index bff1ffc4ef..f06878bee0 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,14 +1,19 @@ {{define "generateNamespace"}} - {{- $randNum := RandIntRange 1 2 -}} - {{- $newNamespace := printf "slo-%d" $randNum -}} - {{- if eq $newNamespace .Namespace -}} - {{- template "generateNamespace" . -}} - {{- else -}} - {{- $newNamespace -}} + {{- $maxTries := 10 -}} + {{- $newNamespace := "" -}} + {{- $stop := false -}} + {{- range $i := until $maxTries -}} + {{- if not $stop -}} + {{- $randNum := RandIntRange 1 2 -}} + {{- $newNamespace = printf "slo-%d" $randNum -}} + {{- if ne $newNamespace .Namespace -}} + {{- $stop = true -}} + {{- end -}} + {{- end -}} {{- end -}} + {{- $newNamespace -}} {{end}} - apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: From 293d362d049e47a90602e62bfc16f92483eef29b Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 10 Feb 2025 10:37:11 -0500 Subject: [PATCH 48/95] need to scale --- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 37df61848a..306e0c74bb 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - # parameters: - # role: ces - # region: ${{ parameters.regions[0] }} - # nodes_per_nodepool: 500 - # enable_autoscale: "false" + - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 500 + enable_autoscale: "false" From a3252ae22d58641af7e18d622e460d1ceeebfb70 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 10 Feb 2025 11:56:56 -0500 Subject: [PATCH 49/95] no scale and changing ns --- .../slo/config/cnp_template.yaml | 19 +++---------------- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index f06878bee0..e6a6805ebf 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,18 +1,5 @@ -{{define "generateNamespace"}} - {{- $maxTries := 10 -}} - {{- $newNamespace := "" -}} - {{- $stop := false -}} - {{- range $i := until $maxTries -}} - {{- if not $stop -}} - {{- $randNum := RandIntRange 1 2 -}} - {{- $newNamespace = printf "slo-%d" $randNum -}} - {{- if ne $newNamespace .Namespace -}} - {{- $stop = true -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- $newNamespace -}} -{{end}} +{{- $randNum := RandIntRange 1 2 -}} +{{- $randomNamespace = printf "slo-%d" $randNum -}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy @@ -27,7 +14,7 @@ spec: ingress: - fromEndpoints: - matchLabels: - k8s:io.kubernetes.pod.namespace: {{template "generateNamespace" .}} + k8s:io.kubernetes.pod.namespace: {{$randomNamespace}} - icmps: - fields: - type: 8 diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 306e0c74bb..37df61848a 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 500 - enable_autoscale: "false" + # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + # parameters: + # role: ces + # region: ${{ parameters.regions[0] }} + # nodes_per_nodepool: 500 + # enable_autoscale: "false" From ff9501e1eda086734648a71b7127613794a0c80b Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 10 Feb 2025 12:27:13 -0500 Subject: [PATCH 50/95] fix --- modules/python/clusterloader2/slo/config/cnp_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index e6a6805ebf..b52e3ab2e6 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,5 +1,5 @@ {{- $randNum := RandIntRange 1 2 -}} -{{- $randomNamespace = printf "slo-%d" $randNum -}} +{{- $randomNamespace := printf "slo-%d" $randNum -}} apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy From 81fa3004c1e7cb77ba50220271c986f5849bc7d9 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 10 Feb 2025 13:21:18 -0500 Subject: [PATCH 51/95] changes --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 147 +++++++++--------- modules/python/clusterloader2/slo/slo.py | 2 + 3 files changed, 83 insertions(+), 80 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index e09c2a5e4e..2c5349f9ae 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -6,7 +6,7 @@ name: load-config {{$CCNP_TEST := DefaultParam .CL2_CCNP_TEST false}} # Config options for test parameters -{{$nodesPerNamespace := DefaultParam .CL2_NODES_PER_NAMESPACE 100}} +{{$nodesPerNamespace := DefaultParam .CL2_NODES_PER_NAMESPACE 1000}} {{$podsPerNode := DefaultParam .CL2_PODS_PER_NODE 50}} {{$loadTestThroughput := DefaultParam .CL2_LOAD_TEST_THROUGHPUT 100}} {{$deploymentSize := DefaultParam .CL2_DEPLOYMENT_SIZE 100}} @@ -17,9 +17,10 @@ name: load-config {{$namespaces := DefaultParam .CL2_NO_OF_NAMESPACES 1}} {{$nodes := DefaultParam .CL2_NODES 1000}} +#set nodesPerNamespace to 100 {{$deploymentQPS := DivideFloat $loadTestThroughput $deploymentSize}} {{$operationTimeout := DefaultParam .CL2_OPERATION_TIMEOUT "15m"}} -{{$totalPods := MultiplyInt $namespaces $nodes $podsPerNode}} +{{$totalPods := MultiplyInt $namespaces $nodesPerNamespace $podsPerNode}} {{$podsPerNamespace := DivideInt $totalPods $namespaces}} {{$deploymentsPerNamespace := DivideInt $podsPerNamespace $deploymentSize}} @@ -51,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: @@ -145,75 +146,75 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart - - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart + +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# ccnps: 0 +# {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/modules/python/clusterloader2/slo/slo.py b/modules/python/clusterloader2/slo/slo.py index e4d1b8e2b2..362dde4f79 100644 --- a/modules/python/clusterloader2/slo/slo.py +++ b/modules/python/clusterloader2/slo/slo.py @@ -96,12 +96,14 @@ def configure_clusterloader2( file.write("CL2_CNP_TEST: true\n") file.write(f"CL2_CNPS_PER_NAMESPACE: {num_cnps}\n") file.write(f"CL2_DUALSTACK: {dualstack}\n") + file.write("CL2_NODES_PER_NAMESPACE: 100\n") file.write(f"CL2_NO_OF_NAMESPACES: {no_of_namespaces}\n") file.write("CL2_GROUP_NAME: cnp-ccnp\n") if ccnp_test: file.write("CL2_CCNP_TEST: true\n") file.write(f"CL2_CCNPS: {num_ccnps}\n") + file.write("CL2_NODES_PER_NAMESPACE: 100\n") file.write(f"CL2_DUALSTACK: {dualstack}\n") file.write("CL2_GROUP_NAME: cnp-ccnp\n") From ecdea5560549dbbc42f0fead55d089fae47153b3 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Mon, 10 Feb 2025 13:22:02 -0500 Subject: [PATCH 52/95] dont scale down --- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 6b2f1818b86d343475c98875afe97f5b28ab17b3 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 11:00:11 -0500 Subject: [PATCH 53/95] testing and changes --- .../python/clusterloader2/slo/config/cnp_template.yaml | 9 +++++---- .../clusterloader2/slo/config/deployment_template.yaml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/cnp_template.yaml b/modules/python/clusterloader2/slo/config/cnp_template.yaml index b52e3ab2e6..39d49fccd9 100644 --- a/modules/python/clusterloader2/slo/config/cnp_template.yaml +++ b/modules/python/clusterloader2/slo/config/cnp_template.yaml @@ -1,4 +1,4 @@ -{{- $randNum := RandIntRange 1 2 -}} +{{- $randNum := RandIntRange 1 10 -}} {{- $randomNamespace := printf "slo-%d" $randNum -}} apiVersion: cilium.io/v2 @@ -12,15 +12,16 @@ spec: group: cnp-ccnp name: {{.Name}} ingress: - - fromEndpoints: - - matchLabels: - k8s:io.kubernetes.pod.namespace: {{$randomNamespace}} - icmps: - fields: - type: 8 family: IPv4 - type: 128 family: IPv6 + ingressDeny: + - fromEndpoints: + - matchLabels: + k8s:io.kubernetes.pod.namespace: {{$randomNamespace}} egress: - icmps: - fields: diff --git a/modules/python/clusterloader2/slo/config/deployment_template.yaml b/modules/python/clusterloader2/slo/config/deployment_template.yaml index 2ebf4fb5c8..4dbc950b0d 100644 --- a/modules/python/clusterloader2/slo/config/deployment_template.yaml +++ b/modules/python/clusterloader2/slo/config/deployment_template.yaml @@ -3,7 +3,7 @@ {{$cnp_test:= .cnp_test}} {{$ccnp_test:= .ccnp_test}} -{{$Image := DefaultParam .Image "mcr.microsoft.com/oss/kubernetes/pause:3.6"}} +{{$Image := DefaultParam .Image "acnpublic.azurecr.io/tamilmani/ubuntu22-tools"}} apiVersion: apps/v1 kind: Deployment From 63c0450aac0cad44bb92aa93651b6ceb89aec6e0 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 11:46:05 -0500 Subject: [PATCH 54/95] image change --- .../python/clusterloader2/slo/config/deployment_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/deployment_template.yaml b/modules/python/clusterloader2/slo/config/deployment_template.yaml index 4dbc950b0d..2ebf4fb5c8 100644 --- a/modules/python/clusterloader2/slo/config/deployment_template.yaml +++ b/modules/python/clusterloader2/slo/config/deployment_template.yaml @@ -3,7 +3,7 @@ {{$cnp_test:= .cnp_test}} {{$ccnp_test:= .ccnp_test}} -{{$Image := DefaultParam .Image "acnpublic.azurecr.io/tamilmani/ubuntu22-tools"}} +{{$Image := DefaultParam .Image "mcr.microsoft.com/oss/kubernetes/pause:3.6"}} apiVersion: apps/v1 kind: Deployment From a1f140bbd604320a1757cae04f6c3de700d8f12f Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 11:52:56 -0500 Subject: [PATCH 55/95] image test --- .../python/clusterloader2/slo/config/deployment_template.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/deployment_template.yaml b/modules/python/clusterloader2/slo/config/deployment_template.yaml index 2ebf4fb5c8..e1757c92d7 100644 --- a/modules/python/clusterloader2/slo/config/deployment_template.yaml +++ b/modules/python/clusterloader2/slo/config/deployment_template.yaml @@ -3,7 +3,7 @@ {{$cnp_test:= .cnp_test}} {{$ccnp_test:= .ccnp_test}} -{{$Image := DefaultParam .Image "mcr.microsoft.com/oss/kubernetes/pause:3.6"}} +{{$Image := DefaultParam .Image "acnpublic.azurecr.io/tamilmani/ubuntu22-tools"}} apiVersion: apps/v1 kind: Deployment @@ -42,6 +42,7 @@ spec: - name: ENV_VAR value: a image: {{$Image}} + command: ["/bin/sh", "-c", "sleep 3600"] imagePullPolicy: IfNotPresent name: {{.Name}} ports: From 41b2f26f122fad0ec08e5671abf6dd0cf5aadecd Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 12:52:27 -0500 Subject: [PATCH 56/95] changed image back --- .../python/clusterloader2/slo/config/deployment_template.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/deployment_template.yaml b/modules/python/clusterloader2/slo/config/deployment_template.yaml index e1757c92d7..2ebf4fb5c8 100644 --- a/modules/python/clusterloader2/slo/config/deployment_template.yaml +++ b/modules/python/clusterloader2/slo/config/deployment_template.yaml @@ -3,7 +3,7 @@ {{$cnp_test:= .cnp_test}} {{$ccnp_test:= .ccnp_test}} -{{$Image := DefaultParam .Image "acnpublic.azurecr.io/tamilmani/ubuntu22-tools"}} +{{$Image := DefaultParam .Image "mcr.microsoft.com/oss/kubernetes/pause:3.6"}} apiVersion: apps/v1 kind: Deployment @@ -42,7 +42,6 @@ spec: - name: ENV_VAR value: a image: {{$Image}} - command: ["/bin/sh", "-c", "sleep 3600"] imagePullPolicy: IfNotPresent name: {{.Name}} ports: From 867a01ab920a618436feca3c0439a7a5005d772f Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 14:19:49 -0500 Subject: [PATCH 57/95] bringing scale down back --- .../clusterloader2/slo/config/load-config.yaml | 4 ++-- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 2c5349f9ae..1de5629bf0 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From a0f3846356af9668d7ac1335afb50bd60aca83a3 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 14:48:00 -0500 Subject: [PATCH 58/95] cleanup --- jobs/competitive-test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} From c6fc264c2ef8d78734047e7687aa32f72faa92ba Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 15:16:27 -0500 Subject: [PATCH 59/95] changes --- .../slo/config/load-config.yaml | 142 +++++++++--------- .../config/modules/ciliumnetworkpolicy.yaml | 2 +- .../clusterloader2/slo/process_template.py | 18 --- modules/python/clusterloader2/slo/randomNs.py | 18 --- .../cilium-usercluster/validate-resources.yml | 12 +- 5 files changed, 80 insertions(+), 112 deletions(-) delete mode 100644 modules/python/clusterloader2/slo/process_template.py delete mode 100644 modules/python/clusterloader2/slo/randomNs.py diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 1de5629bf0..f08d438fad 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,75 +146,79 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart - -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart + + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml index cc72a85300..70123fa87d 100644 --- a/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml +++ b/modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.yaml @@ -7,7 +7,7 @@ {{$Group := .Group}} steps: -- name: "{{$actionName}} {{$cnpsPerNamespace}} k8s CNPs" +- name: "{{$actionName}} k8s CNPs" phases: - namespaceRange: min: 1 diff --git a/modules/python/clusterloader2/slo/process_template.py b/modules/python/clusterloader2/slo/process_template.py deleted file mode 100644 index 7f5f16d91d..0000000000 --- a/modules/python/clusterloader2/slo/process_template.py +++ /dev/null @@ -1,18 +0,0 @@ -import os - -# Read the random namespace from the file -with open("random_namespace.txt", "r") as file: - random_namespace = file.read().strip() - -# Read the template file -with open("cnp_template.yaml", "r") as file: - template = file.read() - -# Replace the placeholder with the random namespace -template = template.replace("{{$randomNamespace}}", random_namespace) - -# Write the processed template back to the same file -with open("cnp_template.yaml", "w") as file: - file.write(template) - -print("Processed template written to cnp_template.yaml") \ No newline at end of file diff --git a/modules/python/clusterloader2/slo/randomNs.py b/modules/python/clusterloader2/slo/randomNs.py deleted file mode 100644 index a795f7baef..0000000000 --- a/modules/python/clusterloader2/slo/randomNs.py +++ /dev/null @@ -1,18 +0,0 @@ -import random - -namespaces = ["slo-1", "slo-2"] -namespace = "{{.Namespace}}" -randomNamespace = "" - -while randomNamespace == "": - randomIndex = random.randint(0, len(namespaces) - 1) - if namespaces[randomIndex] != namespace: - randomNamespace = namespaces[randomIndex] - break - -def get_random_namespace(): - return randomNamespace - -# Write the random namespace to a file -with open("random_namespace.txt", "w") as file: - file.write(get_random_namespace()) \ No newline at end of file diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 37df61848a..306e0c74bb 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - # parameters: - # role: ces - # region: ${{ parameters.regions[0] }} - # nodes_per_nodepool: 500 - # enable_autoscale: "false" + - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 500 + enable_autoscale: "false" From 1492857998cf0800495c71f564acd30338e8eeb2 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 15:21:47 -0500 Subject: [PATCH 60/95] temp --- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 6cc60a1ecd35c49d7b355a7980cc3f5a67450346 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 16:46:48 -0500 Subject: [PATCH 61/95] scale cluster temp --- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 306e0c74bb..37df61848a 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 500 - enable_autoscale: "false" + # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + # parameters: + # role: ces + # region: ${{ parameters.regions[0] }} + # nodes_per_nodepool: 500 + # enable_autoscale: "false" From a478cbc6282acbd21fee85a9a6c2b757d8f92f6d Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 17:08:43 -0500 Subject: [PATCH 62/95] testing something --- jobs/competitive-test.yml | 14 +-- .../slo/config/load-config.yaml | 100 +++++++++--------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index f08d438fad..75e0119d8e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: @@ -171,54 +171,54 @@ steps: Group: {{$groupName}} deploymentLabel: restart - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# ccnps: 0 +# {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From bb2e010947dc465cf3b500f92bac1eb26f5eb4ec Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 18:26:14 -0500 Subject: [PATCH 63/95] cleanup back --- jobs/competitive-test.yml | 14 +-- .../slo/config/load-config.yaml | 100 +++++++++--------- .../collect-clusterloader2.yml | 12 +-- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 75e0119d8e..f08d438fad 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: @@ -171,54 +171,54 @@ steps: Group: {{$groupName}} deploymentLabel: restart -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 721421edad46dad0f0cf115f7ad45eb80a24ce0a Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Tue, 11 Feb 2025 20:31:35 -0500 Subject: [PATCH 64/95] scale cluster back --- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 37df61848a..306e0c74bb 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - # parameters: - # role: ces - # region: ${{ parameters.regions[0] }} - # nodes_per_nodepool: 500 - # enable_autoscale: "false" + - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 500 + enable_autoscale: "false" From d697a05f19782cca8429ca11d587dfcb94826925 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 08:59:25 -0500 Subject: [PATCH 65/95] debug --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 150 +++++++++--------- .../collect-clusterloader2.yml | 12 +- 3 files changed, 88 insertions(+), 88 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index f08d438fad..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: @@ -146,79 +146,79 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart - - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart + +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# ccnps: 0 +# {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 67a98f4709a499e7bb0b88de1e174f8989b07dd1 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 11:32:19 -0500 Subject: [PATCH 66/95] debug --- .../slo/config/load-config.yaml | 48 +++++++++---------- .../cilium-usercluster/validate-resources.yml | 12 ++--- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..75e0119d8e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 306e0c74bb..37df61848a 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 500 - enable_autoscale: "false" + # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + # parameters: + # role: ces + # region: ${{ parameters.regions[0] }} + # nodes_per_nodepool: 500 + # enable_autoscale: "false" From 46a0aa9be2386c6fd4421e4f8b609e51f5b423a4 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 12:29:19 -0500 Subject: [PATCH 67/95] removed restart --- .../slo/config/load-config.yaml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 75e0119d8e..a11b641ee9 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart + # - module: + # path: /modules/reconcile-objects.yaml + # params: + # actionName: "restart" + # namespaces: {{$namespaces}} + # tuningSet: Sequence + # operationTimeout: {{$operationTimeout}} + # {{if or $CCNP_TEST $CNP_TEST}} + # bigDeploymentSize: 0 + # bigDeploymentsPerNamespace: 0 + # smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + # smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + # cnp_test: {{$CNP_TEST}} + # ccnp_test: {{$CCNP_TEST}} + # {{else}} + # bigDeploymentSize: {{$BIG_GROUP_SIZE}} + # bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + # smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + # smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + # {{end}} + # CpuRequest: {{$latencyPodCpu}}m + # MemoryRequest: {{$latencyPodMemory}}M + # Group: {{$groupName}} + # deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml From 2cfaa93390272b6d0770fa7c5e52e32960b4aa01 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 12:55:43 -0500 Subject: [PATCH 68/95] removed restart again --- .../slo/config/load-config.yaml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index a11b641ee9..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: - # - module: - # path: /modules/reconcile-objects.yaml - # params: - # actionName: "restart" - # namespaces: {{$namespaces}} - # tuningSet: Sequence - # operationTimeout: {{$operationTimeout}} - # {{if or $CCNP_TEST $CNP_TEST}} - # bigDeploymentSize: 0 - # bigDeploymentsPerNamespace: 0 - # smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - # smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - # cnp_test: {{$CNP_TEST}} - # ccnp_test: {{$CCNP_TEST}} - # {{else}} - # bigDeploymentSize: {{$BIG_GROUP_SIZE}} - # bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - # smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - # smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - # {{end}} - # CpuRequest: {{$latencyPodCpu}}m - # MemoryRequest: {{$latencyPodMemory}}M - # Group: {{$groupName}} - # deploymentLabel: restart +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml From eb7fff8fe19fd999ecfec8db63c8752f58fcbf8a Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 13:28:57 -0500 Subject: [PATCH 69/95] scale up again --- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 37df61848a..306e0c74bb 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - # parameters: - # role: ces - # region: ${{ parameters.regions[0] }} - # nodes_per_nodepool: 500 - # enable_autoscale: "false" + - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 500 + enable_autoscale: "false" From ea1a645a300628f3a032860b051a78746a089787 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 14:29:58 -0500 Subject: [PATCH 70/95] added cilium measreument --- .../slo/config/modules/cilium-measurements.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml b/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml index 0137b04892..8fb85aa416 100644 --- a/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml +++ b/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml @@ -206,6 +206,21 @@ steps: queries: - name: max bpf map pressure over time query: max(max_over_time(cilium_bpf_map_pressure[%v:])) by (map_name) + - Identifier: MaxCiliumBPFMapOpsTotal + Method: GenericPrometheusQuery + Params: + action: {{$action}} + metricName: Max Cilium BPF Map Ops Total + metricVersion: v1 + unit: ratio + dimensions: + - map_name + - operation + - outcome + enableViolations: true + queries: + - name: max bpf map pressure over time + query: max(max_over_time(cilium_bpf_map_pressure[%v:])) by (map_name, operation, outcome) - Identifier: MaxCiliumPoliciesLoadedCount Method: GenericPrometheusQuery Params: From 1a9e6bf750e00c4be0edd1a494a99c5152cddd53 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 15:00:31 -0500 Subject: [PATCH 71/95] no scale up --- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 306e0c74bb..37df61848a 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 500 - enable_autoscale: "false" + # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + # parameters: + # role: ces + # region: ${{ parameters.regions[0] }} + # nodes_per_nodepool: 500 + # enable_autoscale: "false" From b80ebd4f36621b572c85b51c21f59fe509ee0de0 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 15:01:17 -0500 Subject: [PATCH 72/95] fix --- .../clusterloader2/slo/config/modules/cilium-measurements.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml b/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml index 8fb85aa416..662095fa8d 100644 --- a/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml +++ b/modules/python/clusterloader2/slo/config/modules/cilium-measurements.yaml @@ -220,7 +220,7 @@ steps: enableViolations: true queries: - name: max bpf map pressure over time - query: max(max_over_time(cilium_bpf_map_pressure[%v:])) by (map_name, operation, outcome) + query: max(max_over_time(cilium_bpf_map_ops_total[%v:])) by (map_name, operation, outcome) - Identifier: MaxCiliumPoliciesLoadedCount Method: GenericPrometheusQuery Params: From bdb2b57ad76135a4198747c0f5be8103cb44f376 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 15:26:54 -0500 Subject: [PATCH 73/95] sclae --- .../cilium-usercluster/validate-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/validate-resources.yml b/steps/topology/cilium-usercluster/validate-resources.yml index 37df61848a..306e0c74bb 100644 --- a/steps/topology/cilium-usercluster/validate-resources.yml +++ b/steps/topology/cilium-usercluster/validate-resources.yml @@ -11,9 +11,9 @@ steps: parameters: role: ces region: ${{ parameters.regions[0] }} - # - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - # parameters: - # role: ces - # region: ${{ parameters.regions[0] }} - # nodes_per_nodepool: 500 - # enable_autoscale: "false" + - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 500 + enable_autoscale: "false" From a53e1de03afbafbc70cbfdcf7c0f67af13e223e6 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Thu, 13 Feb 2025 15:45:27 -0500 Subject: [PATCH 74/95] scale down added back --- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 289f0d1dd5883ae53509338523d980e03ae42494 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 14 Feb 2025 10:06:47 -0500 Subject: [PATCH 75/95] restart --- .../slo/config/load-config.yaml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..75e0119d8e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml From c48c7e119c3735cd4f6ad78fd83dcbac75ce6dc9 Mon Sep 17 00:00:00 2001 From: karina-ranadive Date: Fri, 14 Feb 2025 11:03:18 -0500 Subject: [PATCH 76/95] dont scale down --- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 3659c69dc61b983a173efe39be03d94a0ea40727 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 24 Feb 2025 11:18:57 -0500 Subject: [PATCH 77/95] restart removed --- .../slo/config/load-config.yaml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 75e0119d8e..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml From ecbc70f8ceb27b96a7977ad518e1f393da7ec4c4 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 24 Feb 2025 13:47:24 -0500 Subject: [PATCH 78/95] restart added --- .../slo/config/load-config.yaml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..75e0119d8e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml From e7def070da57704aed9b1c17e6cd6e204dc35791 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 25 Feb 2025 10:19:51 -0500 Subject: [PATCH 79/95] scheduled pipeline --- .../perf-eval/CNI Benchmark/cnp-ccnp.yml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml new file mode 100644 index 0000000000..c3d6692647 --- /dev/null +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml @@ -0,0 +1,88 @@ +trigger: none +schedules: + - cron: "0 10,22 * * *" + displayName: "10:00 AM & PM Daily" + branches: + include: + - additionstoccnp-cnpPipeline + always: true + +variables: + SCENARIO_TYPE: perf-eval + SCENARIO_NAME: cnp-ccnp + SCENARIO_VERSION: additionstoccnp-cnpPipeline + OWNER: aks + +stages: + - stage: azure_cnps + dependsOn: [] + condition: and(succeeded(), eq(variables['CNP'], 'true')) + jobs: + - template: /jobs/competitive-test.yml + parameters: + cloud: azure + regions: + - $(LOCATION) + engine: clusterloader2 + engine_input: + image: "ghcr.io/azure/clusterloader2:v20241022" + topology: cilium-usercluster + matrix: + azure_cilium: + cpu_per_node: 4 + node_count: $(NODES) + node_per_step: $(STEP_NODES) + max_pods: $(MAX_PODS_IN_NODE) + repeats: $(NUM_REPEATS) + scale_timeout: "15m" + cilium_enabled: True + network_policy: cilium + network_dataplane: cilium + service_test: False + cnp_test: $(CNP) + ccnp_test: False + num_cnps: $(CNPS_NUM) + num_ccnps: $(CCNPS_NUM) + dualstack: $(DUAL) + no_of_namespaces: $(NUMBER_NAMESPACES) + cl2_config_file: load-config.yaml + max_parallel: 2 + timeout_in_minutes: 720 + credential_type: service_connection + ssh_key_enabled: false + - stage: azure_no_cnps + dependsOn: [] + condition: and(succeeded(), eq(variables['CNP'], 'false')) + jobs: + - template: /jobs/competitive-test.yml + parameters: + cloud: azure + regions: + - $(LOCATION) + engine: clusterloader2 + engine_input: + image: "ghcr.io/azure/clusterloader2:v20241022" + topology: cilium-usercluster + matrix: + azure_cilium: + cpu_per_node: 4 + node_count: $(NODES) + node_per_step: $(STEP_NODES) + max_pods: $(MAX_PODS_IN_NODE) + repeats: $(NUM_REPEATS) + scale_timeout: "15m" + cilium_enabled: True + network_policy: cilium + network_dataplane: cilium + service_test: False + cnp_test: $(CNP) + ccnp_test: False + num_cnps: 0 + num_ccnps: 0 + dualstack: $(DUAL) + no_of_namespaces: $(NUMBER_NAMESPACES) + cl2_config_file: load-config.yaml + max_parallel: 2 + timeout_in_minutes: 720 + credential_type: service_connection + ssh_key_enabled: false From 03873af6e8a2837dcac515fcd2dfef1f9318d969 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 25 Feb 2025 11:02:58 -0500 Subject: [PATCH 80/95] restart removed --- modules/python/clusterloader2/slo/config/load-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 75e0119d8e..63b6c581a5 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -218,7 +218,7 @@ steps: # Group: {{$groupName}} # ccnps: 0 # {{end}} -# {{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From 154754c3fee9a213326b0adaac30bba6b0dbdafb Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 25 Feb 2025 14:18:37 -0500 Subject: [PATCH 81/95] restart removed --- .../slo/config/load-config.yaml | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 63b6c581a5..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,30 +146,30 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart # - module: # path: /modules/reconcile-objects.yaml @@ -218,7 +218,7 @@ steps: # Group: {{$groupName}} # ccnps: 0 # {{end}} -{{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From db6bec1be1e6bdc784249d3ea981634f3c81a7ec Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 25 Feb 2025 15:54:30 -0500 Subject: [PATCH 82/95] scheduled pipelines --- .../CNI Benchmark/baseline-cnp-ccnp.yml | 51 +++++++++++ .../perf-eval/CNI Benchmark/cnp-ccnp.yaml | 51 +++++++++++ .../perf-eval/CNI Benchmark/cnp-ccnp.yml | 88 ------------------- 3 files changed, 102 insertions(+), 88 deletions(-) create mode 100644 pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml create mode 100644 pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml delete mode 100644 pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml diff --git a/pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml b/pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml new file mode 100644 index 0000000000..76af531799 --- /dev/null +++ b/pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml @@ -0,0 +1,51 @@ +trigger: none +schedules: + - cron: "0 4,16 * * *" + displayName: "4:00 AM & PM Daily" + branches: + include: + - main + always: true + +variables: + SCENARIO_TYPE: perf-eval + SCENARIO_NAME: baseline-cnp-ccnp + SCENARIO_VERSION: additionstoccnp-cnpPipeline + OWNER: aks + +stages: + - stage: azure_cnp_ccnp + dependsOn: [] + jobs: + - template: /jobs/competitive-test.yml + parameters: + cloud: azure + regions: + - $(LOCATION) + engine: clusterloader2 + engine_input: + image: "ghcr.io/azure/clusterloader2:v20241022" + topology: cilium-usercluster + matrix: + azure_cilium: + cpu_per_node: 4 + node_count: $(NODES) + node_per_step: $(STEP_NODES) + max_pods: $(MAX_PODS_IN_NODE) + repeats: $(NUM_REPEATS) + scale_timeout: "15m" + cilium_enabled: True + network_policy: cilium + network_dataplane: cilium + service_test: False + cnp_test: False + ccnp_test: False + num_cnps: 0 + num_ccnps: 0 + dualstack: $(DUAL) + no_of_namespaces: $(NUMBER_NAMESPACES) + cl2_config_file: load-config.yaml + max_parallel: 2 + timeout_in_minutes: 720 + credential_type: service_connection + ssh_key_enabled: false diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml new file mode 100644 index 0000000000..ba687738a1 --- /dev/null +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml @@ -0,0 +1,51 @@ +trigger: none +schedules: + - cron: "0 4,16 * * *" + displayName: "4:00 AM & PM Daily" + branches: + include: + - main + always: true + +variables: + SCENARIO_TYPE: perf-eval + SCENARIO_NAME: cnp-ccnp + SCENARIO_VERSION: additionstoccnp-cnpPipeline + OWNER: aks + +stages: + - stage: azure_cnp_ccnp + dependsOn: [] + jobs: + - template: /jobs/competitive-test.yml + parameters: + cloud: azure + regions: + - $(LOCATION) + engine: clusterloader2 + engine_input: + image: "ghcr.io/azure/clusterloader2:v20241022" + topology: cilium-usercluster + matrix: + azure_cilium: + cpu_per_node: 4 + node_count: $(NODES) + node_per_step: $(STEP_NODES) + max_pods: $(MAX_PODS_IN_NODE) + repeats: $(NUM_REPEATS) + scale_timeout: "15m" + cilium_enabled: True + network_policy: cilium + network_dataplane: cilium + service_test: False + cnp_test: $(CNP) + ccnp_test: $(CCNP) + num_cnps: $(CNPS_NUM) + num_ccnps: $(CCNPS_NUM) + dualstack: $(DUAL) + no_of_namespaces: $(NUMBER_NAMESPACES) + cl2_config_file: load-config.yaml + max_parallel: 2 + timeout_in_minutes: 720 + credential_type: service_connection + ssh_key_enabled: false diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml deleted file mode 100644 index c3d6692647..0000000000 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yml +++ /dev/null @@ -1,88 +0,0 @@ -trigger: none -schedules: - - cron: "0 10,22 * * *" - displayName: "10:00 AM & PM Daily" - branches: - include: - - additionstoccnp-cnpPipeline - always: true - -variables: - SCENARIO_TYPE: perf-eval - SCENARIO_NAME: cnp-ccnp - SCENARIO_VERSION: additionstoccnp-cnpPipeline - OWNER: aks - -stages: - - stage: azure_cnps - dependsOn: [] - condition: and(succeeded(), eq(variables['CNP'], 'true')) - jobs: - - template: /jobs/competitive-test.yml - parameters: - cloud: azure - regions: - - $(LOCATION) - engine: clusterloader2 - engine_input: - image: "ghcr.io/azure/clusterloader2:v20241022" - topology: cilium-usercluster - matrix: - azure_cilium: - cpu_per_node: 4 - node_count: $(NODES) - node_per_step: $(STEP_NODES) - max_pods: $(MAX_PODS_IN_NODE) - repeats: $(NUM_REPEATS) - scale_timeout: "15m" - cilium_enabled: True - network_policy: cilium - network_dataplane: cilium - service_test: False - cnp_test: $(CNP) - ccnp_test: False - num_cnps: $(CNPS_NUM) - num_ccnps: $(CCNPS_NUM) - dualstack: $(DUAL) - no_of_namespaces: $(NUMBER_NAMESPACES) - cl2_config_file: load-config.yaml - max_parallel: 2 - timeout_in_minutes: 720 - credential_type: service_connection - ssh_key_enabled: false - - stage: azure_no_cnps - dependsOn: [] - condition: and(succeeded(), eq(variables['CNP'], 'false')) - jobs: - - template: /jobs/competitive-test.yml - parameters: - cloud: azure - regions: - - $(LOCATION) - engine: clusterloader2 - engine_input: - image: "ghcr.io/azure/clusterloader2:v20241022" - topology: cilium-usercluster - matrix: - azure_cilium: - cpu_per_node: 4 - node_count: $(NODES) - node_per_step: $(STEP_NODES) - max_pods: $(MAX_PODS_IN_NODE) - repeats: $(NUM_REPEATS) - scale_timeout: "15m" - cilium_enabled: True - network_policy: cilium - network_dataplane: cilium - service_test: False - cnp_test: $(CNP) - ccnp_test: False - num_cnps: 0 - num_ccnps: 0 - dualstack: $(DUAL) - no_of_namespaces: $(NUMBER_NAMESPACES) - cl2_config_file: load-config.yaml - max_parallel: 2 - timeout_in_minutes: 720 - credential_type: service_connection - ssh_key_enabled: false From e6ddc803fe67acdb73d2bbb9042748daf441d915 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 25 Feb 2025 16:02:24 -0500 Subject: [PATCH 83/95] commented out schedule --- pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml index ba687738a1..0c3ab4feba 100644 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml +++ b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml @@ -1,11 +1,11 @@ trigger: none -schedules: - - cron: "0 4,16 * * *" - displayName: "4:00 AM & PM Daily" - branches: - include: - - main - always: true +# schedules: +# - cron: "0 4,16 * * *" +# displayName: "4:00 AM & PM Daily" +# branches: +# include: +# - main +# always: true variables: SCENARIO_TYPE: perf-eval From 397866757ece8ecb33bc713a0f9fbbc5a80cc8c2 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 3 Mar 2025 16:07:52 -0500 Subject: [PATCH 84/95] changes --- .../slo/config/load-config.yaml | 4 +- .../CNI Benchmark/baseline-cnp-ccnp.yml | 51 ------------------- .../perf-eval/CNI Benchmark/cnp-ccnp.yaml | 51 ------------------- 3 files changed, 2 insertions(+), 104 deletions(-) delete mode 100644 pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml delete mode 100644 pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..fccdfe9085 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: diff --git a/pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml b/pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml deleted file mode 100644 index 76af531799..0000000000 --- a/pipelines/perf-eval/CNI Benchmark/baseline-cnp-ccnp.yml +++ /dev/null @@ -1,51 +0,0 @@ -trigger: none -schedules: - - cron: "0 4,16 * * *" - displayName: "4:00 AM & PM Daily" - branches: - include: - - main - always: true - -variables: - SCENARIO_TYPE: perf-eval - SCENARIO_NAME: baseline-cnp-ccnp - SCENARIO_VERSION: additionstoccnp-cnpPipeline - OWNER: aks - -stages: - - stage: azure_cnp_ccnp - dependsOn: [] - jobs: - - template: /jobs/competitive-test.yml - parameters: - cloud: azure - regions: - - $(LOCATION) - engine: clusterloader2 - engine_input: - image: "ghcr.io/azure/clusterloader2:v20241022" - topology: cilium-usercluster - matrix: - azure_cilium: - cpu_per_node: 4 - node_count: $(NODES) - node_per_step: $(STEP_NODES) - max_pods: $(MAX_PODS_IN_NODE) - repeats: $(NUM_REPEATS) - scale_timeout: "15m" - cilium_enabled: True - network_policy: cilium - network_dataplane: cilium - service_test: False - cnp_test: False - ccnp_test: False - num_cnps: 0 - num_ccnps: 0 - dualstack: $(DUAL) - no_of_namespaces: $(NUMBER_NAMESPACES) - cl2_config_file: load-config.yaml - max_parallel: 2 - timeout_in_minutes: 720 - credential_type: service_connection - ssh_key_enabled: false diff --git a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml b/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml deleted file mode 100644 index 0c3ab4feba..0000000000 --- a/pipelines/perf-eval/CNI Benchmark/cnp-ccnp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -trigger: none -# schedules: -# - cron: "0 4,16 * * *" -# displayName: "4:00 AM & PM Daily" -# branches: -# include: -# - main -# always: true - -variables: - SCENARIO_TYPE: perf-eval - SCENARIO_NAME: cnp-ccnp - SCENARIO_VERSION: additionstoccnp-cnpPipeline - OWNER: aks - -stages: - - stage: azure_cnp_ccnp - dependsOn: [] - jobs: - - template: /jobs/competitive-test.yml - parameters: - cloud: azure - regions: - - $(LOCATION) - engine: clusterloader2 - engine_input: - image: "ghcr.io/azure/clusterloader2:v20241022" - topology: cilium-usercluster - matrix: - azure_cilium: - cpu_per_node: 4 - node_count: $(NODES) - node_per_step: $(STEP_NODES) - max_pods: $(MAX_PODS_IN_NODE) - repeats: $(NUM_REPEATS) - scale_timeout: "15m" - cilium_enabled: True - network_policy: cilium - network_dataplane: cilium - service_test: False - cnp_test: $(CNP) - ccnp_test: $(CCNP) - num_cnps: $(CNPS_NUM) - num_ccnps: $(CCNPS_NUM) - dualstack: $(DUAL) - no_of_namespaces: $(NUMBER_NAMESPACES) - cl2_config_file: load-config.yaml - max_parallel: 2 - timeout_in_minutes: 720 - credential_type: service_connection - ssh_key_enabled: false From 2b9308274137f8a2e4115691aec0aee6a1270a69 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 11:15:12 -0400 Subject: [PATCH 85/95] uncomment --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 146 +++++++++--------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index fccdfe9085..f08d438fad 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,79 +146,79 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart - -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart + + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From 9e0374ad44c1619fffc60fdc9a89b3b190dd66c7 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 12:32:37 -0400 Subject: [PATCH 86/95] temp no cleanup --- jobs/competitive-test.yml | 14 +++++++------- .../clusterloader2/slo/config/load-config.yaml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index f08d438fad..448442313e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: From 475d79f032eae4893363293dfc08a6b49b93394c Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 13:22:28 -0400 Subject: [PATCH 87/95] scale cluster removed --- .../clusterloader2/cilium/scale-cluster.yml | 32 +++++++++---------- .../collect-clusterloader2.yml | 12 +++---- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index 6c65930c48..a22fa96319 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -30,22 +30,22 @@ steps: nodepools=$(az aks nodepool list --cluster-name $aks_name --resource-group $aks_rg -o json) usernodepools=$(echo $nodepools | jq -r '.[] | select(.mode == "User" and .name != "promnodepool") | .name') - for np in $usernodepools; do - currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') - - # disable autoscaler before scaling nodepool to desire node count - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler - if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then - az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} - fi - - # turn on autoscaler if test necessitates it - if [ "true" = "${{ parameters.enable_autoscale }}" ]; then - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 - fi - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true - sleep 300 - done + # for np in $usernodepools; do + # currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') + + # # disable autoscaler before scaling nodepool to desire node count + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler + # if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then + # az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} + # fi + + # # turn on autoscaler if test necessitates it + # if [ "true" = "${{ parameters.enable_autoscale }}" ]; then + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 + # fi + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true + # sleep 300 + # done env: ROLE: ${{ parameters.role }} displayName: "Scale Cluster" diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From ffcc2481cf6add61bffd02d2a934dcb3bbcd36a3 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 14:14:14 -0400 Subject: [PATCH 88/95] temp commented out restart/delete --- .../slo/config/load-config.yaml | 146 +++++++++--------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 448442313e..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -146,79 +146,79 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart - - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart + +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# ccnps: 0 +# {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: From a0863eee2a2081a4694ce2d7fdcac082d8cd70fb Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 14:39:10 -0400 Subject: [PATCH 89/95] scaling fix --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 150 +++++++++--------- .../clusterloader2/cilium/scale-cluster.yml | 32 ++-- .../collect-clusterloader2.yml | 12 +- 4 files changed, 104 insertions(+), 104 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..f08d438fad 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: @@ -146,79 +146,79 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart - -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart + + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index a22fa96319..6c65930c48 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -30,22 +30,22 @@ steps: nodepools=$(az aks nodepool list --cluster-name $aks_name --resource-group $aks_rg -o json) usernodepools=$(echo $nodepools | jq -r '.[] | select(.mode == "User" and .name != "promnodepool") | .name') - # for np in $usernodepools; do - # currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') - - # # disable autoscaler before scaling nodepool to desire node count - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler - # if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then - # az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} - # fi - - # # turn on autoscaler if test necessitates it - # if [ "true" = "${{ parameters.enable_autoscale }}" ]; then - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 - # fi - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true - # sleep 300 - # done + for np in $usernodepools; do + currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') + + # disable autoscaler before scaling nodepool to desire node count + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler + if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then + az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} + fi + + # turn on autoscaler if test necessitates it + if [ "true" = "${{ parameters.enable_autoscale }}" ]; then + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 + fi + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true + sleep 300 + done env: ROLE: ${{ parameters.role }} displayName: "Scale Cluster" diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 0127ae6a1fdb44a6736207d955bf05dc354700fe Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 16:18:02 -0400 Subject: [PATCH 90/95] scale down back --- .../cilium-usercluster/collect-clusterloader2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From da1f552a67c47c668a8ddf4733206342011d67af Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 19:38:31 -0400 Subject: [PATCH 91/95] temp --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 150 +++++++++--------- .../clusterloader2/cilium/scale-cluster.yml | 32 ++-- .../collect-clusterloader2.yml | 12 +- 4 files changed, 104 insertions(+), 104 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index f08d438fad..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: @@ -146,79 +146,79 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart - - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart + +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# ccnps: 0 +# {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index 6c65930c48..a22fa96319 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -30,22 +30,22 @@ steps: nodepools=$(az aks nodepool list --cluster-name $aks_name --resource-group $aks_rg -o json) usernodepools=$(echo $nodepools | jq -r '.[] | select(.mode == "User" and .name != "promnodepool") | .name') - for np in $usernodepools; do - currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') - - # disable autoscaler before scaling nodepool to desire node count - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler - if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then - az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} - fi - - # turn on autoscaler if test necessitates it - if [ "true" = "${{ parameters.enable_autoscale }}" ]; then - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 - fi - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true - sleep 300 - done + # for np in $usernodepools; do + # currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') + + # # disable autoscaler before scaling nodepool to desire node count + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler + # if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then + # az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} + # fi + + # # turn on autoscaler if test necessitates it + # if [ "true" = "${{ parameters.enable_autoscale }}" ]; then + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 + # fi + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true + # sleep 300 + # done env: ROLE: ${{ parameters.role }} displayName: "Scale Cluster" diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 047c18ce7a2caafd374b0c891793f3403e229ac7 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Mon, 10 Mar 2025 19:45:41 -0400 Subject: [PATCH 92/95] fix --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 150 +++++++++--------- .../clusterloader2/cilium/scale-cluster.yml | 32 ++-- 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..f08d438fad 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: @@ -146,79 +146,79 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart - -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart + + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index a22fa96319..6c65930c48 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -30,22 +30,22 @@ steps: nodepools=$(az aks nodepool list --cluster-name $aks_name --resource-group $aks_rg -o json) usernodepools=$(echo $nodepools | jq -r '.[] | select(.mode == "User" and .name != "promnodepool") | .name') - # for np in $usernodepools; do - # currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') - - # # disable autoscaler before scaling nodepool to desire node count - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler - # if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then - # az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} - # fi - - # # turn on autoscaler if test necessitates it - # if [ "true" = "${{ parameters.enable_autoscale }}" ]; then - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 - # fi - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true - # sleep 300 - # done + for np in $usernodepools; do + currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') + + # disable autoscaler before scaling nodepool to desire node count + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler + if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then + az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} + fi + + # turn on autoscaler if test necessitates it + if [ "true" = "${{ parameters.enable_autoscale }}" ]; then + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 + fi + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true + sleep 300 + done env: ROLE: ${{ parameters.role }} displayName: "Scale Cluster" From 8968fbfac5339f34476b22f54fd182b2315d3ad9 Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 11 Mar 2025 08:45:49 -0400 Subject: [PATCH 93/95] temp --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 150 +++++++++--------- .../clusterloader2/cilium/scale-cluster.yml | 26 +-- .../collect-clusterloader2.yml | 12 +- 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index c4872ad11c..116ba0e709 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - - template: /steps/cleanup-resources.yml - parameters: - cloud: ${{ parameters.cloud }} - regions: ${{ parameters.regions }} - terraform_arguments: ${{ parameters.terraform_arguments }} - retry_attempt_count: ${{ parameters.retry_attempt_count }} - credential_type: ${{ parameters.credential_type }} + # - template: /steps/cleanup-resources.yml + # parameters: + # cloud: ${{ parameters.cloud }} + # regions: ${{ parameters.regions }} + # terraform_arguments: ${{ parameters.terraform_arguments }} + # retry_attempt_count: ${{ parameters.retry_attempt_count }} + # credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index f08d438fad..57bf89807e 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: true - deleteAutomanagedNamespaces: true + deleteStaleNamespaces: false + deleteAutomanagedNamespaces: false enableExistingNamespaces: false tuningSets: @@ -146,79 +146,79 @@ steps: - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "restart" - namespaces: {{$namespaces}} - tuningSet: Sequence - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} - {{end}} - CpuRequest: {{$latencyPodCpu}}m - MemoryRequest: {{$latencyPodMemory}}M - Group: {{$groupName}} - deploymentLabel: restart - - - module: - path: /modules/reconcile-objects.yaml - params: - actionName: "delete" - namespaces: {{$namespaces}} - tuningSet: DeploymentDeleteQps - operationTimeout: {{$operationTimeout}} - {{if or $CCNP_TEST $CNP_TEST}} - bigDeploymentSize: 0 - bigDeploymentsPerNamespace: 0 - cnp_test: {{$CNP_TEST}} - ccnp_test: {{$CCNP_TEST}} - {{else}} - bigDeploymentSize: {{$BIG_GROUP_SIZE}} - bigDeploymentsPerNamespace: 0 - {{end}} - smallDeploymentSize: {{$SMALL_GROUP_SIZE}} - smallDeploymentsPerNamespace: 0 - deploymentLabel: restart - Group: {{$groupName}} -{{if $SERVICE_TEST}} - - module: - path: /modules/services.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - smallServicesPerNamespace: 0 - bigServicesPerNamespace: 0 -{{end}} -{{if $CNP_TEST}} - - module: - path: /modules/ciliumnetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - cnpsPerNamespace: 0 -{{end}} -{{if $CCNP_TEST}} - - module: - path: /modules/ciliumclusternetworkpolicy.yaml - params: - actionName: "Deleting" - namespaces: {{$namespaces}} - Group: {{$groupName}} - ccnps: 0 -{{end}} -{{end}} +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "restart" +# namespaces: {{$namespaces}} +# tuningSet: Sequence +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} +# {{end}} +# CpuRequest: {{$latencyPodCpu}}m +# MemoryRequest: {{$latencyPodMemory}}M +# Group: {{$groupName}} +# deploymentLabel: restart + +# - module: +# path: /modules/reconcile-objects.yaml +# params: +# actionName: "delete" +# namespaces: {{$namespaces}} +# tuningSet: DeploymentDeleteQps +# operationTimeout: {{$operationTimeout}} +# {{if or $CCNP_TEST $CNP_TEST}} +# bigDeploymentSize: 0 +# bigDeploymentsPerNamespace: 0 +# cnp_test: {{$CNP_TEST}} +# ccnp_test: {{$CCNP_TEST}} +# {{else}} +# bigDeploymentSize: {{$BIG_GROUP_SIZE}} +# bigDeploymentsPerNamespace: 0 +# {{end}} +# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} +# smallDeploymentsPerNamespace: 0 +# deploymentLabel: restart +# Group: {{$groupName}} +# {{if $SERVICE_TEST}} +# - module: +# path: /modules/services.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# smallServicesPerNamespace: 0 +# bigServicesPerNamespace: 0 +# {{end}} +# {{if $CNP_TEST}} +# - module: +# path: /modules/ciliumnetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# cnpsPerNamespace: 0 +# {{end}} +# {{if $CCNP_TEST}} +# - module: +# path: /modules/ciliumclusternetworkpolicy.yaml +# params: +# actionName: "Deleting" +# namespaces: {{$namespaces}} +# Group: {{$groupName}} +# ccnps: 0 +# {{end}} +# {{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index 6c65930c48..ea17528065 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -33,19 +33,19 @@ steps: for np in $usernodepools; do currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') - # disable autoscaler before scaling nodepool to desire node count - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler - if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then - az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} - fi - - # turn on autoscaler if test necessitates it - if [ "true" = "${{ parameters.enable_autoscale }}" ]; then - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 - fi - az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true - sleep 300 - done + # # disable autoscaler before scaling nodepool to desire node count + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler + # if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then + # az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} + # fi + + # # turn on autoscaler if test necessitates it + # if [ "true" = "${{ parameters.enable_autoscale }}" ]; then + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 + # fi + # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true + # sleep 300 + # done env: ROLE: ${{ parameters.role }} displayName: "Scale Cluster" diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index 39de4a3608..c5e1d59d67 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml -# parameters: -# role: ces -# region: ${{ parameters.regions[0] }} -# nodes_per_nodepool: 0 -# enable_autoscale: "false" +- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml + parameters: + role: ces + region: ${{ parameters.regions[0] }} + nodes_per_nodepool: 0 + enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId) From 073699bb5136382e3b5a890206a22a65d7d85d4a Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Tue, 11 Mar 2025 08:50:39 -0400 Subject: [PATCH 94/95] fix temp --- steps/engine/clusterloader2/cilium/scale-cluster.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index ea17528065..a22fa96319 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -30,8 +30,8 @@ steps: nodepools=$(az aks nodepool list --cluster-name $aks_name --resource-group $aks_rg -o json) usernodepools=$(echo $nodepools | jq -r '.[] | select(.mode == "User" and .name != "promnodepool") | .name') - for np in $usernodepools; do - currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') + # for np in $usernodepools; do + # currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') # # disable autoscaler before scaling nodepool to desire node count # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler From f005efc4c44398fd5678c4d9d5bb71edbea15a0a Mon Sep 17 00:00:00 2001 From: Karina Ranadive Date: Wed, 12 Mar 2025 16:47:51 -0400 Subject: [PATCH 95/95] adjusted --- jobs/competitive-test.yml | 14 +- .../slo/config/load-config.yaml | 150 +++++++++--------- .../clusterloader2/cilium/scale-cluster.yml | 32 ++-- .../collect-clusterloader2.yml | 12 +- 4 files changed, 104 insertions(+), 104 deletions(-) diff --git a/jobs/competitive-test.yml b/jobs/competitive-test.yml index 116ba0e709..c4872ad11c 100644 --- a/jobs/competitive-test.yml +++ b/jobs/competitive-test.yml @@ -97,10 +97,10 @@ jobs: regions: ${{ parameters.regions }} engine_input: ${{ parameters.engine_input }} credential_type: ${{ parameters.credential_type }} - # - template: /steps/cleanup-resources.yml - # parameters: - # cloud: ${{ parameters.cloud }} - # regions: ${{ parameters.regions }} - # terraform_arguments: ${{ parameters.terraform_arguments }} - # retry_attempt_count: ${{ parameters.retry_attempt_count }} - # credential_type: ${{ parameters.credential_type }} + - template: /steps/cleanup-resources.yml + parameters: + cloud: ${{ parameters.cloud }} + regions: ${{ parameters.regions }} + terraform_arguments: ${{ parameters.terraform_arguments }} + retry_attempt_count: ${{ parameters.retry_attempt_count }} + credential_type: ${{ parameters.credential_type }} diff --git a/modules/python/clusterloader2/slo/config/load-config.yaml b/modules/python/clusterloader2/slo/config/load-config.yaml index 57bf89807e..f08d438fad 100644 --- a/modules/python/clusterloader2/slo/config/load-config.yaml +++ b/modules/python/clusterloader2/slo/config/load-config.yaml @@ -52,8 +52,8 @@ name: load-config namespace: number: {{$namespaces}} prefix: slo - deleteStaleNamespaces: false - deleteAutomanagedNamespaces: false + deleteStaleNamespaces: true + deleteAutomanagedNamespaces: true enableExistingNamespaces: false tuningSets: @@ -146,79 +146,79 @@ steps: -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "restart" -# namespaces: {{$namespaces}} -# tuningSet: Sequence -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} -# {{end}} -# CpuRequest: {{$latencyPodCpu}}m -# MemoryRequest: {{$latencyPodMemory}}M -# Group: {{$groupName}} -# deploymentLabel: restart - -# - module: -# path: /modules/reconcile-objects.yaml -# params: -# actionName: "delete" -# namespaces: {{$namespaces}} -# tuningSet: DeploymentDeleteQps -# operationTimeout: {{$operationTimeout}} -# {{if or $CCNP_TEST $CNP_TEST}} -# bigDeploymentSize: 0 -# bigDeploymentsPerNamespace: 0 -# cnp_test: {{$CNP_TEST}} -# ccnp_test: {{$CCNP_TEST}} -# {{else}} -# bigDeploymentSize: {{$BIG_GROUP_SIZE}} -# bigDeploymentsPerNamespace: 0 -# {{end}} -# smallDeploymentSize: {{$SMALL_GROUP_SIZE}} -# smallDeploymentsPerNamespace: 0 -# deploymentLabel: restart -# Group: {{$groupName}} -# {{if $SERVICE_TEST}} -# - module: -# path: /modules/services.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# smallServicesPerNamespace: 0 -# bigServicesPerNamespace: 0 -# {{end}} -# {{if $CNP_TEST}} -# - module: -# path: /modules/ciliumnetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# cnpsPerNamespace: 0 -# {{end}} -# {{if $CCNP_TEST}} -# - module: -# path: /modules/ciliumclusternetworkpolicy.yaml -# params: -# actionName: "Deleting" -# namespaces: {{$namespaces}} -# Group: {{$groupName}} -# ccnps: 0 -# {{end}} -# {{end}} + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "restart" + namespaces: {{$namespaces}} + tuningSet: Sequence + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}} + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}} + {{end}} + CpuRequest: {{$latencyPodCpu}}m + MemoryRequest: {{$latencyPodMemory}}M + Group: {{$groupName}} + deploymentLabel: restart + + - module: + path: /modules/reconcile-objects.yaml + params: + actionName: "delete" + namespaces: {{$namespaces}} + tuningSet: DeploymentDeleteQps + operationTimeout: {{$operationTimeout}} + {{if or $CCNP_TEST $CNP_TEST}} + bigDeploymentSize: 0 + bigDeploymentsPerNamespace: 0 + cnp_test: {{$CNP_TEST}} + ccnp_test: {{$CCNP_TEST}} + {{else}} + bigDeploymentSize: {{$BIG_GROUP_SIZE}} + bigDeploymentsPerNamespace: 0 + {{end}} + smallDeploymentSize: {{$SMALL_GROUP_SIZE}} + smallDeploymentsPerNamespace: 0 + deploymentLabel: restart + Group: {{$groupName}} +{{if $SERVICE_TEST}} + - module: + path: /modules/services.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + smallServicesPerNamespace: 0 + bigServicesPerNamespace: 0 +{{end}} +{{if $CNP_TEST}} + - module: + path: /modules/ciliumnetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + cnpsPerNamespace: 0 +{{end}} +{{if $CCNP_TEST}} + - module: + path: /modules/ciliumclusternetworkpolicy.yaml + params: + actionName: "Deleting" + namespaces: {{$namespaces}} + Group: {{$groupName}} + ccnps: 0 +{{end}} +{{end}} {{if $CILIUM_METRICS_ENABLED}} - module: diff --git a/steps/engine/clusterloader2/cilium/scale-cluster.yml b/steps/engine/clusterloader2/cilium/scale-cluster.yml index a22fa96319..6c65930c48 100644 --- a/steps/engine/clusterloader2/cilium/scale-cluster.yml +++ b/steps/engine/clusterloader2/cilium/scale-cluster.yml @@ -30,22 +30,22 @@ steps: nodepools=$(az aks nodepool list --cluster-name $aks_name --resource-group $aks_rg -o json) usernodepools=$(echo $nodepools | jq -r '.[] | select(.mode == "User" and .name != "promnodepool") | .name') - # for np in $usernodepools; do - # currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') - - # # disable autoscaler before scaling nodepool to desire node count - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler - # if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then - # az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} - # fi - - # # turn on autoscaler if test necessitates it - # if [ "true" = "${{ parameters.enable_autoscale }}" ]; then - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 - # fi - # az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true - # sleep 300 - # done + for np in $usernodepools; do + currentnodes=$(az aks nodepool show --cluster-name $aks_name --name $np --resource-group $aks_rg | jq '.count') + + # disable autoscaler before scaling nodepool to desire node count + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --disable-cluster-autoscaler + if [ "$currentnodes" != "${{ parameters.nodes_per_nodepool }}" ]; then + az aks nodepool scale --cluster-name $aks_name --name $np --resource-group $aks_rg -c ${{ parameters.nodes_per_nodepool }} + fi + + # turn on autoscaler if test necessitates it + if [ "true" = "${{ parameters.enable_autoscale }}" ]; then + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --enable-cluster-autoscaler --min-count 0 --max-count 500 + fi + az aks nodepool update --cluster-name $aks_name --name $np --resource-group $aks_rg --node-taints "slo=true:NoSchedule" --labels slo=true + sleep 300 + done env: ROLE: ${{ parameters.role }} displayName: "Scale Cluster" diff --git a/steps/topology/cilium-usercluster/collect-clusterloader2.yml b/steps/topology/cilium-usercluster/collect-clusterloader2.yml index c5e1d59d67..39de4a3608 100644 --- a/steps/topology/cilium-usercluster/collect-clusterloader2.yml +++ b/steps/topology/cilium-usercluster/collect-clusterloader2.yml @@ -16,12 +16,12 @@ steps: engine_input: ${{ parameters.engine_input }} region: ${{ parameters.regions[0] }} -- template: /steps/engine/clusterloader2/cilium/scale-cluster.yml - parameters: - role: ces - region: ${{ parameters.regions[0] }} - nodes_per_nodepool: 0 - enable_autoscale: "false" +# - template: /steps/engine/clusterloader2/cilium/scale-cluster.yml +# parameters: +# role: ces +# region: ${{ parameters.regions[0] }} +# nodes_per_nodepool: 0 +# enable_autoscale: "false" - script: | run_id=$(Build.BuildId)-$(System.JobId)