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 %}{{''}}
|
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
|
|
|
env:
|
|
|
|
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:
|
|
|
|
- "-v=5"
|
|
|
|
- "-logtostderr"
|
|
|
|
- "-kubeproxyinit"
|
|
|
|
- "-endpoint=0.0.0.0:8081"
|
2017-09-04 08:29:40 +00:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2017-07-17 11:28:09 +00:00
|
|
|
serviceAccountName: netchecker-server
|