File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
16
- # This script only fits for Linux, macOS adaptation will come soon
17
-
16
+ # This script works for both linux and macOS.
18
17
set -o errexit
19
18
set -o nounset
20
19
set -o pipefail
70
69
function rand() {
71
70
min=$1
72
71
max=$(( $2 - $min + 1 ))
73
- num=$( date +%s%N )
72
+ num=$( date +%s)
74
73
echo $(( $num % $max + $min ))
75
74
}
76
75
@@ -96,7 +95,8 @@ cp -rf "${REPO_ROOT}"/artifacts/kindClusterConfig/general-config.yaml "${TEMP_PA
96
95
sed -i' ' -e " s#{{pod_cidr}}#${POD_CIDR} #g" " ${TEMP_PATH} " /" ${CLUSTER_NAME} " -config.yaml
97
96
sed -i' ' -e " s#{{service_cidr}}#${SERVICE_CIDR} #g" " ${TEMP_PATH} " /" ${CLUSTER_NAME} " -config.yaml
98
97
99
- kind_log=" $( mktemp --suffix=-kind.log) "
98
+ mkdir -p /tmp/kind-log/
99
+ kind_log=" /tmp/kind-log/$( date +%s) "
100
100
echo " Creating cluster \" ${CLUSTER_NAME} \" ..."
101
101
kind create cluster --name " ${CLUSTER_NAME} " --kubeconfig=" ${KUBECONFIG} " --image=" ${CLUSTER_VERSION} " --config=" ${TEMP_PATH} " /" ${CLUSTER_NAME} " -config.yaml > ${kind_log} 2>&1 || (
102
102
echo " Creating cluster ${CLUSTER_NAME} failed, see detail log in ${kind_log} ."
You can’t perform that action at this time.
0 commit comments