Skip to content

Commit a37de92

Browse files
committed
podvm: mount host's containers configs
in order to allow in-job podman & skopeo to mimic host's containers configuration including: - registries config (needed for mirroring) - auths config (needed for registry credentials) - policy config (needed for signing policy) ignoring regauth as it should be deprecated in the future Signed-off-by: Snir Sheriber <[email protected]>
1 parent da51c7b commit a37de92

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

config/peerpods/podvm/osc-podvm-create-job.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ spec:
8181
readOnly: true
8282
- name: store-volume
8383
mountPath: /store
84+
- name: registries-conf
85+
mountPath: /etc/containers/registries.conf
86+
readOnly: true
87+
- name: registries-conf-d
88+
mountPath: /etc/containers/registries.conf.d
89+
readOnly: true
90+
- name: containers-auth
91+
mountPath: /root/.config/containers/auth.json
92+
readOnly: true
93+
- name: containers-policy
94+
mountPath: /etc/containers/policy.json
95+
readOnly: true
8496
# Default is 30s which is too less for the preStop hook to fully execute
8597
terminationGracePeriodSeconds: 180
8698
volumes:
@@ -99,4 +111,20 @@ spec:
99111
optional: true
100112
- name: store-volume
101113
emptyDir: {}
114+
- name: registries-conf
115+
hostPath:
116+
path: /etc/containers/registries.conf
117+
type: FileOrCreate
118+
- name: registries-conf-d
119+
hostPath:
120+
path: /etc/containers/registries.conf.d
121+
type: DirectoryOrCreate
122+
- name: containers-auth
123+
hostPath:
124+
path: /var/lib/kubelet/config.json
125+
type: File
126+
- name: containers-policy
127+
hostPath:
128+
path: /etc/containers/policy.json
129+
type: FileOrCreate
102130
restartPolicy: Never

0 commit comments

Comments
 (0)