Skip to content

Commit

Permalink
add inclusternetworklatency variable and arm64 toleration
Browse files Browse the repository at this point in the history
  • Loading branch information
amacaskill committed Jul 21, 2022
1 parent f726928 commit f7c1fd7
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clusterloader2/testing/huge-service/modules/measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE := DefaultParam .CL2_ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE true}}

{{$CUSTOM_API_CALL_THRESHOLDS := DefaultParam .CUSTOM_API_CALL_THRESHOLDS ""}}
{{$ENABLE_IN_CLUSTER_NETWORK_LATENCY := DefaultParam .CL2_ENABLE_IN_CLUSTER_NETWORK_LATENCY true}}
{{$ENABLE_RESTART_COUNT_CHECK := DefaultParam .ENABLE_RESTART_COUNT_CHECK true}}
{{$ENABLE_SYSTEM_POD_METRICS := DefaultParam .ENABLE_SYSTEM_POD_METRICS true}}
{{$RESTART_COUNT_THRESHOLD_OVERRIDES := DefaultParam .RESTART_COUNT_THRESHOLD_OVERRIDES ""}}
Expand Down Expand Up @@ -50,12 +51,14 @@ steps:
enableRestartCountCheck: {{$ENABLE_RESTART_COUNT_CHECK}}
clusterOOMsIgnoredProcesses: {{YamlQuote $CLUSTER_OOMS_IGNORED_PROCESSES 4}}
clusterOOMsTrackerEnabled: {{$ENABLE_CLUSTER_OOMS_TRACKER}}
{{if $ENABLE_IN_CLUSTER_NETWORK_LATENCY}}
- Identifier: InClusterNetworkLatency
Method: InClusterNetworkLatency
Params:
action: {{$action}}
checkProbesReadyTimeout: {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT}}
replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}}
{{end}}
{{if $ENABLE_CONTAINER_RESTARTS_MEASUREMENT}}
- Identifier: ContainerRestarts
Method: ContainerRestarts
Expand Down
8 changes: 8 additions & 0 deletions clusterloader2/testing/load/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{$Image := DefaultParam .Image "k8s.gcr.io/pause:3.1"}}
{{$Env := DefaultParam .Env ""}}
{{$DaemonSetSurge := DefaultParam .CL2_DS_SURGE (MaxInt 10 (DivideInt .Nodes 20))}} # 5% of nodes, but not less than 10
{{$RUN_ON_ARM_NODES := DefaultParam .CL2_RUN_ON_ARM_NODES false}}

apiVersion: apps/v1
kind: DaemonSet
Expand Down Expand Up @@ -37,3 +38,10 @@ spec:
memory: "20M"
priorityClassName: daemonset-priorityclass-0 # Name is autogenerated, hence the -0 prefix.
terminationGracePeriodSeconds: 1
tolerations:
{{if $RUN_ON_ARM_NODES}}
- key: "kubernetes.io/arch"
operator: Equal
value: arm64
effect: NoSchedule
{{end}}
7 changes: 7 additions & 0 deletions clusterloader2/testing/load/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{{$dnsQPSPerClient := DefaultParam .CL2_DNS_QPS_PER_CLIENT 1}}
# Guard the new DNS tests. Remove it once it's confirmed that it works on a subset of tests.
{{$USE_ADVANCED_DNSTEST := DefaultParam .CL2_USE_ADVANCED_DNSTEST false}}
{{$RUN_ON_ARM_NODES := DefaultParam .CL2_RUN_ON_ARM_NODES false}}

apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -78,6 +79,12 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
{{if $RUN_ON_ARM_NODES}}
- key: "kubernetes.io/arch"
operator: Equal
value: arm64
effect: NoSchedule
{{end}}
volumes:
- name: configmap
configMap:
Expand Down
7 changes: 7 additions & 0 deletions clusterloader2/testing/load/job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{$HostNetworkMode := DefaultParam .CL2_USE_HOST_NETWORK_PODS false}}
{{$RUN_ON_ARM_NODES := DefaultParam .CL2_RUN_ON_ARM_NODES false}}

apiVersion: batch/v1
kind: Job
Expand Down Expand Up @@ -43,3 +44,9 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
{{if $RUN_ON_ARM_NODES}}
- key: "kubernetes.io/arch"
operator: Equal
value: arm64
effect: NoSchedule
{{end}}
6 changes: 6 additions & 0 deletions clusterloader2/testing/load/modules/measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
{{$CLUSTER_OOMS_IGNORED_PROCESSES := DefaultParam .CL2_CLUSTER_OOMS_IGNORED_PROCESSES ""}}
{{$CUSTOM_API_CALL_THRESHOLDS := DefaultParam .CUSTOM_API_CALL_THRESHOLDS ""}}
{{$ENABLE_API_AVAILABILITY_MEASUREMENT := DefaultParam .CL2_ENABLE_API_AVAILABILITY_MEASUREMENT false}}
{{$ENABLE_IN_CLUSTER_NETWORK_LATENCY := DefaultParam .CL2_ENABLE_IN_CLUSTER_NETWORK_LATENCY true}}
{{$ENABLE_SLO_MEASUREMENT := DefaultParam .CL2_ENABLE_SLO_MEASUREMENT true}}
{{$ENABLE_CLUSTER_OOMS_TRACKER := DefaultParam .CL2_ENABLE_CLUSTER_OOMS_TRACKER true}}
{{$ENABLE_DNSTESTS := DefaultParam .CL2_ENABLE_DNSTESTS false}}
# Guard the new DNS tests. Remove it once it's confirmed that it works on a subset of tests.
Expand Down Expand Up @@ -64,12 +66,14 @@ steps:
action: {{$action}}
labelSelector: group = load
threshold: 1h # TODO(https://github.com/kubernetes/perf-tests/issues/1024): Ideally, this should be 5s
{{if $ENABLE_IN_CLUSTER_NETWORK_LATENCY}}
- Identifier: InClusterNetworkLatency
Method: InClusterNetworkLatency
Params:
action: {{$action}}
checkProbesReadyTimeout: {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT}}
replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}}
{{end}}
{{if $ENABLE_NODE_LOCAL_DNS_LATENCY}}
- Identifier: NodeLocalDNSLatency
Method: NodeLocalDNSLatencyPrometheus
Expand All @@ -78,12 +82,14 @@ steps:
enableViolations: true
threshold: {{$NODE_LOCAL_DNS_LATENCY_THRESHOLD}}
{{end}}
{{if $ENABLE_SLO_MEASUREMENT}}
- Identifier: SLOMeasurement
Method: SLOMeasurement
Params:
action: {{$action}}
checkProbesReadyTimeout: {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT}}
replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}}
{{end}}
{{if $PROMETHEUS_SCRAPE_KUBE_PROXY}}
- Identifier: NetworkProgrammingLatency
Method: NetworkProgrammingLatency
Expand Down
7 changes: 7 additions & 0 deletions clusterloader2/testing/load/simple-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{$CpuRequest := DefaultParam .CpuRequest "5m"}}
{{$MemoryRequest := DefaultParam .MemoryRequest "20M"}}
{{$Image := DefaultParam .Image "k8s.gcr.io/pause:3.1"}}
{{$RUN_ON_ARM_NODES := DefaultParam .CL2_RUN_ON_ARM_NODES false}}

apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -46,3 +47,9 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
{{if $RUN_ON_ARM_NODES}}
- key: "kubernetes.io/arch"
operator: Equal
value: arm64
effect: NoSchedule
{{end}}
7 changes: 7 additions & 0 deletions clusterloader2/testing/load/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{$HostNetworkMode := DefaultParam .CL2_USE_HOST_NETWORK_PODS false}}
{{$EnablePVs := DefaultParam .CL2_ENABLE_PVS true}}
{{$RUN_ON_ARM_NODES := DefaultParam .CL2_RUN_ON_ARM_NODES false}}

apiVersion: apps/v1
kind: StatefulSet
Expand Down Expand Up @@ -51,6 +52,12 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
{{if $RUN_ON_ARM_NODES}}
- key: "kubernetes.io/arch"
operator: Equal
value: arm64
effect: NoSchedule
{{end}}
{{if $EnablePVs}}
# NOTE: PVs created this way should be cleaned-up manually, as deleting the StatefulSet doesn't automatically delete PVs.
# To avoid deleting all the PVs at once during namespace deletion, they should be deleted explicitly via Phase.
Expand Down

0 comments on commit f7c1fd7

Please sign in to comment.