Skip to content

Commit

Permalink
fix: support saving pika config to hostpath (#2476)
Browse files Browse the repository at this point in the history
Co-authored-by: liuchengyu <liuchengyu@360.cn>
  • Loading branch information
chengyu-l and liuchengyu authored Mar 9, 2024
1 parent 5778a36 commit 619e7b0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tools/kubeblocks_helm/pika/templates/clusterdefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ spec:
scriptSpecSelectors:
- name: pika-script
podSpec:
initContainers:
- name: init-config
image: busybox:1.28
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -ec
- |
if [ ! -f "/data/pika.conf" ];then cp /etc/pika/pika.conf /data/pika.conf; fi
volumeMounts:
- name: config
mountPath: /etc/pika
- name: data
mountPath: /data
containers:
- name: pika
ports:
Expand All @@ -60,7 +74,7 @@ spec:
- "/pika/bin/pika"
args:
- "-c"
- "/etc/pika/pika.conf"
- "/data/pika.conf"
- name: codis-admin
volumeMounts:
- name: script
Expand Down

0 comments on commit 619e7b0

Please sign in to comment.