Skip to content

Commit

Permalink
add PIKA_CODIS_DASHBOARD_SVC_NAME var reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Rookie committed Feb 21, 2024
1 parent 238d46e commit 5c27606
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/kubeblocks_helm/pika/script/admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ set_group_id() {
# set codis dashboard
set_codis_dashboard() {
CODIS_DASHBOARD="${KB_CLUSTER_NAME}-codis-dashboard"
if [ ! -z "$PIKA_CODIS_DASHBOARD_SVC_NAME" ]; then
CODIS_DASHBOARD=$PIKA_CODIS_DASHBOARD_SVC_NAME
fi
echo "CODIS_DASHBOARD: "${CODIS_DASHBOARD}
CODIS_ADMIN="/codis/bin/codis-admin --dashboard=${CODIS_DASHBOARD}:18080"
echo "CODIS_ADMIN: "${CODIS_ADMIN}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ spec:
- "-c"
- "/script/admin.sh --rebalance"
preCondition: ComponentReady
vars:
## reference to the pika-codis-dashboard service
- name: PIKA_CODIS_DASHBOARD_SVC_NAME
valueFrom:
serviceVarRef:
compDef: pika-codis-dashboard
name: dashboard
optional: true
host: Optional
runtime:
containers:
- name: pika
Expand Down

0 comments on commit 5c27606

Please sign in to comment.