This patch introduces a new structure of the it/dep repo.
[it/dep.git] / infra / 10-Nexus / helm / templates / save-secret-job.yaml
diff --git a/infra/10-Nexus/helm/templates/save-secret-job.yaml b/infra/10-Nexus/helm/templates/save-secret-job.yaml
new file mode 100644 (file)
index 0000000..801df24
--- /dev/null
@@ -0,0 +1,27 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: cert-copy
+spec:
+  template:
+    spec:
+      containers:
+      - name: cert-copy
+        image: alpine
+        command: ["cp", "-rL", "/var/run/certs/..data/tls.crt", "/var/run/certs-copy/"]
+        #        command: ["tail", "-f", "/dev/null"]
+        volumeMounts:
+        - name: certs
+          mountPath: /var/run/certs
+          readOnly: true
+        - name:  write-to-volume
+          mountPath: /var/run/certs-copy
+      volumes:
+      - name: certs
+        secret:
+          secretName: {{ include "common.repositorycert" . }}
+      - name: write-to-volume
+        hostPath:
+          path: /tmp
+      restartPolicy: Never
+  backoffLimit: 4