Skip to content

Devops mvp - #1

Merged
vpal merged 7 commits into
masterfrom
devops-mvp
Oct 19, 2026
Merged

vpal merged 7 commits into
masterfrom
devops-mvp

Conversation

@vpal

@vpal vpal commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Make the existing Flask application deployable and verify each change
through GitHub Actions.

  • Run Gunicorn in a non-root Python container with pinned dependencies.
  • Add a Helm Deployment and ClusterIP Service with health probes,
    resource requests/limits, and restricted container permissions.
  • Build once, run unit tests, scan the image, deploy it to a temporary
    Kind cluster, verify HTTP, and clean up the cluster.
  • Provide shared tool versions and just recipes for local development
    and checks, with setup and usage instructions in the README.

CI blocks all CRITICAL vulnerabilities, including unfixed ones.
HIGH and lower findings remain in the full report for review.
CI deployments are temporary and require no external cluster or registry.

Validation: branch CI passed, including image tests, scanning,
deployment, HTTP verification, report upload, and cleanup.
Local checks passed on Linux using Bash and Zsh; native macOS
execution remains unverified.

vpal added 7 commits October 17, 2026 11:14
Use the official Debian slim Python image for a simple build
and broad Python package compatibility. Alpine uses musl,
which can require additional compatibility work.

Distroless reduces runtime components but requires a separate
dependency installation stage for this application. Its lack
of a shell also makes interactive debugging less convenient.

Docker Hardened Images are another option, but require
registry authentication. Keep the single-stage slim build
for this MVP.

Update the Python dependencies and pin the tested versions
in requirements.txt. Run Gunicorn as a non-root user to limit
the application's permissions.

Replace the local shell commands with just recipes. Recreate
the virtual environment when requirements change and record
successful installation so unchanged dependencies are reused.
Enable code reload for local development on loopback only.

Bootstrap a pinned just binary for Linux and macOS, verifying
its checksum. Keep downloaded tools outside version control.
Build the local image through Docker's cache and reuse its tag.

Document the local workflow and sourcing init.sh so its PATH
change applies to the current shell.
Keep shared shell code portable for use from Bash and Zsh.
Define the pinned version once and clear it after setup.
Verify downloads before installation, then remove temporary
files from .tools/downloads on success or failure.

Keep cleanup traps in a subshell to preserve the caller's
shell state. Use quoted, braced shell variable references.
Load the pinned just binary's native completion script when
init.sh is sourced in an interactive shell.

Initialize Zsh completion only when needed, without writing
a cache. Skip insecure completion directories.
Deploy one replica behind a ClusterIP Service with HTTP readiness
and liveness probes. Make the image, replica count, and CPU/memory
requests and limits configurable.

Run as non-root with dropped capabilities, no privilege escalation,
runtime seccomp, and no API token. Use a read-only root filesystem
and bounded writable /tmp for Gunicorn.

Use Kind with Docker for local deployment without a registry.
Install pinned, checksum-verified tools under .tools/bin and remove
temporary downloads.

Add k8s-* recipes for deployment, HTTP verification, port forwarding,
and cleanup. Keep cluster credentials local and ignored; document
KUBECONFIG for direct kubectl access.
Report a missing cluster with a deployment hint during verification.

Restart Pods after deployment to pick up the reused local image tag.
Keep conflict checks on normal upgrades. Add k8s-redeploy to reset
release values and replace resource definitions, discarding manual
edits.
Run GitHub Actions on branch pushes, pull requests to master,
and version tags. Use a temporary Kind cluster to verify
deployment without an external cluster or image registry.

Check Python, shell recipes, the justfile, workflow, and chart.
Test and scan one built image before deploying it and checking
HTTP. Block fixable high and critical vulnerabilities, retain
full scan reports and failure diagnostics, and clean up Kind.

Pin actions by commit and upstream tool images by digest. Share
tool versions with local just recipes to keep checks aligned.
Cache build layers and scan databases while running checks on
every change. Limit repository permissions to read access.

Tag images with the source commit and version tag when present.
Document local checks and where to find CI results.
Treat HIGH and lower findings as review work for this MVP.
Block every CRITICAL finding, including those without a fix,
and retain the complete report.

Use Trivy's severity filter to keep the gate simple. Align CI
and local scans and document the threshold. Existing HIGH
findings remain remediation follow-ups.
@vpal
vpal merged commit e3d6603 into master Oct 19, 2026
2 checks passed
@vpal
vpal deleted the devops-mvp branch October 19, 2026 18:23
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.

1 participant