{"id":50385078,"url":"https://github.com/stackhpc/capi-helm-fluxcd-config","last_synced_at":"2026-05-30T14:30:57.560Z","repository":{"id":241755209,"uuid":"807587608","full_name":"stackhpc/capi-helm-fluxcd-config","owner":"stackhpc","description":"Example configuration for a self-managed Cluster API cluster using Flux CD.","archived":false,"fork":false,"pushed_at":"2024-10-17T13:40:03.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T19:24:15.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/stackhpc.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}},"created_at":"2024-05-29T11:43:53.000Z","updated_at":"2024-10-17T13:40:08.000Z","dependencies_parsed_at":"2024-05-30T00:43:14.670Z","dependency_job_id":"a452f961-b889-407f-b8d8-5ee763938d15","html_url":"https://github.com/stackhpc/capi-helm-fluxcd-config","commit_stats":null,"previous_names":["stackhpc/capi-helm-fluxcd-config"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackhpc/capi-helm-fluxcd-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fcapi-helm-fluxcd-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fcapi-helm-fluxcd-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fcapi-helm-fluxcd-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fcapi-helm-fluxcd-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhpc","download_url":"https://codeload.github.com/stackhpc/capi-helm-fluxcd-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fcapi-helm-fluxcd-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33696681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":[],"created_at":"2026-05-30T14:30:56.808Z","updated_at":"2026-05-30T14:30:57.547Z","avatar_url":"https://github.com/stackhpc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# capi-helm-fluxcd-config\n\nThis repository contains configuration for deploying and operating\n[Kubernetes](https://kubernetes.io/) clusters on [OpenStack](https://www.openstack.org/) using a\n[GitOps](https://about.gitlab.com/topics/gitops/) workflow.\n\nThe specific tools used to accomplish this are [Cluster API](https://cluster-api.sigs.k8s.io/) for\nthe Kubernetes provisioning, [Flux CD](https://fluxcd.io/) for automation and\n[sealed secrets](https://github.com/bitnami-labs/sealed-secrets) for managing secrets.\n\nCluster API is a set of\n[Kubernetes operators](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) with\nassociated\n[custom resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)\nthat allow Kubernetes clusters to be provisioned and operated by creating instances of those\nresources in a \"management\" Kubernetes cluster.\n\nThe clusters created using configurations derived from this repository are \"self-managed\". This\nmeans that the Cluster API controllers and the resources defining the cluster are managed on the\ncluster itself.\n\n## Bootstrapping a cluster\n\nThe use of self-managed clusters creates a bootstrapping problem, i.e. how does the cluster get\ncreated if it manages itself? The solution to this is to use a one-off bootstrapping process that\nperforms the following steps:\n\n  1. Create an ephemeral Kubernetes cluster using [kind](https://kind.sigs.k8s.io/)\n  2. Use the ephemeral cluster to create the Cluster API cluster\n       * Install Flux on the ephemeral cluster\n       * Use Flux to install the Cluster API controllers on the ephemeral cluster\n       * Use Flux to create the Cluster API cluster using the ephemeral cluster\n       * Wait for the Cluster API cluster to become ready\n  3. Get the `kubeconfig` file for the Cluster API cluster\n  4. Install Flux and the Cluster API controllers on the Cluster API cluster\n  5. Move the Cluster API resources from the ephemeral cluster to the Cluster API cluster\n       * Suspend reconciliation of the Cluster API resources on the ephemeral cluster\n       * Copy the Cluster API resources to the Cluster API cluster\n       * Resume reconciliation of the Cluster API resources on the Cluster API cluster\n\nAt this point, the cluster is self-managed. The remaining steps set the cluster up to be managed\nusing Flux going forward:\n\n  6. Use Flux to install the sealed secrets controller\n  7. Seal the cluster credentials using `kubeseal`\n  8. Commit the sealed secret to git and push it\n  9. Create a Flux source pointing at the git repository\n       * If you are using git over SSH, this will generate an SSH keypair and prompt you\n         to add the public key to the git repository as a deploy key\n 10. Create a Flux kustomization pointing at the cluster configuration\n\nAt this point, the cluster is self-managed using Flux and the ephemeral cluster is deleted.\n\nThis repository includes [a Python script](./bin/manage) that performs these steps (see below).\n\n## Usage\n\nFirst, create a copy of the repository (like a fork but detached).\n\n```sh\n# Clone the repository\ngit clone https://github.com/stackhpc/capi-helm-fluxcd-config.git my-cluster-config\ncd my-cluster-config\n\n# Rename the origin remote to upstream so that we can pull changes in future\ngit remote rename origin upstream\n\n# Add the new origin remote and push the initial commit\ngit remote add origin \u003curl\u003e\ngit push -u origin main\n```\n\nCreate a cluster configuration under the `./clusters` directory, following the\n[example](./clusters/example/).\n\nAs part of this process, you must create an\n[application credential](https://docs.openstack.org/keystone/latest/user/application_credentials.html)\nfor the target project in OpenStack. The `credentials.yaml` file in the cluster configuration\nmust then be updated with the following information:\n\n  * The OpenStack auth URL and region, which you can get from your cloud admin\n  * The ID and secret of the application credential\n  * The ID of the target project in OpenStack\n\nDuring the bootstrap process, this file will be encrypted using\n[kubeseal](https://github.com/bitnami-labs/sealed-secrets) and pushed to the git repository.\nBe careful to **NEVER** commit the unencrypted version.\n\nOnce you are happy with your cluster configuration, you can bootstrap the cluster.\n\nThe following tools are required to execute the bootstrap script:\n\n  * [Python 3](https://www.python.org/)\n  * [git](https://git-scm.com/)\n  * [Docker](https://docs.docker.com/)\n  * [kind](https://kind.sigs.k8s.io/)\n  * [kustomize](https://kustomize.io/)\n  * [Helm](https://helm.sh/)\n  * [kubeseal](https://github.com/bitnami-labs/sealed-secrets?tab=readme-ov-file#kubeseal)\n  * [flux CLI](https://fluxcd.io/flux/cmd/)\n\nNext, create a Python environment with the required dependencies installed, e.g.:\n\n```sh\npython3 -m venv ./.venv\nsource .venv/bin/activate\npip install -U pip\npip install -r requirements.txt\n```\n\nThen run the bootstrap command for the cluster that you created:\n\n```sh\n./bin/manage bootstrap my-cluster\n```\n\nOnce the bootstrap is complete, you will have a cluster that can be managed by making changes\nto the git repository.\n\n## Accessing the cluster\n\nThe bootstrap process produces a `kubeconfig` file that can be used to access the cluster, which\nis written into the directory containing the cluster configuration.\n\n\u003e **WARNING**\n\u003e\n\u003e The `kubeconfig` file is **NOT** committed to git, and if lost is difficult to recover.\n\u003e\n\u003e It should be stored somewhere safe where it can be shared with team members who need it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fcapi-helm-fluxcd-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhpc%2Fcapi-helm-fluxcd-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fcapi-helm-fluxcd-config/lists"}