Integration: Cluster Registration Terraform Provider for GitOps Integration
What would you like to be added?
Develop a Terraform provider for cluster registration to enable seamless GitOps integration. This provider will facilitate automated cluster creation, deletion, and management through Infrastructure as Code (IaC) and GitOps workflows.
Requirements Source: #783
Why is this needed?
Currently, there is no efficient way to manage cluster registration and lifecycle operations through GitOps and Terraform. This feature will provide several benefits:
- Enhanced Automation: Enable fully automated cluster management using Terraform.
- GitOps Compatibility: Align with GitOps practices for declarative infrastructure management.
- Scalability: Support bulk cluster operations and consistent management across environments.
- Ease of Use: Provide a simple and reliable way to integrate cluster registration into existing IaC pipelines.
This feature will streamline cluster management processes and improve operational efficiency.
I have an interest in this one. I'd like to know if this one will be considered to do, as it is labeled as awaiting-more-evidence.
@jinjiaKarl I think it's necessary and valuable, but the current iteration is already fully scheduled, so I've moved it to the next milestone (v0.8.0). But if you are interested in it, I'm glad to entrust it to you!
Yeah thanks, I could start this slowly since it is moved to the next milestone. I only have experience using some IaC tools, such as Terraform, CDK, etc.. Could you please give me some tips or instructions on this one? And where is the code put?
@jinjiaKarl There's no rush to develop this feature, you can follow your pace. And it's a quite interesting feature. I have initialized the terraform-provider-karpor repository, which only contains example code, perhaps you can start with the official guide. You can refactor everything except for the .github directory, and the development mode is the same as Karpor, enjoy!
Thanks for the quick action, awesome!
Hi, it looks like publishing the provider requires permission to set repository secrets used by GitHub Actions and I don't have permission to publish the repo in KusionStack.
@jinjiaKarl I have added permissions to you at https://github.com/KusionStack/terraform-provider-karpor repository. Please see if you have received it.
I joined the repository, but I still don't have permission to set repository secrets. I also tried publishing the provider, but only my fork appears—but KusionStack/terraform-provider-karpor is not showing up.
@jinjiaKarl Strange, let me see what's going on. permissions are supposed to be sufficient. By the way, as karpor provider maintainer, you can already submit pr directly in the upstream repo without submit from the fork warehouse.
This is my setting page for erraform-provider-karpor
Received, let me see how to deal with it
Hi, it seems only admin-role can change the Action secrets. https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository
@jinjiaKarl Hi, I have configured GPG_PRIVATE_KEY and PASSPHRASE in the secret of the repository according to the guide, and added the necessary configuration files for publish. PTAL #3
@jinjiaKarl I will push a tag in the provider repository to trigger the release pipeline for verification
I found a configuration error, please review it 👉 https://github.com/KusionStack/terraform-provider-karpor/pull/4
Nice, thanks for the verification. Did you publish it to https://registry.terraform.io?
@jinjiaKarl Yeah, I have debugged the release process and now just push a tag that matches the semantic version (e.g. v0.1.0) in the repository to trigger an automatic release CI process. The first version (v0.1.0-alpha.2) of the provider has now been uploaded to https://registry.terraform.io . Due to the inability to upload repeatedly, the official version (v0.1.0) can only be released after merging the next PR.
cool, I will continue to complete the import functionality.