2019-09-10 19:06:55 +00:00
|
|
|
apiVersion: apps/v1
|
2017-04-14 08:49:16 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: netchecker-server
|
2019-09-10 19:06:55 +00:00
|
|
|
namespace: {{ netcheck_namespace }}
|
|
|
|
labels:
|
|
|
|
app: netchecker-server
|
2017-04-14 08:49:16 +00:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
2019-09-10 19:06:55 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: netchecker-server
|
2017-04-14 08:49:16 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: netchecker-server
|
|
|
|
labels:
|
|
|
|
app: netchecker-server
|
|
|
|
spec:
|
2018-09-25 14:50:22 +00:00
|
|
|
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-cluster-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
2021-10-19 17:17:04 +00:00
|
|
|
volumes:
|
|
|
|
- name: etcd-data
|
|
|
|
emptyDir: {}
|
2017-04-14 08:49:16 +00:00
|
|
|
containers:
|
|
|
|
- name: netchecker-server
|
2018-12-03 18:29:42 +00:00
|
|
|
image: "{{ netcheck_server_image_repo }}:{{ netcheck_server_image_tag }}"
|
2017-04-14 08:49:16 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: {{ netchecker_server_cpu_limit }}
|
|
|
|
memory: {{ netchecker_server_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ netchecker_server_cpu_requests }}
|
|
|
|
memory: {{ netchecker_server_memory_requests }}
|
2018-08-22 16:16:13 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ netchecker_server_user | default('0') }}
|
|
|
|
runAsGroup: {{ netchecker_server_group | default('0') }}
|
2017-04-14 08:49:16 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 8081
|
|
|
|
args:
|
2021-10-19 17:17:04 +00:00
|
|
|
- -v=5
|
|
|
|
- -logtostderr
|
|
|
|
- -kubeproxyinit=false
|
|
|
|
- -endpoint=0.0.0.0:8081
|
|
|
|
- -etcd-endpoints=http://127.0.0.1:2379
|
|
|
|
- name: etcd
|
|
|
|
image: "{{ etcd_image_repo }}:{{ netcheck_etcd_image_tag }}"
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
command:
|
|
|
|
- etcd
|
|
|
|
- --listen-client-urls=http://127.0.0.1:2379
|
|
|
|
- --advertise-client-urls=http://127.0.0.1:2379
|
|
|
|
- --data-dir=/var/lib/etcd
|
|
|
|
- --enable-v2
|
|
|
|
- --force-new-cluster
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/lib/etcd
|
|
|
|
name: etcd-data
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: {{ netchecker_etcd_cpu_limit }}
|
|
|
|
memory: {{ netchecker_etcd_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ netchecker_etcd_cpu_requests }}
|
|
|
|
memory: {{ netchecker_etcd_memory_requests }}
|
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ netchecker_server_user | default('0') }}
|
|
|
|
runAsGroup: {{ netchecker_server_group | default('0') }}
|
2017-09-04 08:29:40 +00:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2017-07-17 11:28:09 +00:00
|
|
|
serviceAccountName: netchecker-server
|