tofu-controller
tofu-controller copied to clipboard
Extend Branch Planner Support for GitLab
The branch planner system currently supports GitHub for repository management. However, GitLab also has a significant market share and user base that can benefit from our branch planner system. Extending the support for GitLab will not only broaden our user base but also meet the demands of the current users who utilize GitLab as their primary source control service. The aim of this task is to develop and implement a solution that seamlessly integrates GitLab with our branch planner system.
User story:
As a GitLab user, I want to be able to use the branch planner of the Terraform Controller so that I can process Terraform plans on my pull requests and use PR comments to manage the plans efficiently.
Acceptance Criteria
- [ ] The system should establish a clear and robust communication mechanism between GitLab and the branch planner system. This mechanism should rely on a polling strategy for changes rather than webhook-based interactions to ensure secure integration for systems behind firewalls
- [ ] The branch planner system should be able to access and retrieve information from pull requests (PRs) made on the linked GitLab repository.
- [ ] An informer should be implemented capable of creating a Terraform Custom Resource (CR) and its associated source reference for the planning mode by interacting with the Kubernetes (K8s) API server.
- [ ] The system should continuously poll for comments on the PRs, triggering appropriate actions based on the commands within these comments. For instance, a 'replan' command should trigger a new Terraform plan.
- [ ] The system should have a well-defined and comprehensive testing strategy. This strategy should effectively validate the end-to-end communication between GitLab, the poller, the informer, and the K8s API server, ensuring the functionality meets the set requirements.
- [ ] User guides and documentation should be provided. These documents should contain complete and easy-to-understand information regarding the use of the GitLab-integrated branch planner in the Terraform Controller, including how to initiate Terraform plans through PRs and manage them through PR comments.
Any ETA on this one maybe?
It's the next thing to tackle on our radar. Please stay tuned.