File tree Expand file tree Collapse file tree 6 files changed +21
-23
lines changed
Expand file tree Collapse file tree 6 files changed +21
-23
lines changed Original file line number Diff line number Diff line change 8686 - name : SERVER_log_retention_hours
8787 value : " 2147483647"
8888 - name : SERVER_zookeeper_connect
89- value : " zk-0.zk:2181,zk-1.zk:2181,zk-2.zk:2181 "
89+ value : " zk-0.zk:2181"
9090 - name : SERVER_log_dirs
9191 value : " /opt/kafka/data/logs"
9292 - name : SERVER_zookeeper_connection_timeout_ms
@@ -95,14 +95,14 @@ spec:
9595 exec :
9696 command :
9797 - kafka_server_status.sh
98- initialDelaySeconds : 30
99- timeoutSeconds : 5
98+ initialDelaySeconds : 50
99+ timeoutSeconds : 60
100100 readinessProbe :
101101 exec :
102102 command :
103103 - kafka_server_status.sh
104- initialDelaySeconds : 30
105- timeoutSeconds : 5
104+ initialDelaySeconds : 50
105+ timeoutSeconds : 60
106106 volumeMounts :
107107 - name : data
108108 mountPath : /opt/kafka/data
@@ -111,7 +111,6 @@ spec:
111111 name : data
112112 spec :
113113 accessModes : [ "ReadWriteOnce" ]
114- storageClassName : " standard"
115114 resources :
116115 requests :
117116 storage : 1Gi
Original file line number Diff line number Diff line change @@ -106,15 +106,15 @@ spec:
106106 readinessProbe :
107107 exec :
108108 command :
109- - kafka_server_status.sh
110- initialDelaySeconds : 30
111- timeoutSeconds : 5
109+ - kafka_server_status.sh
110+ initialDelaySeconds : 60
111+ timeoutSeconds : 30
112112 livenessProbe :
113113 exec :
114114 command :
115- - kafka_server_status.sh
116- initialDelaySeconds : 30
117- timeoutSeconds : 5
115+ - kafka_server_status.sh
116+ initialDelaySeconds : 60
117+ timeoutSeconds : 30
118118 volumeMounts :
119119 - name : kafka-data
120120 mountPath : /opt/kafka/data
@@ -127,23 +127,20 @@ spec:
127127 name : kafka-data
128128 spec :
129129 accessModes : [ "ReadWriteOnce" ]
130- storageClassName : " standard"
131130 resources :
132131 requests :
133132 storage : 1Gi
134133 - metadata :
135134 name : zk-data
136135 spec :
137136 accessModes : [ "ReadWriteOnce" ]
138- storageClassName : " standard"
139137 resources :
140138 requests :
141139 storage : 1Gi
142140 - metadata :
143141 name : zk-datalog
144142 spec :
145143 accessModes : [ "ReadWriteOnce" ]
146- storageClassName : " standard"
147144 resources :
148145 requests :
149146 storage : 1Gi
Original file line number Diff line number Diff line change @@ -75,12 +75,12 @@ spec:
7575# livenessProbe:
7676# exec:
7777# command:
78- # - kafka_server_status.sh
78+ # - kafka_server_status.sh
7979# initialDelaySeconds: 60
8080# timeoutSeconds: 60
8181# readinessProbe:
8282# exec:
8383# command:
84- # - kafka_server_status.sh
84+ # - kafka_server_status.sh
8585# initialDelaySeconds: 60
8686# timeoutSeconds: 60
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ function check()
7878 echo " ERROR: Max number of attempts was reached (${MAX_ATTEMPTS} )"
7979 exit 1
8080 fi
81- READY_REPLICAS=$( kubectl get -f $1 -o jsonpath=' {.items[?(@.kind=="StatefulSet")].status.currentReplicas }' 2>&1 )
81+ READY_REPLICAS=$( kubectl get -f $1 -o jsonpath=' {.items[?(@.kind=="StatefulSet")].status.readyReplicas }' 2>&1 )
8282 echo " [${ATTEMPTS} /${MAX_ATTEMPTS} ] - Ready replicas : ${READY_REPLICAS:- 0} /$REPLICAS ... "
8383 done
8484 kubectl get all
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # ## Default properties
3+ # ## bootstrap servers, timeout
4+ timeout=${1:- 60}
5+ bootstrap_servers=${2:- " localhost:${SERVER_port} " }
46
5- timeout 30 $KAFKA_HOME /bin/kafka-topics.sh --bootstrap-server localhost: ${SERVER_port} --list > /dev/null 2>&1
7+ timeout $timeout $KAFKA_HOME /bin/kafka-topics.sh --bootstrap-server $bootstrap_servers --list > /dev/null 2>&1
68if [[ $? -eq 0 ]]; then
7- echo -e " \033[32mKafka server is running , :-)\033[0m"
9+ echo -e " \033[32mKafka topics list command executed successfully , :-)\033[0m"
810 exit 0
911else
10- echo -e " \033[31mKafka server is not running , :-(\033[0m"
12+ echo -e " \033[31mKafka topics list command failed , :-(\033[0m"
1113 exit 1
1214fi
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ function check()
7373 echo " ERROR: Max number of attempts was reached (${MAX_ATTEMPTS} )"
7474 exit 1
7575 fi
76- READY_REPLICAS=$( oc get statefulset -l component=${2:- kafka} -o jsonpath=' {.items[?(@.kind=="StatefulSet")].status.currentReplicas }' 2>&1 )
76+ READY_REPLICAS=$( oc get statefulset -l component=${2:- kafka} -o jsonpath=' {.items[?(@.kind=="StatefulSet")].status.readyReplicas }' 2>&1 )
7777 echo " [${ATTEMPTS} /${MAX_ATTEMPTS} ] - Ready replicas : ${READY_REPLICAS:- 0} /$REPLICAS ... "
7878 done
7979 oc get all
You can’t perform that action at this time.
0 commit comments