Skip to content

Commit 48ff95b

Browse files
committed
apps: base: state-to-git: cronjob: Update command.
1 parent ff2521e commit 48ff95b

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

apps/base/state-to-git/cronjob.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,16 @@ spec:
1818
- name: state-to-git
1919
image: docker-registry.wugi.info/library/util-linux-with-udev
2020
command:
21-
- nsenter
22-
- --target
23-
- "1"
24-
- --mount
25-
- --uts
26-
- --ipc
27-
- --net
28-
- --pid
29-
- --no-fork
3021
- /bin/sh
31-
- -l
3222
- -c
33-
- sudo --user=oleg --login bash -ic 'git pull --rebase origin master'
34-
workingDir: "/home/oleg/ansible-out/files"
23+
- |
24+
set -o nounset -o errexit -o pipefail -o xtrace
25+
exec nsenter --target "1" --mount --uts --ipc --net --pid --no-fork \
26+
/run/setuid-programs/sudo --user=oleg --login bash <<'EOF'
27+
set -o nounset -o errexit -o pipefail -o xtrace
28+
cd /home/oleg/ansible-out/files || exit 1
29+
git pull --rebase origin master
30+
EOF
3531
resources:
3632
limits:
3733
cpu: 2000m

0 commit comments

Comments
 (0)