This repository contains a Crossplane configuration, tailored for users establishing their initial control plane with Upbound. This configuration deploys fully managed Flux instances allowing you to integrate GitOps practices into your workflow.
The core components of a custom API in Crossplane include:
- CompositeResourceDefinition (XRD): Defines the API's structure.
- Composition(s): Implements the API by orchestrating a set of Crossplane managed resources.
In this specific configuration, the Flux API contains:
- a Flux custom resource type: Defined in
/apis/flux/definition.yamlas a namespaced Crossplane v2 XRD - Composition of the Flux resources: Configured in
/apis/flux/composition.yaml, it provisions Flux GitOps resources in the target namespace
This repository contains Composite Resource (XR) examples in the examples/ directory.
This configuration has been migrated to Crossplane v2 with the following changes:
- Namespaced resources: Resources now use the
.mAPI group (e.g.,helm.m.crossplane.io/v1beta1) and XRD usesscope: Namespaced - Resource naming: Changed from
XFluxtoFlux(removed "X" prefix) - ManagementPolicies: Replaced
deletionPolicywithmanagementPoliciesparameter to control resource lifecycle (defaults to["*"]for full management) - Provider v2: Uses provider-helm v1 with namespaced resource support
If upgrading from v1:
- Resources must specify a namespace
- Update XR kind from
XFluxtoFlux - Replace
deletionPolicywithmanagementPoliciesin parameters - Ensure ProviderConfig includes
kind: ProviderConfigfield
Deploy this configuration to your control plane:
apiVersion: pkg.crossplane.io/v1
kind: Configuration
metadata:
name: configuration-gitops-flux
spec:
package: xpkg.upbound.io/upbound/configuration-gitops-flux:v0.10.0Create a Flux instance:
apiVersion: gitops.platform.upbound.io/v1alpha1
kind: Flux
metadata:
name: my-flux-instance
namespace: default
spec:
parameters:
providerConfigName: my-provider-config
managementPolicies: ["*"]
operators:
flux:
version: "2.10.6"
fluxSync:
version: "1.7.2"
source:
git:
url: https://github.com/your-org/your-repo
ref:
name: refs/heads/main
interval: "5m0s"
timeout: "60s"
path: "/"See examples/flux-xr.yaml for a complete example.
This repository serves as a foundational step. To enhance your control plane, consider:
- creating new API definitions in this same repo
- editing the existing API definition to your needs
Upbound will automatically detect the commits you make in your repo and build the configuration package for you. To learn more about how to build APIs for your managed control planes in Upbound, read the guide on Upbound's docs.