From 6cc1026e0901591bc85e95c415aeaacb2b13c89c Mon Sep 17 00:00:00 2001 From: Lan Liang Date: Sat, 30 Mar 2024 14:15:12 +0000 Subject: [PATCH] chore: update xline pod of ci,add probe,volume and security config. Signed-off-by: Lan Liang --- ci/artifacts/xline-pod.yaml | 54 ++++++++++++++++++++++++++++++++----- ci/scripts/kind.sh | 4 ++- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/ci/artifacts/xline-pod.yaml b/ci/artifacts/xline-pod.yaml index 3c789fd4f..208b7d138 100644 --- a/ci/artifacts/xline-pod.yaml +++ b/ci/artifacts/xline-pod.yaml @@ -6,12 +6,52 @@ metadata: namespace: kube-system spec: containers: - - name: xline - image: ghcr.io/xline-kv/xline:master - imagePullPolicy: IfNotPresent - command: - - /bin/sh - - -c - - xline --name node1 --members node1=kind-control-plane:2379 --data-dir /tmp/xline --storage-engine rocksdb --client-listen-urls=http://kind-control-plane:2379 --peer-listen-urls=http://kind-control-plane:2380,http://kind-control-plane:2381 --client-advertise-urls=http://kind-control-plane:2379 --peer-advertise-urls=http://kind-control-plane:2380,http://kind-control-plane:2381 + - name: xline + image: ghcr.io/xline-kv/xline:master + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 8 + httpGet: + host: 127.0.0.1 + path: /metrics + port: 9100 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 15 + startupProbe: + failureThreshold: 24 + httpGet: + host: 127.0.0.1 + path: /metrics + port: 9100 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 15 + volumeMounts: + - mountPath: /var/lib/xline + name: xline-data + command: + - xline + args: + - --name=node1 + - --members=node1=kind-control-plane:2379 + - --data-dir=/var/lib/xline + - --storage-engine=rocksdb + - --client-listen-urls=http://kind-control-plane:2379 + - --peer-listen-urls=http://kind-control-plane:2380,http://kind-control-plane:2381 + - --client-advertise-urls=http://kind-control-plane:2379 + - --peer-advertise-urls=http://kind-control-plane:2380,http://kind-control-plane:2381 + volumes: + - hostPath: + path: /var/lib/xline + type: DirectoryOrCreate + name: xline-data hostNetwork: true + priority: 2000001000 + priorityClassName: system-node-critical + securityContext: + seccompProfile: + type: RuntimeDefault status: {} diff --git a/ci/scripts/kind.sh b/ci/scripts/kind.sh index ca3ca05ad..1bc431f37 100755 --- a/ci/scripts/kind.sh +++ b/ci/scripts/kind.sh @@ -11,7 +11,9 @@ wget -q https://github.com/kubernetes-sigs/kind/releases/download/v$KIND_VERSION chmod +x kind-linux-amd64 && mv kind-linux-amd64 /usr/local/bin/kind # print the config file -WORKSPACE=$PWD envsubst +echo "=== kind.yaml vvv ===" +WORKSPACE=$PWD envsubst < ci/artifacts/kind.yaml +echo "=== kind.yaml ^^^ ===" WORKSPACE=$PWD envsubst < ci/artifacts/kind.yaml | kind create cluster -v7 --retain --wait 4m --config - kubectl wait node --all --for condition=ready