Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add kubeblocks component postStart hook demo #2115

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

Y-Rookie
Copy link
Contributor

@Y-Rookie Y-Rookie commented Nov 9, 2023

all ENVs can be used in postStart hook script, including:

  • the env of the pod corresponding to the component
  • the custom envs defined in the postStart hook in clusterDefinition API ,
  • as well as some additional envs injected by KubeBlocks, such as KB_CLUSTER_COMPONENT_LIST.

KUBERNETES_SERVICE_PORT_HTTPS=443
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_PORT=tcp://10.43.254.210:18080
KUBERNETES_SERVICE_PORT=443
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_11080_TCP_ADDR=10.43.70.165
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_PORT_9221_TCP=tcp://10.43.145.75:9221
HOSTNAME=kb-poststart-job-pika-pika-cluster-pika-group-1-52sql
PIKA_PIKA_CLUSTER_CODIS_FE_PORT_8080_TCP=tcp://10.43.151.40:8080
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_11080_TCP=tcp://10.43.70.165:11080
KB_CLUSTER_UID_POSTFIX_8=6a685428
PIKA_PIKA_CLUSTER_ETCD_SERVICE_PORT_CLIENT=2379
PIKA_PIKA_CLUSTER_CODIS_PROXY_SERVICE_PORT=11080
KB_PODIP=10.42.0.92
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_SERVICE_HOST=10.43.244.2
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_PORT_18080_TCP_PROTO=tcp
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_PORT=tcp://10.43.244.2:9221
KB_POD_UID=828f2dc5-08b0-4cf1-bb63-5ee2d31c1996
KB_POD_NAME=kb-poststart-job-pika-pika-cluster-pika-group-1-52sql
PWD=/pika
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_19000_TCP_PROTO=tcp
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_PORT_18080_TCP_ADDR=10.43.254.210
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_PORT_9221_TCP_PORT=9221
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_19000_TCP_ADDR=10.43.70.165
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_SERVICE_PORT_PIKA=9221
PIKA_BUILD_DIR=/tmp/pika
PIKA_PIKA_CLUSTER_CODIS_FE_PORT_8080_TCP_PROTO=tcp
KB_POD_IPS=10.42.0.92
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT=tcp://10.43.70.165:11080
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_PORT_18080_TCP_PORT=18080
PIKA_PIKA_CLUSTER_CODIS_FE_PORT_8080_TCP_PORT=8080
HOME=/root
KB_CLUSTER_NAME=pika-pika-cluster
KUBERNETES_PORT_443_TCP=tcp://10.43.0.1:443
PIKA_PIKA_CLUSTER_ETCD_PORT=tcp://10.43.112.153:2379
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_SERVICE_PORT=9221
PIKA_PIKA_CLUSTER_ETCD_SERVICE_PORT_PEER=2380
PIKA_PIKA_CLUSTER_ETCD_PORT_2380_TCP=tcp://10.43.112.153:2380
PIKA_PIKA_CLUSTER_ETCD_PORT_2379_TCP=tcp://10.43.112.153:2379
PIKA_PIKA_CLUSTER_ETCD_SERVICE_HOST=10.43.112.153
PIKA_PIKA_CLUSTER_ETCD_PORT_2379_TCP_PORT=2379
PIKA_PIKA_CLUSTER_ETCD_PORT_2379_TCP_ADDR=10.43.112.153
PIKA_PIKA_CLUSTER_ETCD_PORT_2380_TCP_PORT=2380
PIKA_PIKA_CLUSTER_CODIS_PROXY_SERVICE_PORT_PROXY=11080
KB_HOST_IP=172.24.0.3
KB_CLUSTER_COMP_NAME=pika-pika-cluster-pika-group-1
KB_SA_NAME=default
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_SERVICE_PORT_DASHBOARD=18080
KB_NAMESPACE=default
KB_POD_IP=10.42.0.92
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_11080_TCP_PROTO=tcp
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_SERVICE_PORT=9221
PIKA_PIKA_CLUSTER_CODIS_FE_SERVICE_PORT=8080
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_SERVICE_HOST=10.43.254.210
PIKA_PIKA_CLUSTER_CODIS_FE_PORT=tcp://10.43.151.40:8080
PIKA_PIKA_CLUSTER_CODIS_FE_PORT_8080_TCP_ADDR=10.43.151.40
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_PORT_9221_TCP_ADDR=10.43.244.2
PIKA_PIKA_CLUSTER_CODIS_PROXY_SERVICE_HOST=10.43.70.165
PIKA_PIKA_CLUSTER_CODIS_PROXY_SERVICE_PORT_ADMIN=19000
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_19000_TCP=tcp://10.43.70.165:19000
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_SERVICE_PORT=18080
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_PORT_9221_TCP=tcp://10.43.244.2:9221
SHLVL=0
PIKA_PIKA_CLUSTER_ETCD_PORT_2380_TCP_PROTO=tcp
PIKA=/pika
KUBERNETES_PORT_443_TCP_PROTO=tcp
PIKA_PIKA_CLUSTER_CODIS_FE_SERVICE_HOST=10.43.151.40
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_11080_TCP_PORT=11080
KUBERNETES_PORT_443_TCP_ADDR=10.43.0.1
PIKA_PIKA_CLUSTER_ETCD_PORT_2379_TCP_PROTO=tcp
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_SERVICE_HOST=10.43.145.75
KB_POD_FQDN=kb-poststart-job-pika-pika-cluster-pika-group-1-52sql.pika-pika-cluster-pika-group-1-headless.default.svc
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_PORT_9221_TCP_PORT=9221
PIKA_PIKA_CLUSTER_CODIS_PROXY_PORT_19000_TCP_PORT=19000
KUBERNETES_SERVICE_HOST=10.43.0.1
KUBERNETES_PORT=tcp://10.43.0.1:443
KB_COMP_NAME=pika-group-1
KUBERNETES_PORT_443_TCP_PORT=443
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_PORT_9221_TCP_PROTO=tcp
PATH=:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PIKA_PIKA_CLUSTER_CODIS_DASHBOARD_PORT_18080_TCP=tcp://10.43.254.210:18080
PIKA_PIKA_CLUSTER_ETCD_SERVICE_PORT=2379
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_PORT_9221_TCP_ADDR=10.43.145.75
PIKA_PIKA_CLUSTER_ETCD_PORT_2380_TCP_ADDR=10.43.112.153
KB_PODIPS=10.42.0.92
PIKA_PIKA_CLUSTER_PIKA_GROUP_2_PORT=tcp://10.43.145.75:9221
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_PORT_9221_TCP_PROTO=tcp
PIKA_PIKA_CLUSTER_CODIS_FE_SERVICE_PORT_FE=8080
KB_HOSTIP=172.24.0.3
KB_NODENAME=k3d-pika-server-0
PIKA_PIKA_CLUSTER_PIKA_GROUP_1_SERVICE_PORT_PIKA=9221
_=/bin/env

KB_CLUSTER_COMPONENT_LIST=pika-group-1,pika-group-2,etcd,codis-proxy,codis-fe,codis-dashboard

@Y-Rookie Y-Rookie marked this pull request as draft November 9, 2023 09:41
@machinly
Copy link
Collaborator

A new pull request has been submitted, referring to this. #2121

@machinly machinly closed this Nov 20, 2023
@AlexStocks AlexStocks reopened this Nov 20, 2023
@AlexStocks AlexStocks marked this pull request as ready for review November 20, 2023 08:08
@AlexStocks AlexStocks merged commit 5b18c5f into OpenAtomFoundation:unstable Nov 20, 2023
24 checks passed
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this pull request Jun 8, 2024
cheniujh pushed a commit to cheniujh/pika that referenced this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants