{"id":28480512,"url":"https://github.com/gregheffner/cicd","last_synced_at":"2026-04-16T03:32:21.064Z","repository":{"id":296770219,"uuid":"994172885","full_name":"gregheffner/cicd","owner":"gregheffner","description":"K8s automation with Argo https://argoproj.github.io","archived":false,"fork":false,"pushed_at":"2026-04-13T00:08:26.000Z","size":1637,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T02:18:12.978Z","etag":null,"topics":["argo-cd","k8s","nginx"],"latest_commit_sha":null,"homepage":"https://greg.heffner.live","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregheffner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-01T11:27:56.000Z","updated_at":"2026-04-13T00:08:34.000Z","dependencies_parsed_at":"2025-11-22T11:05:04.801Z","dependency_job_id":null,"html_url":"https://github.com/gregheffner/cicd","commit_stats":null,"previous_names":["gregheffner/cicd"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gregheffner/cicd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregheffner%2Fcicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregheffner%2Fcicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregheffner%2Fcicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregheffner%2Fcicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregheffner","download_url":"https://codeload.github.com/gregheffner/cicd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregheffner%2Fcicd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argo-cd","k8s","nginx"],"created_at":"2025-06-07T19:06:38.141Z","updated_at":"2026-04-16T03:32:21.045Z","avatar_url":"https://github.com/gregheffner.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cicd\n\n\u003cimg alt=\"Green Image\" src=\"https://img.shields.io/badge/green--image-technotuba/nginx:latest-brightgreen?style=for-the-badge\u0026logo=docker\u0026logoColor=white\"\u003e\n\u003cimg alt=\"Blue Image\" src=\"https://img.shields.io/badge/blue--image-technotuba/nginx:latest-blue?style=for-the-badge\u0026logo=docker\u0026logoColor=white\"\u003e\n\u003cimg alt=\"Prod Silo\" src=\"https://img.shields.io/badge/Prod%20Silo-blue-blue?style=for-the-badge\"\u003e\n\u003cimg alt=\"Cloudflare Block\" src=\"https://img.shields.io/badge/cloudflare--block-26-red?logo=cloudflare\u0026style=for-the-badge\"\u003e\n\u003cimg alt=\"Cloudflare Cache Clear\" src=\"https://img.shields.io/badge/Cloudflare%20Cache%20Clear-2026--04--13%2000:08%20UTC-orange?logo=cloudflare\u0026style=for-the-badge\"\u003e\n\n![Blue-Green Deployment Diagram](screenshot.png)\n\nThis repository showcases a blue-green deployment strategy using Kubernetes, enabling seamless and low-risk application updates by running two separate environments: **green** (for new releases) and **blue** (for production).\n\n\n## Actions for this repo\n\n![Action Schedule](action-schedule.png)\n\n## Deployment Overview\n\n- **Green Environment (Disaster Recovery)**\n  - **Type:** DaemonSet\n  - **Manifest:** `DR/nginx-green.yaml`\n  - **Image:** [`technotuba/nginx:vYYYY.MM`](https://hub.docker.com/r/technotuba/nginx/tags)\n  - **Purpose:** Runs the new version on every node for high availability, testing, and backup.\n\n- **Blue Environment (Production)**\n  - **Type:** StatefulSet\n  - **Manifest:** `prod/nginx-blue.yaml`\n  - **Image:** [`technotuba/nginx:latest`](https://hub.docker.com/r/technotuba/nginx/tags)\n  - **Purpose:** Runs the stable production version with persistent storage and stable network identity.\n\nThis structure allows you to test updates thoroughly in the DR environment before promoting them to production, reducing risk and downtime during releases.\n\n---\n\n## Why DaemonSet for DR and StatefulSet for PROD?\n\n- **DaemonSet:**  \n  Ensures a pod runs on every node (or a subset), making it ideal for DR scenarios where you want the new version available cluster-wide for testing or failover.\n\n- **StatefulSet:**  \n  Manages stateful applications with stable identities and persistent storage. Perfect for production workloads that require reliability and data consistency.\n\n---\n\n## Key Differences\n\n- **Deployment/StatefulSet:**  \n  Controls the number of pod replicas, suitable for scaling stateless or stateful applications as needed.\n\n- **DaemonSet:**  \n  Guarantees a pod on every node, best for cluster-wide services or DR testing.\n\n---\n\n## Environment Separation\n\n\u003e **Note:**  \n\u003e Manifests for the green (DR) environment are in the `DR` folder, while blue (production) manifests are in the `prod` folder.\n\n**Benefits of this separation:**\n\n- **Clarity:** Instantly see which resources belong to which environment.\n- **Safety:** Reduces the risk of accidental changes to production.\n- **Simplicity:** Makes automation, CI/CD, and manual operations easier and less error-prone.\n- **Clean Codebase:** Keeps your repository organized and maintainable.\n\n---\n\n\u003e **Important:**  \n\u003e After deploying a new version, remember to update your service to point to the correct environment (green or blue) as needed.\n\n## 🚀 CI/CD Workflows\n\n| Workflow | Description | Trigger | Run |\n|----------|-------------|---------|-----|\n| ![Delete Kubernetes Pods](https://img.shields.io/badge/Delete%20K8s%20Pods-blue?logo=githubactions\u0026style=for-the-badge) | Deletes pods in a specified Kubernetes namespace, optionally filtered by label selector. | Manual (`workflow_dispatch`) | [Run Workflow](../../actions/workflows/deletepods.yaml) |\n| ![Cloudflare Block Count](https://img.shields.io/badge/Cloudflare%20Block%20Count-orange?logo=githubactions\u0026style=for-the-badge) | Updates the README badge with the current number of blocked Cloudflare IPs. | Scheduled \u0026 Manual | [Run Workflow](../../actions/workflows/cloudflareblock.yaml) |\n| ![Cache Clear](https://img.shields.io/badge/Cache%20Clear-lightgrey?logo=githubactions\u0026style=for-the-badge) | Clears build or deployment caches as needed. | Manual \u0026 Push | [Run Workflow](../../actions/workflows/cache-clear.yaml) |\n| ![Go To Blue](https://img.shields.io/badge/Go%20To%20Blue-blue?logo=githubactions\u0026style=for-the-badge) | Switches deployment traffic to the blue environment. | Manual \u0026 Push | [Run Workflow](../../actions/workflows/switch-traffic-to-blue.yaml) |\n| ![Go To Green](https://img.shields.io/badge/Go%20To%20Green-green?logo=githubactions\u0026style=for-the-badge) | Switches deployment traffic to the green environment. | Manual \u0026 Push | [Run Workflow](../../actions/workflows/switch-traffic-to-green.yaml) |\n| ![Push Green To Latest](https://img.shields.io/badge/Push%20Green%20To%20Latest-brightgreen?logo=githubactions\u0026style=for-the-badge) | Tags the current green deployment as the latest. | Manual \u0026 Push | [Run Workflow](../../actions/workflows/push-green-to-latest.yaml) |\n| ![Retag](https://img.shields.io/badge/Retag-purple?logo=githubactions\u0026style=for-the-badge) | Updates or retags images for deployments. | Manual \u0026 Push | [Run Workflow](../../actions/workflows/monthly-docker-image-retag.yaml) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregheffner%2Fcicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregheffner%2Fcicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregheffner%2Fcicd/lists"}