Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117748786
pin_image_digests.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
836 B
Referenced Files
None
Subscribers
None
pin_image_digests.sh
View Options
#!/bin/bash
REGISTRY
=
${
REGISTRY
:-
"registry.apps.ocp04.ait-msp-infra.net"
}
images
=(
imapImage,imap
kolabImage,webapp
collaboraImage,collabora
redisImage,redis
roundcubeImage,roundcube
mariadbImage,mariadb
meetImage,meet
coturnImage,coturn
postfixImage,postfix
utilsImage,utils
minioImage,minio
)
for
i
in
"
${
images
[@]
}
"
;
do
IFS
=
','
read
key image
<<<
"
${
i
}
"
if
[[
"
$1
"
==
"--unpin"
]]
;
then
TARGET
=
"
${
REGISTRY
}
/
${
image
}
:latest"
elif
[[
"
$1
"
==
"--version"
]]
;
then
TARGET
=
"
${
REGISTRY
}
/
${
image
}
:
$2
"
else
DIGEST
=
$(
sudo k3s ctr images ls
|
grep
"
${
REGISTRY
}
/
${
image
}
:latest"
|
awk
'BEGIN { FS=" " } ; { print $3 }'
)
TARGET
=
"
${
REGISTRY
}
/
${
image
}
@
${
DIGEST
}
"
fi
echo
"
${
key
}
"
and
"
${
TARGET
}
"
sed -i
"s|
${
key
}
:.*|
${
key
}
: \"
${
TARGET
}
\"|"
kolab/values.yaml
done
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Apr 4, 1:12 AM (1 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
98/5c/b679cb9cfc057e03f7c430954bf7
Default Alt Text
pin_image_digests.sh (836 B)
Attached To
Mode
R114 kolab-infrastructure
Attached
Detach File
Event Timeline