2019-09-11 03:06:55 +08:00
|
|
|
apiVersion: apps/v1
|
2016-09-30 23:23:47 +08:00
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-03-28 22:33:07 +08:00
|
|
|
app: netchecker-agent-hostnet
|
|
|
|
name: netchecker-agent-hostnet
|
2016-09-30 23:23:47 +08:00
|
|
|
namespace: {{ netcheck_namespace }}
|
|
|
|
spec:
|
2019-09-11 03:06:55 +08:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: netchecker-agent-hostnet
|
2016-09-30 23:23:47 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
2017-03-28 22:33:07 +08:00
|
|
|
name: netchecker-agent-hostnet
|
2016-09-30 23:23:47 +08:00
|
|
|
labels:
|
2017-03-28 22:33:07 +08:00
|
|
|
app: netchecker-agent-hostnet
|
2016-09-30 23:23:47 +08:00
|
|
|
spec:
|
2019-06-05 18:17:56 +08:00
|
|
|
hostNetwork: true
|
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2018-06-05 19:15:20 +08:00
|
|
|
nodeSelector:
|
2020-04-17 20:51:06 +08:00
|
|
|
kubernetes.io/os: linux
|
2018-09-25 22:50:22 +08:00
|
|
|
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
2017-08-24 17:04:25 +08:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2016-09-30 23:23:47 +08:00
|
|
|
containers:
|
|
|
|
- name: netchecker-agent
|
2018-12-04 02:29:42 +08:00
|
|
|
image: "{{ netcheck_agent_image_repo }}:{{ netcheck_agent_image_tag }}"
|
2016-09-30 23:23:47 +08:00
|
|
|
env:
|
|
|
|
- name: MY_POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
2017-04-24 21:46:16 +08:00
|
|
|
- name: MY_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2017-01-19 18:56:14 +08:00
|
|
|
args:
|
|
|
|
- "-v=5"
|
|
|
|
- "-alsologtostderr=true"
|
|
|
|
- "-serverendpoint=netchecker-service:8081"
|
|
|
|
- "-reportinterval={{ agent_report_interval }}"
|
2016-09-30 23:23:47 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-12-23 22:44:44 +08: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-23 00:16:13 +08:00
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ netchecker_agent_user | default('0') }}
|
|
|
|
runAsGroup: {{ netchecker_agent_group | default('0') }}
|
|
|
|
serviceAccountName: netchecker-agent
|
2017-09-04 16:30:01 +08:00
|
|
|
updateStrategy:
|
|
|
|
rollingUpdate:
|
2017-09-15 20:19:37 +08:00
|
|
|
maxUnavailable: 100%
|
2017-09-04 16:30:01 +08:00
|
|
|
type: RollingUpdate
|