{"id":48229071,"url":"https://github.com/controlplaneio-fluxcd/d1-infra","last_synced_at":"2026-04-04T19:29:11.330Z","repository":{"id":223304422,"uuid":"759752661","full_name":"controlplaneio-fluxcd/d1-infra","owner":"controlplaneio-fluxcd","description":"Example repository for GitOps-driven cluster add-ons management with Flux","archived":false,"fork":false,"pushed_at":"2026-03-23T08:20:41.000Z","size":226,"stargazers_count":8,"open_issues_count":1,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-03-24T05:48:08.937Z","etag":null,"topics":["fluxcd","gitops"],"latest_commit_sha":null,"homepage":"https://control-plane.io/enterprise-for-flux-cd/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/controlplaneio-fluxcd.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,"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":"2024-02-19T09:16:18.000Z","updated_at":"2026-03-23T08:20:45.000Z","dependencies_parsed_at":"2026-01-12T11:05:48.586Z","dependency_job_id":null,"html_url":"https://github.com/controlplaneio-fluxcd/d1-infra","commit_stats":null,"previous_names":["controlplaneio-fluxcd/d1-infra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/controlplaneio-fluxcd/d1-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio-fluxcd%2Fd1-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio-fluxcd%2Fd1-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio-fluxcd%2Fd1-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio-fluxcd%2Fd1-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/controlplaneio-fluxcd","download_url":"https://codeload.github.com/controlplaneio-fluxcd/d1-infra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio-fluxcd%2Fd1-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31410680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fluxcd","gitops"],"created_at":"2026-04-04T19:29:11.239Z","updated_at":"2026-04-04T19:29:11.320Z","avatar_url":"https://github.com/controlplaneio-fluxcd.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# d1-infra\n\n\u003e [!NOTE]\n\u003e This repository is part of the reference architecture for the\n\u003e [ControlPlane Enterprise for Flux CD](https://github.com/controlplaneio-fluxcd/distribution).\n\u003e \n\u003e The `d1` reference architecture comprised of \n\u003e [d1-fleet](https://github.com/controlplaneio-fluxcd/d1-fleet),\n\u003e [d1-infra](https://github.com/controlplaneio-fluxcd/d1-infra) and\n\u003e [d1-apps](https://github.com/controlplaneio-fluxcd/d1-infra)\n\u003e is a set of best practices and production-ready examples for using Flux\n\u003e to manage the continuous delivery of Kubernetes infrastructure and\n\u003e applications on multi-cluster multi-tenant environments.\n\n## Scope and Access Control\n\nThis repository is managed by the platform team who are responsible for\nthe Kubernetes infrastructure.\n\nThis repository is used to define the Kubernetes infrastructure components such as:\n\n- Cluster add-ons (CRD controllers, admission controllers, monitoring, logging, etc.)\n- Cluster-wide definitions (Namespaces, Ingress classes, Storage classes, etc.)\n- Pod security standards\n- Network policies\n\nThis repository is reconciled on the cluster fleet by Flux as the **cluster admin**.\nAccess to this repository is restricted to the platform team and the\n[Flux bot account](https://github.com/controlplaneio-fluxcd/d1-fleet?tab=readme-ov-file#create-a-github-account-for-flux).\n\n## Repository Structure\n\nThis repository contains the following directories:\n\n- The **components** dir contains Flux HelmReleases for cluster addons with custom\n  configuration per environment.\n- The **update** dir contains the Flux configuration for automating the OCI chart updates\n  of the Helm releases.\n\nA cluster component is defined in a directory with the following structure:\n\n```sh\ncomponent/\n├── controllers # CRD definitions and controllers\n│   ├── base # common definitions (Namespaces, RBAC, HelmRepositories, HelmReleases)\n│   ├── production # production specific HelmRelease values\n│   └── staging # staging specific HelmRelease values\n└── configs # Custom Resources of controllers\n    ├── base # common definitions\n    ├── production # production specific values\n    └── staging # staging specific values\n```\n\nThe CRDs and their controllers are reconciled before the custom resources to ensure that the\ncontrollers are ready to process the custom resources.\n\n## Continuous Delivery\n\nTo prevent reconciliation errors due to malformed YAML manifests or invalid Kubernetes definitions,\nchanges to the `main` branch should be made through pull requests. On pull requests a GitHub Action\nruns that downloads the Flux OpenAPI schemas, and validates the custom resources and the kustomize\noverlays using `kubeconform`.\n\nChanges to the `main` branch are automatically reconciled by Flux on the staging cluster.\n\n```mermaid\nsequenceDiagram\n    actor me\n    participant git as Git\u003cbr\u003e\u003cbr\u003erepository\n    participant sc as Flux\u003cbr\u003e\u003cbr\u003esource-controller\n    participant kc as Flux\u003cbr\u003e\u003cbr\u003ekustomize-controller\n    participant kube as Kubernetes\u003cbr\u003e\u003cbr\u003eapi-server\n    participant nc as Flux\u003cbr\u003e\u003cbr\u003enotification-controller\n    me-\u003e\u003egit: 1. git push\n    sc-\u003e\u003egit: 2. git pull\n    sc-\u003e\u003esc: 3. build artifact for revision\n    sc-\u003e\u003ekube: 4. update status for revision\n    sc--\u003e\u003enc: 5. emit events\n    kube-\u003e\u003ekc: 6. notify about new revision\n    kc-\u003e\u003esc: 7. fetch artifact for revision\n    kc-\u003e\u003ekc: 8. build manifests to objects\n    kc-\u003e\u003ekube: 9. reconcile objects\n    kc--\u003e\u003ekube: 10. wait for readiness\n    kc-\u003e\u003ekube: 11. update status for revision\n    kc--\u003e\u003enc: 12. emit events\n    nc--\u003e\u003eme: 13. send alerts for revision\n```\n\nAfter the changes are reconciled on staging, the platform team can promote the changes\nto the production clusters by merging the `main` branch into the `production` branch.\n\n## Helm Release Automation\n\nThe staging cluster runs the Flux image automation controllers which automatically\nupdate the HelmRelease definitions with the latest chart version.\n\nWhen a new chart version is pushed to the container registry, and if it matches the semver policy,\nFlux will update the HelmRelease YAML definitions and will push the changes to the `main` branch.\n\n```mermaid\nsequenceDiagram\n    participant oci as OCI\u003cbr\u003e\u003cbr\u003erepository\n    participant irc as Flux\u003cbr\u003e\u003cbr\u003eimage-reflector-controller\n    participant iac as Flux\u003cbr\u003e\u003cbr\u003eimage-automation-controller\n    participant kube as Kubernetes\u003cbr\u003e\u003cbr\u003eapi-server\n    participant git as Git\u003cbr\u003e\u003cbr\u003erepository\n    irc-\u003e\u003eoci: 1. list chart versions\n    irc-\u003e\u003eirc: 2. match versions to policy\n    irc-\u003e\u003ekube: 3. update status\n    kube-\u003e\u003eiac: 4. notify about new version\n    iac-\u003e\u003egit: 5. git checkout main\n    iac-\u003e\u003eiac: 6. patch HelmRelease with new chart version\n    iac-\u003e\u003egit: 7. git push origin main\n    iac-\u003e\u003ekube: 8. update status\n```\n\nAfter the changes are pushed to the `main` branch, the HelmReleases will be upgraded to the new\nchart versions on the staging cluster.\n\n```mermaid\nsequenceDiagram\n    participant git as OCI\u003cbr\u003e\u003cbr\u003erepository\n    participant sc as Flux\u003cbr\u003e\u003cbr\u003esource-controller\n    participant hc as Flux\u003cbr\u003e\u003cbr\u003ehelm-controller\n    participant kube as Kubernetes\u003cbr\u003e\u003cbr\u003eapi-server\n    sc-\u003e\u003egit: 1. pull new chart version\n    sc-\u003e\u003ekube: 2. update chart status\n    kube-\u003e\u003ehc: 3. notify about new version\n    hc-\u003e\u003esc: 4. fetch chart\n    hc-\u003e\u003ekube: 5. get release values\n    hc-\u003e\u003ekube: 6. upgrade release\n    hc--\u003e\u003ekube: 7. run tests\n    hc-\u003e\u003ekube: 8. wait for readiness\n    hc-\u003e\u003ekube: 9. update status\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontrolplaneio-fluxcd%2Fd1-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontrolplaneio-fluxcd%2Fd1-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontrolplaneio-fluxcd%2Fd1-infra/lists"}