{"id":21126526,"url":"https://github.com/lreimer/hands-on-flux2","last_synced_at":"2025-10-08T16:14:41.226Z","repository":{"id":41282172,"uuid":"396688830","full_name":"lreimer/hands-on-flux2","owner":"lreimer","description":"Demo repository for GitOps with Flux2 using a branch based monorepo per cluster and application repos.","archived":false,"fork":false,"pushed_at":"2022-06-30T09:47:12.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T09:05:20.777Z","etag":null,"topics":["aws","eks","eksctl","flux2","gitops"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lreimer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-16T08:07:50.000Z","updated_at":"2022-07-01T08:26:05.000Z","dependencies_parsed_at":"2022-07-06T19:02:19.167Z","dependency_job_id":null,"html_url":"https://github.com/lreimer/hands-on-flux2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lreimer/hands-on-flux2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lreimer%2Fhands-on-flux2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lreimer%2Fhands-on-flux2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lreimer%2Fhands-on-flux2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lreimer%2Fhands-on-flux2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lreimer","download_url":"https://codeload.github.com/lreimer/hands-on-flux2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lreimer%2Fhands-on-flux2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278974055,"owners_count":26078344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":["aws","eks","eksctl","flux2","gitops"],"created_at":"2024-11-20T04:42:17.653Z","updated_at":"2025-10-08T16:14:41.199Z","avatar_url":"https://github.com/lreimer.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hands-on Flux2\n\nDemo repository for GitOps with Flux2 using a branch based monorepo per cluster and application repos.\n\n## Prerequisites\n\nYou need to have the following tools installed locally to be able to complete all steps:\n- [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)\n- [eksctl](https://eksctl.io/)\n- [kubectl](https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html)\n- [flux](https://fluxcd.io/docs/get-started/)\n- [Helm](https://helm.sh/docs/intro/install/)\n\n## Bootstrapping\n\n```bash\n# define required ENV variables for the next steps to work\n$ export GITHUB_TOKEN=\u003cyour-token\u003e\n$ export GITHUB_USER=lreimer\n$ export AWS_ACCOUNT_ID=`aws sts get-caller-identity --query Account --output text`\n\n# created 2 branches to track the individual cluster states\n$ git branch env/dev\n$ git branch env/prod\n$ git push --all\n\n# setup the dev cluster and GitOps environment\n$ make create-dev-cluster\n$ make bootstrap-flux2-dev\n\n# next we start to add things to the cluster\n# all files to apply in the env/ branches are in the examples directory\n\n# setup the dev cluster and GitOps environment\n$ make create-prod-cluster\n$ make bootstrap-flux2-prod\n\n$ make destroy-clusters\n```\n\n## Examples\n\n### Webhook Receivers\n\n```bash\n# the relevant files are found in examples/webhook-receiver/\n$ git checkout env/dev\n$ cp examples/flux-system/ clusters/flux2-dev-cluster/\n\n$ git add -A \u0026\u0026 git commit -m \"Added webhook receiver for flux-system\"\n$ git push\n\n# you also need to create the webhook for the Git Repository\n# Payload URL: http://\u003cLoadBalancerAddress\u003e/\u003cReceiverURL\u003e\n# Secret: the webhook-token value\n$ kubectl -n flux-system get svc/receiver\n$ kubectl -n flux-system get receiver/webapp\n```\n\n### Infrastructure\n\nIn order to declare the infrastructure overlay for the cluster, add the following YAML\nto the `clusters/flux2-dev-cluster/flux-system/cluster-sync.yml` definition.\n\n```yaml\napiVersion: kustomize.toolkit.fluxcd.io/v1beta1\nkind: Kustomization\nmetadata:\n  name: infrastructure\n  namespace: flux-system\nspec:\n  interval: 5m0s\n  sourceRef:\n    kind: GitRepository\n    name: flux-system\n  path: ./infrastructure\n  prune: true\n```\n\nNext, you can put and deploy the `Kustomizations` to the `infrastructure/` directory.\nTo deploy some Helm and Git repository sources as well as useful infrastructure componentsuse the files under `examples/infrastructure/`.\n\n### Applications\n\nIn order to declare the infrastructure overlay for the cluster, add the following YAML\nto the `clusters/flux2-dev-cluster/flux-system/cluster-sync.yml` definition.\n\n```yaml\napiVersion: kustomize.toolkit.fluxcd.io/v1beta1\nkind: Kustomization\nmetadata:\n  name: applications\n  namespace: flux-system\nspec:\n  interval: 5m0s\n  dependsOn:\n    - name: infrastructure\n  sourceRef:\n    kind: GitRepository\n    name: flux-system\n  path: ./applications\n  prune: true\n  validation: client\n```\n\nNext, you can put and deploy the `Kustomizations` to the `applications/` directory.\nTo deploy the podinfo example use the files under `examples/applications/`.\n\n## Maintainer\n\nM.-Leander Reimer (@lreimer), \u003cmario-leander.reimer@qaware.de\u003e\n\n## License\n\nThis software is provided under the MIT open source license, read the `LICENSE`\nfile for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flreimer%2Fhands-on-flux2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flreimer%2Fhands-on-flux2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flreimer%2Fhands-on-flux2/lists"}