Skip to content

Commit

Permalink
chore: update xline pod of ci,add probe,volume and security config.
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Liang <[email protected]>
  • Loading branch information
liangyuanpeng committed May 3, 2024
1 parent 6efe947 commit 6cc1026
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 8 deletions.
54 changes: 47 additions & 7 deletions ci/artifacts/xline-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
4 changes: 3 additions & 1 deletion ci/scripts/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6cc1026

Please sign in to comment.