Kubes, snakes, kube-snakes. Awsome.
  • C# 60.7%
  • HTML 20.1%
  • CSS 14.5%
  • Dockerfile 4.7%
Find a file
2026-08-05 18:14:28 +02:00
.github/workflows Refactor: trying to fix the SHA tag in snake-api values.yaml 2025-10-17 11:44:09 +02:00
apps Bugfixes: removed an erranous file and corrected some templates 2025-10-17 15:27:06 +02:00
argocd/applications Remove secrets application from ArgoCD root-app 2025-10-17 15:44:32 +02:00
docs Refactor: Updated documentation 2025-10-21 11:03:52 +02:00
helm/charts Move plain secrets outside Helm charts to avoid ArgoCD conflicts 2025-10-17 15:37:15 +02:00
k8s Refactor: set letsencrypt-prod issuer for healthcheck ingress and add mongodb.connectionStringSecret to guestbook values 2025-10-08 08:25:19 +02:00
.gitignore Move plain secrets outside Helm charts to avoid ArgoCD conflicts 2025-10-17 15:37:15 +02:00
LICENSE Feature: Add MongoDB Helm chart with Sealed Secrets and ArgoCD integration 2025-10-07 10:48:23 +02:00
README.md Move/Initialization: Moved this repo here from GitHub. Legacy material that will be reviewed soon. 2026-08-05 18:14:28 +02:00

Under review

This legacy project has been moved from GitHub to this Forgejo-host. Pipelines and data are old and outdated. There will be a review of the project in near time, but until this README is updated, consider this project to be legacy code with no active relevance.

Author: https://git.mymh.dev/mymh

Documentation in /docs/ -

architecture.md - architectural layout
initialouttake.md - initial outtake of the project
kube-snake-documenations.docx - raw Word file with timeline and summary of documenation
kubeseal_sealed_secrets.md - kubeseal + sealed secrets documentation, came with install
phase_one.md - documentation of phase one of the project
phase_two.md - documentation of phase two
phase_three.md - documentation of phase three

Basic project structure:

Kube-Snake                  # Project root
│
├───.github
│   └───workflows           # GitHub Actions CI/CD pipelines
│
├───apps                    # Web applications
│   ├───snake               # Snake game frontend
│   ├───snake-api           # Snake game backend
│   ├───guestbook           # .NET 9 Minimal API guestbook app
│   │   ├───Endpoints       # API endpoints (Auth, Messages)
│   │   ├───Extensions      # Service configuration extensions
│   │   ├───Helpers         # HTML rendering, authentication helpers
│   │   ├───Models          # Data models (Message)
│   │   ├───Properties      # Project properties
│   │   └───Services        # MongoDB service
│   └───healthcheck         # System health monitoring page
│
├───argocd
│   └───applications        # ArgoCD Application manifests
│
├───docs                    # Project documentation (phases, architecture)
│
├───helm
│   └───charts              # Helm charts for deployments
│       ├───guestbook       # Guestbook application chart
│       │   └───templates   # K8s manifests (Deployment, Service, etc.)
│       ├───healthcheck     # Healthcheck application chart
│       │   └───templates
│       ├───mongodb         # MongoDB StatefulSet chart
│       │   └───templates
│       └───secrets         # SealedSecrets for credentials
│
└───k8s
    ├───cert-manager        # TLS certificate management
    ├───guestbook           # (Legacy/manual K8s manifests)
    └───traefik             # Ingress controller configuration

Flowcharts

GitOps Deployment FLowchart

Developer Push
    ↓
GitHub Actions (build + tag image)
    ↓
Push to GHCR
    ↓
Update values.yaml (automated)
    ↓
ArgoCD polls Git (every 30 min)
    ↓
Detect change → Sync
    ↓
K3s pulls new image
    ↓
Rolling deployment

User Interaction FLowchart

User Browser (HTTPS)
    ↓
Caddy Reverse Proxy (VM:<port>)
    ↓
K3s Ingress
    ↓
Healthcheck Service → Healthcheck Pod
    ↓ (HTMX request to /guestbook/api/*)
Guestbook Service → Guestbook Pod (any replica)
    ↓
MongoDB (read/write messages)
    ↓
Redis (session validation)
    ↓
Response (HTML partial via HTMX)

Guestbook Admin Authentication FLowchart

Admin Login Form
    ↓
POST /guestbook/api/login
    ↓
Validate credentials (env vars from SealedSecret)
    ↓
Store session in Redis
    ↓
Set cookie (HttpOnly, Secure, SameSite=None)
    ↓
Return admin panel HTML
    ↓
Subsequent requests validate cookie → Redis lookup
    ↓
Any pod can serve authenticated requests