kind: DaemonSet apiVersion: apps/v1 metadata: name: syncimages namespace: ops labels: app: tool component: syncimages spec: selector: matchLabels: app: tool component: syncimages template: metadata: labels: app: tool component: syncimages spec: containers: - name: syncimages image: 'repository.anxinyun.cn/devops/syncimages:0.23' imagePullPolicy: IfNotPresent securityContext: privileged: true volumeMounts: - name: docker-sock mountPath: /var/run/docker.sock affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/worker operator: In values: - '' - worker podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - tool - key: component operator: In values: - syncimages namespaces: - ops topologyKey: kubernetes.io/hostname volumes: - name: docker-sock hostPath: path: /var/run/docker.sock