image-pull-daemonset.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: multus-validation-test-image-pull-{{ .NodeType }}
  5. labels:
  6. app: multus-validation-test-image-pull
  7. nodeType: "{{ .NodeType }}"
  8. app.kubernetes.io/name: "image-puller"
  9. app.kubernetes.io/instance: "image-puller-{{ .NodeType }}"
  10. app.kubernetes.io/component: "image-puller"
  11. app.kubernetes.io/part-of: "multus-validation-test"
  12. app.kubernetes.io/managed-by: "rook-cli"
  13. spec:
  14. selector:
  15. matchLabels:
  16. app: multus-validation-test-image-pull
  17. nodeType: "{{ .NodeType }}"
  18. template:
  19. metadata:
  20. labels:
  21. app: multus-validation-test-image-pull
  22. nodeType: "{{ .NodeType }}"
  23. spec:
  24. nodeSelector:
  25. {{- range $k, $v := .Placement.NodeSelector }}
  26. {{ $k }}: {{ $v }}
  27. {{- end }}
  28. tolerations:
  29. {{- range $idx, $toleration := .Placement.Tolerations }}
  30. - {{ $toleration.ToJSON }}
  31. {{- end }}
  32. securityContext:
  33. runAsNonRoot: true
  34. seccompProfile:
  35. type: RuntimeDefault
  36. containers:
  37. - name: sleep
  38. # use nginx image because it's already used for the web server pod and has a non-root user
  39. image: "{{ .NginxImage }}"
  40. command:
  41. - sleep
  42. - infinity
  43. resources: {}
  44. securityContext:
  45. allowPrivilegeEscalation: false
  46. capabilities:
  47. drop:
  48. - "ALL"
  49. readOnlyRootFilesystem: true