Skip to content

Commit

Permalink
fix: support saving pika config to hostpath (OpenAtomFoundation#2476)
Browse files Browse the repository at this point in the history
Co-authored-by: liuchengyu <liuchengyu@360.cn>
  • Loading branch information
2 people authored and liuyuecai committed Mar 14, 2024
1 parent 21275ce commit 77e1ac5
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 77e1ac5

Please sign in to comment.