Skip to content

fix: add script error handling, clean up Redis config, add graceful shutdown#428

Open
Flegma wants to merge 3 commits intomainfrom
audit/417-scripts-config
Open

fix: add script error handling, clean up Redis config, add graceful shutdown#428
Flegma wants to merge 3 commits intomainfrom
audit/417-scripts-config

Conversation

@Flegma
Copy link
Copy Markdown
Contributor

@Flegma Flegma commented Apr 8, 2026

Summary

  • Add set -euo pipefail to install.sh with error checks after K3s install and kubectl node labeling
  • Add domain validation in setup-env.sh (non-empty, no spaces)
  • Remove contradictory appendonly no and save "" lines from Redis config that were overridden later in the same file
  • Add updateStrategy: RollingUpdate with maxUnavailable: 1 to connector DaemonSet
  • Add terminationGracePeriodSeconds: 30 to API, Hasura, and Connector pod specs
  • Reduce API ingress body size limit from 4G to 100M

Addresses #417, #418, and #419

Test plan

  • Verify install.sh exits on K3s install failure
  • Verify setup-env.sh rejects empty or space-containing domain names
  • Verify Redis starts correctly without contradictory config lines
  • Verify DaemonSet rolling updates respect maxUnavailable
  • Verify pods get 30s grace period on termination
  • Verify API ingress accepts requests up to 100M but rejects larger

Flegma added 2 commits April 8, 2026 14:27
CS2 demo files can be 100-300MB+. The previous 100M limit would
cause 413 errors on demo uploads. 500M accommodates large demos
while still being much safer than the original 4G.
name: api
namespace: 5stack
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "4G"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no , for demos. needs to be bigger

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted to 4G in 1d2a406.

# Persistence strategy: hybrid RDB snapshots + AOF for durability.
# RDB provides point-in-time snapshots; AOF provides write-level durability.
tcp-keepalive 240
appendonly no
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are required for queues

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored appendonly no and save "" in 1d2a406.

install.sh Outdated
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while testing this seems to break things

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed set -euo pipefail and reverted the error-handling wrappers in 1d2a406.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants