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

chore: update xline pod of ci,add probe,volume and security config. #745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably requires a better one, but I haven't found one. Remind me if i missed something,Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, this requires the application to have /readyz and /livez interfaces. etcd is also implement the grpc for it etcd-io/etcd@293f087#diff-ab6fb0684315e16355f6ebe0f4b3cf860b9b2ff5a0fe1b4e4308a680b19f1b0c

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
Loading