Skip to content

Commit 07687a4

Browse files
committed
chore(kvrocks): add plans and metrics add kvrocks.addr
1 parent 5947141 commit 07687a4

52 files changed

Lines changed: 143 additions & 1420 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

addons/kvrocks/2.8/chart/kvrocks/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ maintainers:
2020
name: kvrocks
2121
sources:
2222
- https://github.com/apache/kvrocks
23-
version: 2.8.0
23+
version: "2.8"

addons/kvrocks/2.8/chart/kvrocks/templates/master/application.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ spec:
126126
- name: KVROCKS_CLUSTER_ENABLED
127127
value: "no"
128128
{{- if .Values.auth.enabled }}
129+
- name: KVROCKS_MASTERAUTH
130+
valueFrom:
131+
secretKeyRef:
132+
name: {{ template "kvrocks.secretName" . }}
133+
key: {{ template "kvrocks.secretPasswordKey" . }}
129134
- name: KVROCKS_REQUIREPASS
130135
valueFrom:
131136
secretKeyRef:
@@ -208,8 +213,6 @@ spec:
208213
- name: kvrocks-data
209214
mountPath: {{ .Values.master.persistence.path }}
210215
subPath: {{ .Values.master.persistence.subPath }}
211-
- name: config
212-
mountPath: /opt/drycc/kvrocks/mounted-etc
213216
- name: kvrocks-tmp-conf
214217
mountPath: /opt/drycc/kvrocks/etc/
215218
- name: tmp
@@ -228,20 +231,26 @@ spec:
228231
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
229232
{{- else }}
230233
command:
234+
- init-stack
231235
- /bin/bash
232236
- -c
233237
- |
234-
kvrocks_exporter{{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }}
238+
kvrocks_exporter --kvrocks.addr=localhost:$(KVROCKS_PORT) {{- if .Values.auth.enabled }} --kvrocks.password $(KVROCKS_REQUIREPASS){{- end }} {{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }}
235239
{{- end }}
236240
{{- if .Values.diagnosticMode.enabled }}
237241
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
238242
{{- end }}
239243
env:
240244
- name: REDIS_ALIAS
241245
value: {{ template "common.names.fullname" . }}
246+
- name: KVROCKS_PORT
247+
value: {{ .Values.master.containerPorts.kvrocks | quote }}
242248
{{- if .Values.auth.enabled }}
243-
- name: REDIS_USER
244-
value: default
249+
- name: KVROCKS_REQUIREPASS
250+
valueFrom:
251+
secretKeyRef:
252+
name: {{ template "kvrocks.secretName" . }}
253+
key: {{ template "kvrocks.secretPasswordKey" . }}
245254
{{- end }}
246255
{{- if .Values.metrics.extraEnvVars }}
247256
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }}
@@ -321,9 +330,6 @@ spec:
321330
configMap:
322331
name: {{ printf "%s-health" (include "common.names.fullname" .) }}
323332
defaultMode: 0755
324-
- name: config
325-
configMap:
326-
name: {{ include "kvrocks.configmapName" . }}
327333
{{- if .Values.sysctl.mountHostSys }}
328334
- name: host-sys
329335
hostPath:

addons/kvrocks/2.8/chart/kvrocks/templates/replicas/statefulset.yaml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,8 @@ spec:
223223
- name: kvrocks-data
224224
mountPath: /data
225225
subPath: {{ .Values.replica.persistence.subPath }}
226-
- name: config
227-
mountPath: /opt/drycc/kvrocks/mounted-etc
228226
- name: kvrocks-tmp-conf
229227
mountPath: /opt/drycc/kvrocks/etc
230-
{{- if .Values.tls.enabled }}
231-
- name: kvrocks-certificates
232-
mountPath: /opt/drycc/kvrocks/certs
233-
readOnly: true
234-
{{- end }}
235228
{{- if .Values.replica.extraVolumeMounts }}
236229
{{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumeMounts "context" $ ) | nindent 12 }}
237230
{{- end }}
@@ -248,28 +241,27 @@ spec:
248241
command: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.command "context" $) | nindent 12 }}
249242
{{- else }}
250243
command:
244+
- init-stack
251245
- /bin/bash
252246
- -c
253247
- |
254-
kvrocks_exporter{{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }}
248+
kvrocks_exporter --kvrocks.addr=localhost:$(KVROCKS_PORT) {{- if .Values.auth.enabled }} --kvrocks.password $(KVROCKS_REQUIREPASS){{- end }} {{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }}
255249
{{- end }}
256250
{{- if .Values.diagnosticMode.enabled }}
257251
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
258252
{{- end }}
259253
env:
260254
- name: REDIS_ALIAS
261255
value: {{ template "common.names.fullname" . }}
256+
- name: KVROCKS_PORT
257+
value: {{ .Values.replica.containerPorts.kvrocks | quote }}
262258
{{- if .Values.auth.enabled }}
263-
- name: REDIS_USER
264-
value: default
265-
{{- if (not .Values.auth.usePasswordFiles) }}
266259
- name: KVROCKS_REQUIREPASS
267260
valueFrom:
268261
secretKeyRef:
269262
name: {{ template "kvrocks.secretName" . }}
270263
key: {{ template "kvrocks.secretPasswordKey" . }}
271264
{{- end }}
272-
{{- end }}
273265
ports:
274266
- name: metrics
275267
containerPort: 9121
@@ -281,11 +273,6 @@ spec:
281273
- name: kvrocks-password
282274
mountPath: /secrets/
283275
{{- end }}
284-
{{- if .Values.tls.enabled }}
285-
- name: kvrocks-certificates
286-
mountPath: /opt/drycc/kvrocks/certs
287-
readOnly: true
288-
{{- end }}
289276
{{- if .Values.metrics.extraVolumeMounts }}
290277
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumeMounts "context" $ ) | nindent 12 }}
291278
{{- end }}
@@ -362,9 +349,6 @@ spec:
362349
- key: {{ template "kvrocks.secretPasswordKey" . }}
363350
path: kvrocks-password
364351
{{- end }}
365-
- name: config
366-
configMap:
367-
name: {{ include "kvrocks.configmapName" . }}
368352
{{- if .Values.sysctl.mountHostSys }}
369353
- name: host-sys
370354
hostPath:
@@ -378,12 +362,6 @@ spec:
378362
{{- else }}
379363
emptyDir: {}
380364
{{- end }}
381-
{{- if .Values.tls.enabled }}
382-
- name: kvrocks-certificates
383-
secret:
384-
secretName: {{ include "kvrocks.tlsSecretName" . }}
385-
defaultMode: 256
386-
{{- end }}
387365
{{- if .Values.replica.extraVolumes }}
388366
{{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumes "context" $ ) | nindent 8 }}
389367
{{- end }}

addons/kvrocks/2.8/chart/kvrocks/templates/scripts-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ data:
380380
chown -R kvrocks {{ .Values.master.persistence.path }}
381381
{{- end }}
382382
#export KVROCKS_BIND="localhost $(get_full_hostname "$HOSTNAME")"
383-
exec exec init-stack /opt/drycc/scripts/kvrocks/entrypoint.sh /opt/drycc/scripts/kvrocks/run.sh
383+
exec init-stack /opt/drycc/scripts/kvrocks/entrypoint.sh /opt/drycc/scripts/kvrocks/run.sh
384384
{{- if eq .Values.architecture "replication" }}
385385
start-replica.sh: |
386386
#!/bin/bash

addons/kvrocks/2.8/chart/kvrocks/templates/sentinel/statefulset.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,16 @@ spec:
463463
- /bin/bash
464464
- -c
465465
- |
466-
kvrocks_exporter {{- if .Values.auth.enabled }} --kvrocks.password $(KVROCKS_REQUIREPASS){{- end }} {{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }}
466+
kvrocks_exporter --kvrocks.addr=localhost:$(KVROCKS_PORT) {{- if .Values.auth.enabled }} --kvrocks.password $(KVROCKS_REQUIREPASS){{- end }} {{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }}
467467
{{- end }}
468468
{{- if .Values.diagnosticMode.enabled }}
469469
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
470470
{{- end }}
471471
env:
472472
- name: REDIS_ALIAS
473473
value: {{ template "common.names.fullname" . }}
474+
- name: KVROCKS_PORT
475+
value: {{ .Values.replica.containerPorts.kvrocks | quote }}
474476
{{- if .Values.auth.enabled }}
475477
- name: KVROCKS_REQUIREPASS
476478
valueFrom:

addons/kvrocks/2.8/chart/kvrocks/values.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ diagnosticMode:
7676
## @param image.debug Enable image debug mode
7777
##
7878
image:
79-
registry: harbor.uucin.com
80-
repository: lijianguo/kvrocks
81-
tag: "2.8.0"
79+
registry: registry.drycc.cc
80+
repository: drycc-addons/kvrocks
81+
tag: "2.8"
8282
## Specify a imagePullPolicy
8383
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
8484
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -451,7 +451,7 @@ master:
451451
## @param master.service.ports.kvrocks kvrocks; master service port
452452
##
453453
ports:
454-
redikvrockss: 6379
454+
kvrocks: 6379
455455
## @param master.service.nodePorts.kvrocks Node port for kvrocks; master
456456
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
457457
## NOTE: choose port between <30000-32767>
@@ -887,8 +887,8 @@ sentinel:
887887
##
888888
## todo: support both of amd64 and arm64
889889
image:
890-
registry: harbor.uucin.com
891-
repository: lijianguo/redis-sentinel
890+
registry: registry.drycc.cc
891+
repository: drycc-addons/redis-sentinel
892892
tag: "7.0"
893893
## Specify a imagePullPolicy
894894
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
@@ -1160,8 +1160,8 @@ proxy:
11601160
##
11611161
## todo: support both of amd64 and arm64
11621162
image:
1163-
registry: harbor.uucin.com
1164-
repository: lijianguo/redis-sentinel
1163+
registry: registry.drycc.cc
1164+
repository: drycc-addons/redis-sentinel
11651165
tag: "7.0"
11661166
## Specify a imagePullPolicy
11671167
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'

addons/kvrocks/2.8/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: kvrocks
2-
version: 7.0
2+
version: 2.8
33
id: cae7ff36-e6d3-462e-8c8b-5ed1228a2acf
44
description: "kvrocks."
55
displayName: "kvrocks"

addons/kvrocks/2.8/plans/standard-1024/meta.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

addons/kvrocks/2.8/plans/standard-1024/values.yaml

Lines changed: 0 additions & 139 deletions
This file was deleted.

addons/kvrocks/2.8/plans/standard-128/meta.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)