2016-09-30 15:23:47 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-03-28 14:33:07 +00:00
|
|
|
app: netchecker-agent-hostnet
|
|
|
|
name: netchecker-agent-hostnet
|
2016-09-30 15:23:47 +00:00
|
|
|
namespace: {{ netcheck_namespace }}
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
2017-03-28 14:33:07 +00:00
|
|
|
name: netchecker-agent-hostnet
|
2016-09-30 15:23:47 +00:00
|
|
|
labels:
|
2017-03-28 14:33:07 +00:00
|
|
|
app: netchecker-agent-hostnet
|
2016-09-30 15:23:47 +00:00
|
|
|
spec:
|
2017-03-28 14:33:07 +00:00
|
|
|
hostNetwork: True
|
2018-06-05 11:15:20 +00:00
|
|
|
# When having win nodes in cluster without this patch, this pod cloud try to be created in windows
|
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/os: linux
|
2018-10-16 22:33:30 +00:00
|
|
|
{% if kube_version is version('v1.6', '>=') %}
|
2017-03-28 14:33:07 +00:00
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2018-09-25 14:50:22 +00:00
|
|
|
{% endif %}
|
2018-10-16 22:33:30 +00:00
|
|
|
{% if kube_version is version('v1.11.1', '>=') %}
|
2018-09-25 14:50:22 +00:00
|
|
|
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
2017-03-28 14:33:07 +00:00
|
|
|
{% endif %}
|
2017-08-24 09:04:25 +00:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2016-09-30 15:23:47 +00:00
|
|
|
containers:
|
|
|
|
- name: netchecker-agent
|
|
|
|
image: "{{ agent_img }}"
|
|
|
|
env:
|
|
|
|
- name: MY_POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
2017-04-24 13:46:16 +00:00
|
|
|
- name: MY_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2017-01-19 10:56:14 +00:00
|
|
|
args:
|
|
|
|
- "-v=5"
|
|
|
|
- "-alsologtostderr=true"
|
|
|
|
- "-serverendpoint=netchecker-service:8081"
|
|
|
|
- "-reportinterval={{ agent_report_interval }}"
|
2016-09-30 15:23:47 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-12-23 14:44:44 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: {{ netchecker_agent_cpu_limit }}
|
|
|
|
memory: {{ netchecker_agent_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ netchecker_agent_cpu_requests }}
|
|
|
|
memory: {{ netchecker_agent_memory_requests }}
|
2018-08-22 16:16:13 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ netchecker_agent_user | default('0') }}
|
|
|
|
runAsGroup: {{ netchecker_agent_group | default('0') }}
|
|
|
|
serviceAccountName: netchecker-agent
|
2017-09-04 08:30:01 +00:00
|
|
|
updateStrategy:
|
|
|
|
rollingUpdate:
|
2017-09-15 12:19:37 +00:00
|
|
|
maxUnavailable: 100%
|
2017-09-04 08:30:01 +00:00
|
|
|
type: RollingUpdate
|