Skip to content

Commit e545ec3

Browse files
Add the example of server deployment using etcd
1 parent 1bfae4c commit e545ec3

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

examples/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ AGENT_IMAGE_TAG=${AGENT_IMAGE_TAG:-$IMAGE_TAG}
4040
SERVER_PORT=${SERVER_PORT:-8081}
4141

4242
if [ -z ${USE_ETCD_ENDPOINT} ] ; then
43-
# use 3rd party resource API for store agents state
43+
# use 3rd party resource API to store agents state
4444
SERVER_ENV_TAIL="-kubeproxyinit"
4545
else
46-
# use ETCD for store agent reports
46+
# use ETCD to store agent reports
4747
ETCD_ENDPOINT=${ETCD_ENDPOINT:-"https://localhost:2379"}
4848
EEPS=$(etcdctl --endpoints=${ETCD_ENDPOINT} member list | awk '{print $4}' | awk -F'=' '{print $2}' | paste -sd "," -)
4949
SERVER_ENV_TAIL="-etcd-endpoints=${EEPS}"

examples/deployment_etcd.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: apps/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: netchecker-server
5+
spec:
6+
replicas: 1
7+
template:
8+
metadata:
9+
annotations:
10+
prometheus.io/scrape: "true"
11+
prometheus.io/port: "8081"
12+
name: netchecker-server
13+
labels:
14+
app: netchecker-server
15+
namespace: default
16+
spec:
17+
containers:
18+
- name: netchecker-server
19+
image: mirantis/k8s-netchecker-server:stable
20+
imagePullPolicy: IfNotPresent
21+
ports:
22+
- containerPort: 8081
23+
args:
24+
- "-v=5"
25+
- "-logtostderr"
26+
- "-kubeproxyinit=false"
27+
- "-endpoint=0.0.0.0:8081"
28+
- "-report-ttl=180"
29+
- "-etcd-endpoints=https://172.0.10.2:4009,https://172.0.10.3:4009"
30+
- "-etcd-key=/var/lib/etcd/etcd-client.key"
31+
- "-etcd-cert=/var/lib/etcd/etcd-client.pem"
32+
- "-etcd-ca=/var/lib/etcd/ca.pem"
33+

0 commit comments

Comments
 (0)