{"id":13819325,"url":"https://github.com/stefanprodan/flux-aio","last_synced_at":"2025-04-05T04:10:22.387Z","repository":{"id":63771522,"uuid":"570525794","full_name":"stefanprodan/flux-aio","owner":"stefanprodan","description":"Flux All-In-One distribution made with Timoni","archived":false,"fork":false,"pushed_at":"2025-03-23T09:39:19.000Z","size":773,"stargazers_count":112,"open_issues_count":2,"forks_count":43,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T03:05:59.353Z","etag":null,"topics":["cuelang","fluxcd","gitops","kubernetes","timoni"],"latest_commit_sha":null,"homepage":"https://timoni.sh/flux-aio","language":"CUE","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanprodan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"stefanprodan"}},"created_at":"2022-11-25T11:59:05.000Z","updated_at":"2025-03-28T20:53:20.000Z","dependencies_parsed_at":"2023-02-18T05:15:42.560Z","dependency_job_id":"8b03857e-38c6-4018-9366-78d854371a61","html_url":"https://github.com/stefanprodan/flux-aio","commit_stats":{"total_commits":127,"total_committers":5,"mean_commits":25.4,"dds":0.03937007874015752,"last_synced_commit":"1ada242d629349586fe1b99729dfa2afa00acb04"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fflux-aio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fflux-aio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fflux-aio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fflux-aio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanprodan","download_url":"https://codeload.github.com/stefanprodan/flux-aio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284949,"owners_count":20913704,"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","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":["cuelang","fluxcd","gitops","kubernetes","timoni"],"created_at":"2024-08-04T08:00:45.138Z","updated_at":"2025-04-05T04:10:22.364Z","avatar_url":"https://github.com/stefanprodan.png","language":"CUE","funding_links":["https://github.com/sponsors/stefanprodan"],"categories":["kubernetes"],"sub_categories":[],"readme":"# flux-aio\n\n[![flux](https://img.shields.io/badge/flux-v2.5.0-9cf)](https://fluxcd.io)\n[![test](https://github.com/stefanprodan/flux-aio/workflows/test/badge.svg)](https://github.com/stefanprodan/flux-aio/actions)\n[![license](https://img.shields.io/github/license/stefanprodan/flux-aio.svg)](https://github.com/stefanprodan/flux-aio/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/stefanprodan/flux-aio/all.svg)](https://github.com/stefanprodan/flux-aio/releases)\n\nFlux All-In-One is a lightweight distribution made\nwith [Timoni](https://timoni.sh) for running the GitOps Toolkit controllers as a\nsingle deployable unit (Kubernetes Pod).\n\nThis distribution is optimized for running [Flux](https://fluxcd.io) on:\n\n- Bare clusters without a CNI plugin installed\n- Edge clusters with limited CPU and memory resources\n- Clusters where plain HTTP communication is not allowed between pods\n- Clusters with egress via HTTP/S proxies\n- Serverless clusters for cost optimisation (EKS Fargate)\n\nThe versioning of this distribution follows semver with the following format:\n`\u003cflux version\u003e-\u003cdistribution release number\u003e`, e.g. `2.5.0-0`.\n\n## Documentation\n\n- [Distribution specifications](https://timoni.sh/flux-aio/#specifications)\n- [Flux installation and upgrade](https://timoni.sh/flux-aio/#flux-installation)\n- [Flux OCI sync configuration](https://timoni.sh/flux-aio/#flux-oci-sync-configuration)\n- [Flux Git sync configuration](https://timoni.sh/flux-aio/#flux-git-sync-configuration)\n- [Flux multi-tenancy configuration](https://timoni.sh/flux-aio/#flux-multi-tenancy-configuration)\n\n## Quickstart Guide\n\nTo deploy Flux on Kubernetes clusters, you'll be using\nthe Timoni CLI and a Timoni [Bundle file](https://timoni.sh/bundle/)\nwhere you'll define the configuration of the Flux controllers and their settings.\n\nInstall the Timoni CLI with:\n\n```shell\nbrew install stefanprodan/tap/timoni\n```\n\nFor other installation methods,\nsee [timoni.sh](https://timoni.sh/install/).\n\n### Install Flux on self-managed clusters\n\nTo deploy Flux AIO on a cluster without a CNI, create a Timoni Bundle file\nnamed `flux-aio.cue` with the following content:\n\n```cue\nbundle: {\n\tapiVersion: \"v1alpha1\"\n\tname:       \"flux-aio\"\n\tinstances: {\n\t\t\"flux\": {\n\t\t\tmodule: {\n\t\t\t\turl:     \"oci://ghcr.io/stefanprodan/modules/flux-aio\"\n\t\t\t\tversion: \"latest\"\n\t\t\t}\n\t\t\tnamespace: \"flux-system\"\n\t\t\tvalues: {\n\t\t\t\thostNetwork:     true\n\t\t\t\tsecurityProfile: \"privileged\"\n\t\t\t\tcontrollers: notification: enabled: false\n\t\t\t}\n\t\t}\n\t}\n}\n\n```\n\nApply the bundle with:\n\n```shell\ntimoni bundle apply -f flux-aio.cue\n```\n\nNote that on clusters without `kube-proxy`, you'll have to add the following env vars to values:\n\n```cue\nvalues: env: {\n\t\"KUBERNETES_SERVICE_HOST\": \"\u003chost\u003e\"\n\t\"KUBERNETES_SERVICE_PORT\": \"\u003cport\u003e\"\n}\n```\n\nNote that on [Talos](https://github.com/siderolabs/talos) clusters, you'll have to set the pod security profile to\n`privileged`:\n\n```cue\nvalues: {\n\thostNetwork:     true\n\tpodSecurityProfile: \"privileged\"\n}\n```\n\nYou can fine tune the Flux installation using various options, for more information see\nthe [installation guide](https://timoni.sh/flux-aio/#flux-installation).\n\nChanges to the `flux-aio.cue` bundle, can be applied in dry-run mode\nto see how Timoni will reconfigure Flux on the cluster:\n\n```shell\ntimoni bundle apply -f flux-aio.cue --dry-run --diff\n```\n\n### Sync from a public Git repository\n\nTo deploy the latest version of Cilium CNI and the metrics-server cluster addon,\nadd the `cluster-addons` instance to the `flux-aio.cue` bundle:\n\n```cue\nbundle: {\n\tapiVersion: \"v1alpha1\"\n\tname:       \"flux-aio\"\n\tinstances: {\n\t\t// flux instance omitted for brevity\n\t\t\"cluster-addons\": {\n\t\t\tmodule: url: \"oci://ghcr.io/stefanprodan/modules/flux-git-sync\"\n\t\t\tnamespace: \"flux-system\"\n\t\t\tvalues: git: {\n\t\t\t\turl:  \"https://github.com/stefanprodan/flux-aio\"\n\t\t\t\tref:  \"refs/heads/main\"\n\t\t\t\tpath: \"./test/cluster-addons\"\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\nThe above configuration, will instruct Flux to reconcile the `HelmRelease` manifests\nfrom the [test/cluster-addons](/test/cluster-addons) directory.\n\nApply the bundle with:\n\n```shell\ntimoni bundle apply -f flux-aio.cue\n```\n\nTimoni will configure the Flux Git sync and will wait for Flux to pull the repo and\ndeploy the cluster addons.\n\nFor more details on how to sync from private Git repositories and self-hosted Git servers,\nsee the [Git sync documentation](https://timoni.sh/flux-aio/#flux-git-sync-configuration).\n\n### Sync from a bootstrap repository\n\nIf you want to use Flux AIO with a bootstrap repository layout, you'll have to add an ignore\nrule for the `flux-system` directory and name the sync instance `flux-system`:\n\n```cue\nbundle: {\n\tapiVersion: \"v1alpha1\"\n\tname:       \"flux-aio\"\n\tinstances: {\n\t\t// flux instance omitted for brevity\n\t\t\"flux-system\": {\n\t\t\tmodule: url: \"oci://ghcr.io/stefanprodan/modules/flux-git-sync\"\n\t\t\tnamespace: \"flux-system\"\n\t\t\tvalues: {\n\t\t\t\tgit: {\n\t\t\t\t\ttoken:  string @timoni(runtime:string:GITHUB_TOKEN)\n\t\t\t\t\turl:    \"https://github.com/fluxcd/flux2-kustomize-helm-example.git\"\n\t\t\t\t\tref:    \"refs/heads/main\"\n\t\t\t\t\tpath:   \"clusters/production\"\n\t\t\t\t\tignore: \"clusters/**/flux-system/\"\n\t\t\t\t}\n\t\t\t\tsync: wait: false\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\nThe above configuration, generates the same `flux-system` objects (`GitRepository`, `Secret`, `Kustomization`)\nas the `flux bootstrap` command.\n\n### Sync from a GitHub repository using GitHub App auth\n\nStarting with Flux 2.5.0, you can sync the cluster state from a repository\nusing GitHub App authentication:\n\n```cue\nbundle: {\n\tapiVersion: \"v1alpha1\"\n\tname:       \"flux-aio\"\n\tinstances: {\n\t\t// flux instance omitted for brevity\n\t\t\"flux-system\": {\n\t\t\tmodule: url: \"oci://ghcr.io/stefanprodan/modules/flux-git-sync\"\n\t\t\tnamespace: \"flux-system\"\n\t\t\tvalues: {\n\t\t\t\tgit: {\n\t\t\t\t\turl:   \"https://github.com/org/repo\"\n\t\t\t\t\tref:   \"refs/heads/main\"\n\t\t\t\t\tpath:  \"clusters/production\"\n\t\t\t\t}\n\t\t\t\tgithub: {\n\t\t\t\t\tappID:             \"123\"\n\t\t\t\t\tappInstallationID: \"234\"\n\t\t\t\t\tappPrivateKey:     string @timoni(runtime:string:GITHUB_APP_PEM)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\nExport the `GITHUB_APP_PEM` env var and apply the bundle with:\n\n```shell\nexport GITHUB_APP_PEM=$(cat path/to/app.private-key.pem)\ntimoni bundle apply -f flux-aio.cue --runtime-from-env\n```\n\n### Uninstall Flux\n\nTo remove Flux from your cluster, without affecting any reconciled workloads:\n\n```shell\nflux -n flux-system uninstall\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanprodan%2Fflux-aio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanprodan%2Fflux-aio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanprodan%2Fflux-aio/lists"}