103 lines
2.8 KiB
Django/Jinja
103 lines
2.8 KiB
Django/Jinja
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: vector
|
|
namespace: {{ taskserv.namespace }}
|
|
labels:
|
|
app: vector
|
|
app.kubernetes.io/managed-by: provisioning
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: vector
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vector
|
|
app.kubernetes.io/managed-by: provisioning
|
|
spec:
|
|
serviceAccountName: vector
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
securityContext:
|
|
runAsUser: 0
|
|
containers:
|
|
- name: vector
|
|
image: {{ taskserv.image }}
|
|
args:
|
|
- --config
|
|
- /etc/vector/vector.toml
|
|
env:
|
|
- name: VECTOR_SELF_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: VECTOR_SELF_POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: VECTOR_SELF_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- containerPort: {{ taskserv.provides.port | default(value=8686) }}
|
|
name: api
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/vector
|
|
readOnly: true
|
|
- name: var-log
|
|
mountPath: /var/log
|
|
readOnly: true
|
|
- name: vector-data
|
|
mountPath: /var/lib/vector
|
|
- name: procfs
|
|
mountPath: /host/proc
|
|
readOnly: true
|
|
- name: sysfs
|
|
mountPath: /host/sys
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: {{ taskserv.provides.port | default(value=8686) }}
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: {{ taskserv.provides.port | default(value=8686) }}
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 15
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: vector-config
|
|
- name: var-log
|
|
hostPath:
|
|
path: /var/log
|
|
- name: vector-data
|
|
hostPath:
|
|
path: /var/lib/vector
|
|
type: DirectoryOrCreate
|
|
- name: procfs
|
|
hostPath:
|
|
path: /proc
|
|
- name: sysfs
|
|
hostPath:
|
|
path: /sys
|