k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/measurement/common/dns/manifests/dns-client.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: dnsperfgo 5 namespace: {{.Namespace}} 6 spec: 7 replicas: {{.PodReplicas}} 8 selector: 9 matchLabels: 10 dns-test: dnsperfgo 11 template: 12 metadata: 13 labels: 14 dns-test: dnsperfgo 15 spec: 16 containers: 17 - name: dnsperfgo 18 ports: 19 - containerPort: 9153 20 name: dnsperfmetrics 21 protocol: TCP 22 image: gcr.io/k8s-staging-perf-tests/dnsperfgo:v1.3.0 23 # Fetches the dns server from /etc/resolv.conf and sends 10 queries per second. 24 # With searchpath expansion, this is 120 queries per second. 25 # External names like google.com are expanded to 12 queries. 26 # FQDN lookups like kubernetes.default.svc.cluster.local are also expanded to 12 queries since they have < 5 dots in the name. 27 # Names like kubernetes.default will get partial search path expansion, since the query will succeed once "svc.cluster.local" path is applied. 28 # -query-cluster-names flag will generate FQDNs, in order to exercise searchpath expansion. 29 # dnsperf has a client timeout of 5s. It sends queries for 60s, 30 # then sleeps for 10s, to mimic bursts of DNS queries. 31 command: 32 - sh 33 - -c 34 - server=$(cat /etc/resolv.conf | grep nameserver | cut -d ' ' -f 2); echo 35 "Using nameserver ${server}"; 36 ./dnsperfgo -duration 60s -idle-duration 10s -query-cluster-names -qps {{.QPSPerClient}}; 37 resources: 38 requests: 39 cpu: 10m 40 memory: 10M 41 serviceAccountName: {{.ServiceAccountName}} 42 terminationGracePeriodSeconds: 1 43 # Add not-ready/unreachable tolerations for 15 minutes so that node 44 # failure doesn't trigger pod deletion. 45 tolerations: 46 - key: "node.kubernetes.io/not-ready" 47 operator: "Exists" 48 effect: "NoExecute" 49 tolerationSeconds: 900 50 - key: "node.kubernetes.io/unreachable" 51 operator: "Exists" 52 effect: "NoExecute" 53 tolerationSeconds: 900