runtime-parameters.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. podSecurityContext:
  2. fsGroup: 1002
  3. containerSecurityContext:
  4. runAsUser: 1002
  5. containerPorts:
  6. http: 6555
  7. configOverrides:
  8. AUTOCOMPLETE_TTL: "1000000"
  9. secretConfigOverrides:
  10. QUERY_NAMES_MAX_AGE: "600"
  11. replicaCount: 1
  12. service:
  13. type: LoadBalancer
  14. ports:
  15. http: 80
  16. metrics:
  17. enabled: true
  18. extraDeploy:
  19. # Job to push some data to the Zipkin instance
  20. - |
  21. apiVersion: batch/v1
  22. kind: Job
  23. metadata:
  24. name: zipkin-add-data
  25. spec:
  26. template:
  27. spec:
  28. restartPolicy: OnFailure
  29. containers:
  30. - name: zipkin-job
  31. image: docker.io/bitnami/os-shell:latest
  32. command:
  33. - /bin/bash
  34. args:
  35. - -ec
  36. - |
  37. set -o errexit
  38. set -o nounset
  39. set -o pipefail
  40. # Set the endpoint URL
  41. host=zipkin
  42. port={{ .Values.service.ports.http }}
  43. retry_while() {
  44. local -r cmd="${1:?cmd is missing}"
  45. local -r retries="${2:-12}"
  46. local -r sleep_time="${3:-5}"
  47. local return_value=1
  48. read -r -a command <<< "$cmd"
  49. for ((i = 1 ; i <= retries ; i+=1 )); do
  50. "${command[@]}" && return_value=0 && break
  51. sleep "$sleep_time"
  52. done
  53. return $return_value
  54. }
  55. zipkin_ready() {
  56. # Test the TCP connection with a timeout
  57. if timeout 5 bash -c "</dev/tcp/$host/$port"; then
  58. return 0
  59. else
  60. return 1
  61. fi
  62. }
  63. echo "Waiting for the Zipkin instance"
  64. if ! retry_while "zipkin_ready" 300 2; then
  65. echo "Could not connect to the Zipkin instance"
  66. exit 1
  67. else
  68. echo "Zipkin ready! Running job"
  69. echo "0" > /tmp/ready
  70. curl -k -X POST {{ ternary "https" "http" .Values.tls.enabled }}://zipkin:$port/api/v2/spans -H'Content-Type: application/json' -d @/sampledata/yelp.json
  71. fi
  72. startupProbe:
  73. exec:
  74. command:
  75. - sh
  76. - -c
  77. - |
  78. if [ $(cat /tmp/ready) = "1" ]; then
  79. exit 0
  80. else
  81. exit 1
  82. fi
  83. initialDelaySeconds: 40
  84. periodSeconds: 20
  85. timeoutSeconds: 1
  86. failureThreshold: 15
  87. successThreshold: 1
  88. securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }}
  89. volumeMounts:
  90. - name: tmp
  91. mountPath: /tmp
  92. subPath: tmp-dir
  93. - name: sample-data
  94. mountPath: /sampledata
  95. volumes:
  96. - name: tmp
  97. emptyDir: {}
  98. - name: sample-data
  99. configMap:
  100. name: zipkin-test-data
  101. # ConfigMap with the sample data
  102. - |
  103. apiVersion: v1
  104. kind: ConfigMap
  105. metadata:
  106. name: zipkin-test-data
  107. data:
  108. # Taken from https://github.com/openzipkin/zipkin/blob/master/zipkin-lens/testdata/yelp.json
  109. yelp.json: |
  110. [
  111. {
  112. "traceId": "a03ee8fff1dcd9b9",
  113. "parentId": "f5f268651b2a2b34",
  114. "id": "15fc03927f0f68df",
  115. "kind": "CLIENT",
  116. "name": "post",
  117. "timestamp": 1571896375322000,
  118. "duration": 14000,
  119. "localEndpoint": {
  120. "serviceName": "mobile_api"
  121. },
  122. "remoteEndpoint": {
  123. "serviceName": "blt",
  124. "port": 31882
  125. },
  126. "tags": {
  127. "client_status_code": "200",
  128. "http.uri.client": "/visits",
  129. "request_budget": "9980",
  130. "tracer": "syslog2scribe.haproxy-synapse"
  131. }
  132. },
  133. {
  134. "traceId": "a03ee8fff1dcd9b9",
  135. "parentId": "f5f268651b2a2b34",
  136. "id": "7a778764a0d0b594",
  137. "kind": "CLIENT",
  138. "name": "get",
  139. "timestamp": 1571896375310000,
  140. "duration": 3000,
  141. "localEndpoint": {
  142. "serviceName": "mobile_api"
  143. },
  144. "remoteEndpoint": {
  145. "serviceName": "spectre",
  146. "port": 31286
  147. },
  148. "tags": {
  149. "client_status_code": "200",
  150. "http.uri.client": "/visits",
  151. "request_budget": "9989",
  152. "tracer": "syslog2scribe.haproxy-synapse"
  153. }
  154. },
  155. {
  156. "traceId": "a03ee8fff1dcd9b9",
  157. "parentId": "f5f268651b2a2b34",
  158. "id": "7a778764a0d0b594",
  159. "kind": "SERVER",
  160. "name": "get",
  161. "timestamp": 1571896375310740,
  162. "duration": 1490,
  163. "localEndpoint": {
  164. "serviceName": "spectre"
  165. },
  166. "tags": {
  167. "ecosystem": "prod",
  168. "habitat": "uswest1aprod",
  169. "http.uri.client": "/token/abcdefgh123456",
  170. "region": "uswest1-prod"
  171. },
  172. "shared": true
  173. },
  174. {
  175. "traceId": "a03ee8fff1dcd9b9",
  176. "parentId": "f5f268651b2a2b34",
  177. "id": "6a65182ea4f684c3",
  178. "kind": "CLIENT",
  179. "name": "set mobile_api_nonce",
  180. "timestamp": 1571896375302030,
  181. "duration": 1026,
  182. "localEndpoint": {
  183. "serviceName": "mobile_api",
  184. "port": 31049
  185. },
  186. "remoteEndpoint": {
  187. "serviceName": "memcache"
  188. },
  189. "tags": {
  190. "driver": "yelp_memcache",
  191. "method": "set",
  192. "requests": "1",
  193. "system": "mobile_api_nonce",
  194. "ttl": ""
  195. }
  196. },
  197. {
  198. "traceId": "a03ee8fff1dcd9b9",
  199. "parentId": "f5f268651b2a2b34",
  200. "id": "cb4d73f31cd90cae",
  201. "kind": "CLIENT",
  202. "name": "get_multi mobile_api_nonce",
  203. "timestamp": 1571896375300642,
  204. "duration": 1066,
  205. "localEndpoint": {
  206. "serviceName": "mobile_api",
  207. "port": 31049
  208. },
  209. "remoteEndpoint": {
  210. "serviceName": "memcache"
  211. },
  212. "tags": {
  213. "driver": "yelp_memcache",
  214. "hits": "0",
  215. "method": "get_multi",
  216. "requests": "1",
  217. "system": "mobile_api_nonce"
  218. }
  219. },
  220. {
  221. "traceId": "a03ee8fff1dcd9b9",
  222. "parentId": "2e8cfb154b59a41f",
  223. "id": "f5f268651b2a2b34",
  224. "kind": "SERVER",
  225. "name": "post /location/update/v4",
  226. "timestamp": 1571896375297103,
  227. "duration": 41740,
  228. "localEndpoint": {
  229. "serviceName": "mobile_api",
  230. "port": 31049
  231. },
  232. "tags": {
  233. "ecosystem": "prod",
  234. "habitat": "uswest1bprod",
  235. "http.route": "/location/update/v4",
  236. "http.uri": "/location/update/v4",
  237. "http.uri.qs": "/location/update/v4",
  238. "region": "uswest1-prod",
  239. "response_status_code": "200",
  240. "version_SHA": "6535284b1699df0a766384a648dc95c462a7313d"
  241. },
  242. "shared": true
  243. },
  244. {
  245. "traceId": "a03ee8fff1dcd9b9",
  246. "parentId": "2e8cfb154b59a41f",
  247. "id": "f5f268651b2a2b34",
  248. "kind": "CLIENT",
  249. "name": "post",
  250. "timestamp": 1571896375287000,
  251. "duration": 56000,
  252. "localEndpoint": {
  253. "serviceName": "yelp-main"
  254. },
  255. "remoteEndpoint": {
  256. "serviceName": "mobile_api",
  257. "port": 31049
  258. },
  259. "tags": {
  260. "client_status_code": "200",
  261. "http.uri.client": "/location/update/v4",
  262. "request_budget": "10003",
  263. "tracer": "syslog2scribe.haproxy-synapse"
  264. }
  265. },
  266. {
  267. "traceId": "a03ee8fff1dcd9b9",
  268. "parentId": "241cea1aa4cb2884",
  269. "id": "0facde7c9130fd93",
  270. "kind": "CLIENT",
  271. "name": "get_multi my_cache_name_v1",
  272. "timestamp": 1571896375272125,
  273. "duration": 233,
  274. "localEndpoint": {
  275. "serviceName": "yelp-main",
  276. "port": 31523
  277. },
  278. "remoteEndpoint": {
  279. "serviceName": "memcache"
  280. },
  281. "tags": {
  282. "driver": "core_memcache",
  283. "hits": "1",
  284. "method": "get_multi",
  285. "requests": "1"
  286. }
  287. },
  288. {
  289. "traceId": "a03ee8fff1dcd9b9",
  290. "parentId": "241cea1aa4cb2884",
  291. "id": "50b57281525a99d8",
  292. "kind": "CLIENT",
  293. "name": "commit",
  294. "timestamp": 1571896375272604,
  295. "duration": 374,
  296. "localEndpoint": {
  297. "serviceName": "yelp-main",
  298. "port": 31523
  299. },
  300. "remoteEndpoint": {
  301. "serviceName": "mysql"
  302. },
  303. "tags": {
  304. "query": "COMMIT"
  305. }
  306. },
  307. {
  308. "traceId": "a03ee8fff1dcd9b9",
  309. "parentId": "241cea1aa4cb2884",
  310. "id": "2b68987704862c4f",
  311. "kind": "CLIENT",
  312. "name": "get user_details_cache-20150901",
  313. "timestamp": 1571896375270438,
  314. "duration": 1068,
  315. "localEndpoint": {
  316. "serviceName": "yelp-main",
  317. "port": 31523
  318. },
  319. "remoteEndpoint": {
  320. "serviceName": "memcache"
  321. },
  322. "tags": {
  323. "driver": "core_memcache",
  324. "hits": "1",
  325. "method": "get",
  326. "requests": "1"
  327. }
  328. },
  329. {
  330. "traceId": "a03ee8fff1dcd9b9",
  331. "parentId": "668ed78ad94b35a1",
  332. "id": "241cea1aa4cb2884",
  333. "name": "txn: user_get_basic_and_scout_info",
  334. "timestamp": 1571896375269210,
  335. "duration": 3884,
  336. "localEndpoint": {
  337. "serviceName": "yelp-main",
  338. "port": 31523
  339. },
  340. "tags": {
  341. "calling_method": "src/logic/db/user.py:1234:get_user"
  342. }
  343. },
  344. {
  345. "traceId": "a03ee8fff1dcd9b9",
  346. "parentId": "241cea1aa4cb2884",
  347. "id": "b593cd7513dc736e",
  348. "kind": "CLIENT",
  349. "name": "begin",
  350. "timestamp": 1571896375269732,
  351. "duration": 445,
  352. "localEndpoint": {
  353. "serviceName": "yelp-main",
  354. "port": 31523
  355. },
  356. "remoteEndpoint": {
  357. "serviceName": "mysql"
  358. },
  359. "tags": {
  360. "query": "************"
  361. }
  362. },
  363. {
  364. "traceId": "a03ee8fff1dcd9b9",
  365. "parentId": "668ed78ad94b35a1",
  366. "id": "e7d1a2d5a788ac81",
  367. "kind": "CLIENT",
  368. "name": "get my_cache_name_v2",
  369. "timestamp": 1571896375268015,
  370. "duration": 993,
  371. "localEndpoint": {
  372. "serviceName": "yelp-main",
  373. "port": 31523
  374. },
  375. "remoteEndpoint": {
  376. "serviceName": "memcache"
  377. },
  378. "tags": {
  379. "driver": "core_memcache",
  380. "hits": "1",
  381. "method": "get",
  382. "requests": "1"
  383. }
  384. },
  385. {
  386. "traceId": "a03ee8fff1dcd9b9",
  387. "parentId": "2e8cfb154b59a41f",
  388. "id": "668ed78ad94b35a1",
  389. "kind": "SERVER",
  390. "name": "post api proxy proxy",
  391. "timestamp": 1571896375264995,
  392. "duration": 88935,
  393. "localEndpoint": {
  394. "serviceName": "yelp_main/api_proxy",
  395. "port": 31523
  396. },
  397. "annotations": [
  398. {
  399. "timestamp": 1571896375355436,
  400. "value": "py_zipkin.logging_end"
  401. }
  402. ],
  403. "tags": {
  404. "cprofile_enabled": "False",
  405. "datacenter": "us-west-1",
  406. "ecosystem": "prod",
  407. "habitat": "uswest1aprod",
  408. "host": "<host>",
  409. "http.route": "/*path",
  410. "http.uri": "/location/update/v4",
  411. "http.uri.qs": "/location/update/v4",
  412. "locale": "en_US",
  413. "logged_in": "False",
  414. "natural": "False",
  415. "owner_email": "",
  416. "paasta": "True",
  417. "region": "uswest1-prod",
  418. "request_budget": "10003",
  419. "request_budget_soft": "5003",
  420. "response_status_code": "200",
  421. "servlet": "proxy",
  422. "servlet_action": "proxy",
  423. "site": "api",
  424. "version_SHA": "5e83958d2c"
  425. },
  426. "shared": true
  427. },
  428. {
  429. "traceId": "a03ee8fff1dcd9b9",
  430. "parentId": "2e8cfb154b59a41f",
  431. "id": "668ed78ad94b35a1",
  432. "kind": "CLIENT",
  433. "name": "post",
  434. "timestamp": 1571896375239000,
  435. "duration": 125000,
  436. "localEndpoint": {
  437. "serviceName": "unknown"
  438. },
  439. "remoteEndpoint": {
  440. "serviceName": "yelp-main.mobile_api",
  441. "port": 31523
  442. },
  443. "tags": {
  444. "client_status_code": "200",
  445. "http.uri.client": "/location/update/v4",
  446. "request_budget": "10003",
  447. "tracer": "syslog2scribe.envoy"
  448. }
  449. },
  450. {
  451. "traceId": "a03ee8fff1dcd9b9",
  452. "id": "2e8cfb154b59a41f",
  453. "kind": "SERVER",
  454. "name": "post /location/update/v4",
  455. "timestamp": 1571896375237354,
  456. "duration": 131848,
  457. "localEndpoint": {
  458. "serviceName": "routing"
  459. },
  460. "tags": {
  461. "ecosystem": "prod",
  462. "habitat": "uswest1aprod",
  463. "http.uri.client": "/location/update/v4",
  464. "region": "uswest1-prod",
  465. "response_status_code": "200"
  466. },
  467. "shared": true
  468. }
  469. ]