titan-iac/services/maintenance/node-nofile-daemonset.yaml

48 lines
1.2 KiB
YAML
Raw Normal View History

# services/maintenance/node-nofile-daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-nofile
namespace: maintenance
spec:
selector:
matchLabels:
app: node-nofile
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: node-nofile
spec:
serviceAccountName: node-nofile
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: node-nofile
image: bitnami/kubectl@sha256:554ab88b1858e8424c55de37ad417b16f2a0e65d1607aa0f3fe3ce9b9f10b131
command: ["/usr/bin/env", "bash"]
args: ["/scripts/node_nofile.sh"]
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- name: host-root
mountPath: /host
- name: script
mountPath: /scripts
readOnly: true
volumes:
- name: host-root
hostPath:
path: /
- name: script
configMap:
name: node-nofile-script
defaultMode: 0555