Zhe Huang | 033ab42 | 2019-05-20 15:45:42 -0400 | [diff] [blame^] | 1 | apiVersion: batch/v1 |
| 2 | kind: Job |
| 3 | metadata: |
| 4 | name: cert-copy |
| 5 | spec: |
| 6 | template: |
| 7 | spec: |
| 8 | containers: |
| 9 | - name: cert-copy |
| 10 | image: alpine |
| 11 | command: ["cp", "-rL", "/var/run/certs/..data/tls.crt", "/var/run/certs-copy/"] |
| 12 | # command: ["tail", "-f", "/dev/null"] |
| 13 | volumeMounts: |
| 14 | - name: certs |
| 15 | mountPath: /var/run/certs |
| 16 | readOnly: true |
| 17 | - name: write-to-volume |
| 18 | mountPath: /var/run/certs-copy |
| 19 | volumes: |
| 20 | - name: certs |
| 21 | secret: |
| 22 | secretName: {{ include "common.repositorycert" . }} |
| 23 | - name: write-to-volume |
| 24 | hostPath: |
| 25 | path: /tmp |
| 26 | restartPolicy: Never |
| 27 | backoffLimit: 4 |