Crossplane Contrib - Provider GitLab
Crossplane Provider for managing GitLab resources using Kubernetes CRDs
Project Overview
Crossplane Provider for GitLab is an open-source Crossplane provider that lets platform teams manage GitLab configuration and resources declaratively through Kubernetes Custom Resource Definitions (CRDs). Instead of provisioning and maintaining GitLab via manual UI workflows or one-off scripts, teams can apply GitLab changes through GitOps pipelines, track them in version control, and converge to the desired state via reconciliation.
Scope and Impact
My contributions focused on expanding the surface area of GitLab that can be managed through CRDs while improving maintainability for the long term:
- Delivered support for 10+ new managed resources, enabling users to manage higher-level GitLab functionality directly from Kubernetes.
- Introduced 2 generator templates to make future resource additions significantly faster and more consistent.
- Refactored shared patterns in the codebase, resulting in a ~30% reduction in code duplication and a clearer separation of concerns.
What I Delivered
I implemented end-to-end features across multiple GitLab domains, including:
- Application Settings: CRDs and controllers to manage instance/application configuration using reconciliation rather than imperative updates.
- Instance Runners: Managed resources for runner lifecycle, with a full testing suite and refactors to reduce repeated logic.
- Project & Group Badges: CRDs that model badge configuration at both project and group levels.
- Application Appearance: Declarative management of appearance settings to standardize branding and UI defaults across environments.
- Instance-level CI/CD Variables: A larger addition that required a heavier refactor; introduced shared building blocks to avoid duplicated reconciliation and mapping code.
- Instance Licenses: Added support for a new reconciliation pattern that involves reading state from a remote HTTP endpoint.
- Instance & Group Service Accounts: CRDs that enable identity/service-account management using a consistent Crossplane-style resource model.
Across these areas, the work included schema design (CRD fields and validation), controller behavior, mapping between Kubernetes spec/status and GitLab API behavior, and quality gates (tests and review iteration).
Engineering Approach
- API modeling and reconciliation: Designed CRDs that map cleanly to GitLab concepts, with predictable reconciliation behavior and clear status reporting.
- Reliability through testing: Added/expanded test coverage around new controllers and refactored components to preserve behavior while improving structure.
- Maintainability-first refactors: Consolidated repeated patterns into shared utilities and templates, making future contributions easier for both maintainers and community contributors.
- Backwards-compatible improvements: Where refactors were needed, focused on minimizing breaking changes while improving internal structure.
Open-Source Collaboration
Although the roadmap was driven by real production needs from my team, the implementation was done upstream-first and reviewed in the open.
Most reviews were done in collaboration with Crossplane maintainer @henrysachs. The feedback cycle covered API design trade-offs, controller patterns, and long-term maintainability decisions, and it materially improved the quality of the final contributions.
Technologies Used
| Icon | Technology | How it was used |
|---|---|---|
| Go | Primary language for provider implementation and controllers. Also used for writing generators, tests and other utilities | |
| Kubernetes | CRDs as the API surface; reconciliation loop as the execution model | |
| Crossplane | Managed resource patterns, composition ecosystem, provider conventions |
Project History
Support Application Settings (v0.15.0)
Feature development to allow GitLab application settings management via CRDs. This feature included comprehensive testing and validation to ensure reliability. This also implemented a new generator template to streamline future resource additions.
Support Instance Runners (v0.16.0)
Enable management of GitLab instance runners through Kubernetes. This includes a complete testing suite and code refactoring to enhance maintainability. The existing codebase was improved to reduce duplication.
Support Project & Group Badges
Added CRDs for managing badges at both project and group levels.
Support Application Appearance
Implemented functionality to manage GitLab application appearance settings from CRDs.
Support Instance Level CI/CD Variables
Added support for managing instance-level CI/CD variables via Kubernetes. This included a heavy refactor of the existing codebase, resulting in a 30% reduction in code duplication.
Support instance license
Enabled management of GitLab instance licenses through CRDs. This introduced a reconciliation from remote HTTP endpoint which was a new pattern for the provider.
Support Instance & Group Service Accounts
Developed features to manage service accounts at both instance and group levels.
Project Details
- Role
- Contributor
- Client
- Crossplane users
- Duration
- 2 months
- Published