mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-11-09 13:42:55 +08:00
adjust update-helm script to enable readiness check
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
c908defda6
commit
e072d07fc2
1 changed files with 10 additions and 0 deletions
|
|
@ -25,6 +25,8 @@ set -ex
|
||||||
cd manual-install
|
cd manual-install
|
||||||
cp latest.yml latest.yml.backup
|
cp latest.yml latest.yml.backup
|
||||||
|
|
||||||
|
# Additional config
|
||||||
|
# shellcheck disable=SC1083
|
||||||
sed -i -E '/^( *- )(NET_RAW|SYS_NICE|MKNOD|SYS_ADMIN)$/!s/( *- )([A-Z_]+)$/\1\2=${\2}/' latest.yml
|
sed -i -E '/^( *- )(NET_RAW|SYS_NICE|MKNOD|SYS_ADMIN)$/!s/( *- )([A-Z_]+)$/\1\2=${\2}/' latest.yml
|
||||||
cp sample.conf /tmp/
|
cp sample.conf /tmp/
|
||||||
sed -i 's|^|export |' /tmp/sample.conf
|
sed -i 's|^|export |' /tmp/sample.conf
|
||||||
|
|
@ -117,6 +119,12 @@ EOL
|
||||||
DEPLOYMENTS="$(find ./ -name '*deployment.yaml')"
|
DEPLOYMENTS="$(find ./ -name '*deployment.yaml')"
|
||||||
mapfile -t DEPLOYMENTS <<< "$DEPLOYMENTS"
|
mapfile -t DEPLOYMENTS <<< "$DEPLOYMENTS"
|
||||||
for variable in "${DEPLOYMENTS[@]}"; do
|
for variable in "${DEPLOYMENTS[@]}"; do
|
||||||
|
if grep -q livenessProbe "$variable"; then
|
||||||
|
sed -n "/.*livenessProbe/,/timeoutSeconds.*/p" "$variable" > /tmp/liveness.probe
|
||||||
|
cat /tmp/liveness.probe
|
||||||
|
sed -i "s|livenessProbe|readinessProbe|" /tmp/liveness.probe
|
||||||
|
sed -i "/^ image:/r /tmp/liveness.probe" "$variable"
|
||||||
|
fi
|
||||||
if grep -q volumeMounts "$variable"; then
|
if grep -q volumeMounts "$variable"; then
|
||||||
if echo "$variable" | grep -q database; then
|
if echo "$variable" | grep -q database; then
|
||||||
sed -i "/^ spec:/r /tmp/initcontainers.database" "$variable"
|
sed -i "/^ spec:/r /tmp/initcontainers.database" "$variable"
|
||||||
|
|
@ -197,6 +205,8 @@ find ./ -name '*deployment.yaml' -exec sed -i "s|manual-install-nextcloud-aio|ne
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
find ./ -name '*deployment.yaml' -exec sed -i "/medium: Memory/d" \{} \;
|
find ./ -name '*deployment.yaml' -exec sed -i "/medium: Memory/d" \{} \;
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
|
find ./ -name '*.yaml' -exec sed -i "/kompose.cmd/d" \{} \;
|
||||||
|
# shellcheck disable=SC1083
|
||||||
find ./ -name '*deployment.yaml' -exec sed -i "s|emptyDir:|emptyDir: \{\}|" \{} \;
|
find ./ -name '*deployment.yaml' -exec sed -i "s|emptyDir:|emptyDir: \{\}|" \{} \;
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
find ./ -name '*deployment.yaml' -exec sed -i "/hostPort:/d" \{} \;
|
find ./ -name '*deployment.yaml' -exec sed -i "/hostPort:/d" \{} \;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue