Skip to content

Commit 9a80886

Browse files
committed
chore(grafana): use valkey replace redis
1 parent b87f370 commit 9a80886

6 files changed

Lines changed: 13 additions & 14 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ We welcome your input! If you have feedback, please [submit an issue][issues]. I
3838
| <a name="database_password"></a> [DATABASE_PASSWORD](#database_password) | no default | Database password |
3939
| <a name="database_ssl_mode"></a> [DATABASE_SSL_MODE](#database_ssl_mode) | no default | For "postgres" only, either "disable", "require" or "verify-full" |
4040
| <a name="database_path"></a> [DATABASE_PATH](#database_path) | no default | For "sqlite3" only, path relative to data_path setting |
41-
| <a name="session_provider"></a> [SESSION_PROVIDER](#session_provider) | file | Either "memory", "file", "redis", "mysql", "postgres", default is "file" |
42-
| <a name="session_provider_config"></a> [SESSION_PROVIDER_CONFIG](#session_provider_config) | no default | Provider config options <br>`memory: not have any config yet`<br>`file: session dir path, is relative to grafana data_path`<br>`redis: addr=127.0.0.1:6379,pool_size=100,db=grafana`<br>`mysql: user:password@tcp(127.0.0.1:3306)/database_name`<br>`postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable` |
41+
| <a name="session_provider"></a> [SESSION_PROVIDER](#session_provider) | file | Either "memory", "file", "valkey", "mysql", "postgres", default is "file" |
42+
| <a name="session_provider_config"></a> [SESSION_PROVIDER_CONFIG](#session_provider_config) | no default | Provider config options <br>`memory: not have any config yet`<br>`file: session dir path, is relative to grafana data_path`<br>`mysql: user:password@tcp(127.0.0.1:3306)/database_name`<br>`postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable` |
4343
| <a name="session_cookie_name"></a> [SESSION_COOKIE_NAME](#session_cookie_name) | grafana_sess | Session cookie name |
4444
| <a name="session_life_time"></a> [SESSION_LIFE_TIME](#session_life_time) | 86400 | Session life time, default is 86400 |
4545
| <a name="grafana_reporting"></a> [GRAFANA_REPORTING](#grafana_reporting) | false | Server reporting, sends usage counters to stats.grafana.org every 24 hours. No ip addresses are being tracked, only simple counters to track running instances, dashboard and error counts. It is very helpful to us. Change this option to false to disable reporting. |

charts/grafana/templates/_helpers.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ env:
7474
{{- end }}
7575
- name: "PROMETHEUS_LOCATION"
7676
value: {{ .Values.global.prometheusLocation }}
77-
- name: "REDIS_LOCATION"
78-
value: {{ .Values.global.redisLocation }}
77+
- name: "VALKEY_LOCATION"
78+
value: {{ .Values.global.valkeyLocation }}
7979
- name: "RABBITMQ_LOCATION"
8080
value: {{ .Values.global.rabbitmqLocation }}
8181
- name: "STORAGE_LOCATION"

charts/grafana/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ passportUrl: ""
5656
passportKey: ""
5757
passportSecret: ""
5858

59-
redis:
59+
valkey:
6060
replicas: 1
6161
port: "6379"
6262

@@ -66,7 +66,7 @@ global:
6666
# Valid values are:
6767
# - on-cluster: Run component within the Kubernetes cluster
6868
# - off-cluster: component is running outside of the cluster and credentials and connection information will be provided.
69-
redisLocation: "on-cluster"
69+
valkeyLocation: "on-cluster"
7070
grafanaLocation: "on-cluster"
7171
storageLocation: "on-cluster"
7272
rabbitmqLocation: "on-cluster"

rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2944,7 +2944,7 @@
29442944
{
29452945
"alias": "$tag_pod_name",
29462946
"editorMode": "code",
2947-
"expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",pod!=\"\",namespace=\"drycc\",container=~\"^drycc-redis.*$\"}[1m])) by (pod) * 1000",
2947+
"expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",pod!=\"\",namespace=\"drycc\",container=~\"^drycc-valkey.*$\"}[1m])) by (pod) * 1000",
29482948
"groupBy": [
29492949
{
29502950
"params": [
@@ -3052,7 +3052,7 @@
30523052
{
30533053
"alias": "$tag_pod_name",
30543054
"editorMode": "code",
3055-
"expr": "sum (container_memory_working_set_bytes{image!=\"\",pod!=\"\",namespace=\"drycc\",container=~\"^drycc-redis.*$\"}) by (pod)",
3055+
"expr": "sum (container_memory_working_set_bytes{image!=\"\",pod!=\"\",namespace=\"drycc\",container=~\"^drycc-valkey.*$\"}) by (pod)",
30563056
"groupBy": [
30573057
{
30583058
"params": [
@@ -3118,7 +3118,7 @@
31183118
"refId": "A"
31193119
}
31203120
],
3121-
"title": "REDIS",
3121+
"title": "VALKEY",
31223122
"type": "row"
31233123
},
31243124
{

rootfs/usr/share/grafana/grafana.ini.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,12 @@ path = {{ .DATABASE_PATH }}
9090

9191
#################################### Session ####################################
9292
[session]
93-
# Either "memory", "file", "redis", "mysql", "postgres", default is "file"
93+
# Either "memory", "file", "mysql", "postgres", default is "file"
9494
provider = {{ default "file" .SESSION_PROVIDER }}
9595

9696
# Provider config options
9797
# memory: not have any config yet
9898
# file: session dir path, is relative to grafana data_path
99-
# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
10099
# mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
101100
# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
102101
{{ if .SESSION_PROVIDER_CONFIG }}

rootfs/usr/share/grafana/start-grafana

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ sed -i 's@r\[\\"namespace\\\"\] == \\"drycc\\"@r\[\\"namespace\\"\] == \\"\'"${N
9898
DCD="${DASHBOARD_LOCATION}"/drycc_component_health.json
9999

100100
# remove off-cluster component panel
101-
if [ "on-cluster" != "${REDIS_LOCATION}" ]; then
102-
rm -rf "${DASHBOARD_LOCATION}"/redis.json
101+
if [ "on-cluster" != "${VALKEY_LOCATION}" ]; then
102+
rm -rf "${DASHBOARD_LOCATION}"/valkey.json
103103
# shellcheck disable=SC2005
104-
echo "$(<"${DCD}" jq 'del(.dashboard.panels[] | select(.title == "REDIS"))')" > "${DCD}"
104+
echo "$(<"${DCD}" jq 'del(.dashboard.panels[] | select(.title == "VALKEY"))')" > "${DCD}"
105105
fi
106106
if [ "on-cluster" != "${RABBITMQ_LOCATION}" ]; then
107107
# shellcheck disable=SC2005

0 commit comments

Comments
 (0)