|
|
@ -1,4 +1,4 @@ |
|
|
|
kind: Deployment |
|
|
|
kind: DaemonSet |
|
|
|
apiVersion: apps/v1 |
|
|
|
metadata: |
|
|
|
name: syncimages |
|
|
@ -7,7 +7,6 @@ metadata: |
|
|
|
app: tool |
|
|
|
component: syncimages |
|
|
|
spec: |
|
|
|
replicas: 1 |
|
|
|
selector: |
|
|
|
matchLabels: |
|
|
|
app: tool |
|
|
@ -20,10 +19,39 @@ spec: |
|
|
|
spec: |
|
|
|
containers: |
|
|
|
- name: syncimages |
|
|
|
image: 'repository.anxinyun.cn/devops/syncimages:0.13' |
|
|
|
command: |
|
|
|
- ./run.sh |
|
|
|
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 |
|
|
|