-
Notifications
You must be signed in to change notification settings - Fork 2
cron pod is now always deleted gracefully #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jg/webserver-probes
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,10 +8,7 @@ spec: | |||||
| progressDeadlineSeconds: 1500 | ||||||
| replicas: 1 | ||||||
| strategy: | ||||||
| rollingUpdate: | ||||||
| maxSurge: 1 | ||||||
| maxUnavailable: 0 | ||||||
| type: RollingUpdate | ||||||
| type: Recreate | ||||||
| selector: | ||||||
| matchLabels: | ||||||
| app: cron | ||||||
|
|
@@ -25,6 +22,7 @@ spec: | |||||
| labels: | ||||||
| app: cron | ||||||
| spec: | ||||||
| terminationGracePeriodSeconds: 3000 | ||||||
| tolerations: | ||||||
| - key: "workload" | ||||||
| operator: "Equal" | ||||||
|
|
@@ -38,8 +36,7 @@ spec: | |||||
| matchExpressions: | ||||||
| - key: workload | ||||||
| operator: In | ||||||
| values: | ||||||
| - background | ||||||
| values: ["background"] | ||||||
| volumes: | ||||||
| - name: domains-urls | ||||||
| configMap: | ||||||
|
|
@@ -61,14 +58,30 @@ spec: | |||||
| runAsUser: 0 | ||||||
| imagePullPolicy: IfNotPresent | ||||||
| workingDir: /var/www/html | ||||||
| command: ["/bin/sh","-c"] | ||||||
| args: ["cd /var/www/html && ./phing warmup > /dev/null && rm -rf /tmp/log-pipe && mkfifo /tmp/log-pipe && chmod 666 /tmp/log-pipe && crontab -u root /var/spool/cron/template && { crond || cron; } && stdbuf -o0 tail -n +1 -f /tmp/log-pipe"] | ||||||
| command: ["/bin/sh","-lc"] | ||||||
| args: | ||||||
| - > | ||||||
| ./phing warmup > /dev/null | ||||||
|
|
||||||
| # FIFO for logs | ||||||
| rm -f /tmp/log-pipe && mkfifo /tmp/log-pipe && chmod 666 /tmp/log-pipe | ||||||
|
|
||||||
| # crontab | ||||||
| crontab -u root /var/spool/cron/template | ||||||
|
|
||||||
| # run on backround | ||||||
|
||||||
| # run on backround | |
| # run in background |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args uses a folded block scalar (>) while also including shell comment lines (e.g. # FIFO for logs). YAML folding joins the # ... line with the next command into a single shell line, causing the following command(s) to be commented out at runtime (e.g. rm -f ..., crontab ..., stdbuf ...). Use a literal block scalar (|) or remove/move the # comment lines so each command remains on its own line when executed.
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous single-line args used &&, so failures in ./phing warmup, FIFO setup, or crontab would stop the container and surface the error. With the new multi-line script, failures won’t stop execution unless you explicitly enable fail-fast (e.g., set -e near the top) or reintroduce && chaining for the critical steps.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.