Skip to content

Commit

Permalink
feat: linking mounted certificates from '/var/run/secrets/kubernetes.…
Browse files Browse the repository at this point in the history
…io/serviceaccount' to '/home/ibuziuk/.config/containers/certs.d' before podman login

Signed-off-by: Ilya Buziuk <[email protected]>
  • Loading branch information
ibuziuk committed Jul 3, 2023
1 parent b74fce1 commit 7743d99
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ export class PodmanApiService implements IPodmanApi {
[
'sh',
'-c',
`podman login --cert-dir /var/run/secrets/kubernetes.io/serviceaccount -u $(oc whoami) -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000`,
`
export CERTS_SRC="/var/run/secrets/kubernetes.io/serviceaccount"
export CERTS_DEST="$HOME/.config/containers/certs.d/image-registry.openshift-image-registry.svc:5000"
mkdir -p $CERTS_DEST
ln -s $CERTS_SRC/service-ca.crt $CERTS_DEST/service-ca.crt
ln -s $CERTS_SRC/ca.crt $CERTS_DEST/ca.crt
podman login -u $(oc whoami) -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000
`,
],
this.getServerConfig(),
);
Expand Down

0 comments on commit 7743d99

Please sign in to comment.