Staging instance, all changes can be removed at any time

Skip to content

swh: Support the deployment of a memcached instance

Vincent Sellier requested to merge mr/4785 into staging

It will be used by graphq >= 0.0.8.1 and later by the webapp

Related to swh/infra/sysadm-environment#4785 (closed)

/cc @teams/sysadmin

It adds the support of an optional deployment of a memcached service in the swh stack.
By default, if the memcached deployment is activated, a sidecar container is deployed is the memcached pod and a ServiceMonitor created to automatically retrieve the memcached metrics in prometheus.

No specific labels are configured for the moment, we'll see later if more information are needed.

The metrics are:

memcached_accepting_connections 1
memcached_commands_total{command="cas",status="badval"} 0
memcached_commands_total{command="cas",status="hit"} 0
memcached_commands_total{command="cas",status="miss"} 0
memcached_commands_total{command="decr",status="hit"} 0
memcached_commands_total{command="decr",status="miss"} 0
memcached_commands_total{command="delete",status="hit"} 0
memcached_commands_total{command="delete",status="miss"} 0
memcached_commands_total{command="flush",status="hit"} 0
memcached_commands_total{command="get",status="hit"} 0
memcached_commands_total{command="get",status="miss"} 0
memcached_commands_total{command="incr",status="hit"} 0
memcached_commands_total{command="incr",status="miss"} 0
memcached_commands_total{command="set",status="hit"} 0
memcached_commands_total{command="touch",status="hit"} 0
memcached_commands_total{command="touch",status="miss"} 0
memcached_connections_listener_disabled_total 0
memcached_connections_rejected_total 0
memcached_connections_total 493
memcached_connections_yielded_total 0
memcached_current_bytes 0
memcached_current_connections 4
memcached_current_items 0
memcached_exporter_build_info{branch="HEAD",goarch="amd64",goos="linux",goversion="go1.19.5",revision="44eb80af84f65d8221e07ef58512c404342de3e3",version="0.11.1"} 1
memcached_items_evicted_total 0
memcached_items_reclaimed_total 0
memcached_items_total 0
memcached_limit_bytes 2.68435456e+08
memcached_lru_crawler_enabled 1
memcached_lru_crawler_hot_max_factor 0.2
memcached_lru_crawler_hot_percent 20
memcached_lru_crawler_items_checked_total 0
memcached_lru_crawler_maintainer_thread 1
memcached_lru_crawler_moves_to_cold_total 0
memcached_lru_crawler_moves_to_warm_total 0
memcached_lru_crawler_moves_within_lru_total 0
memcached_lru_crawler_reclaimed_total 0
memcached_lru_crawler_sleep 100
memcached_lru_crawler_starts_total 6
memcached_lru_crawler_to_crawl 0
memcached_lru_crawler_warm_max_factor 2
memcached_lru_crawler_warm_percent 40
memcached_malloced_bytes 0
memcached_max_connections 1024
memcached_process_system_cpu_seconds_total 0.25268
memcached_process_user_cpu_seconds_total 0.291986
memcached_read_bytes_total 16030
memcached_time_seconds 1.677869739e+09
memcached_up 1
memcached_uptime_seconds 1092
memcached_version{version="1.6.18"} 1
memcached_written_bytes_total 1.35913e+06

Alerts could be configured later when we'll have more feedback

Tests results:

docker run --user=1000 -ti --rm -v $(pwd)/..:/apps quintush/helm-unittest:3.11.0-0.3.0  --color -d -d -u swh --debug --output-file /apps/swh/coverage.xml                         19:43:47


### Chart [ swh ] swh

 PASS  test graphql deployment  swh/tests/graphql_configmap_test.yaml
 PASS  test graphql deployment  swh/tests/graphql_deployment_test.yaml
 PASS  test graphql deployment  swh/tests/graphql_global_test.yaml
 PASS  test graphql deployment  swh/tests/graphql_service_test.yaml
 PASS  test memcached deployment        swh/tests/memcached_deployment_test.yaml
 PASS  test memcached deployment        swh/tests/memcached_global_test.yaml
 PASS  test memcached service   swh/tests/memcached_service_test.yaml
 PASS  test memcached ServiceMonitor    swh/tests/memcached_servicemonitor_test.yaml

Charts:      1 passed, 1 total
Test Suites: 8 passed, 8 total
Tests:       18 passed, 18 total
Snapshot:    0 passed, 0 total
Time:        44.847156ms
Edited by Vincent Sellier

Merge request reports

Loading