Composition
GitOps
The following resources are composed to implement the referenced Composite Resource Definition (XRD).
ProviderConfig
Object
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: gitops-fleet
creationTimestamp: null
labels:
initiate-by: manager
provider: fleet
spec:
compositeTypeRef:
apiVersion: devopstoolkitseries.com/v1alpha1
kind: GitOps
patchSets:
- name: metadata
patches:
- fromFieldPath: metadata.labels
resources:
- name: kubernetes
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
spec:
credentials:
source: InjectedIdentity
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: gitops-%s
readinessChecks:
- type: None
- name: cluster
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: fleet.cattle.io/v1alpha1
kind: Cluster
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: gitops-%s-cluster
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
transforms:
- type: string
string:
fmt: gitops-%s
- fromFieldPath: spec.parameters.kubeConfig.secretNamespace
toFieldPath: spec.forProvider.manifest.metadata.namespace
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.labels.cluster
- fromFieldPath: spec.parameters.environment
toFieldPath: spec.forProvider.manifest.metadata.labels.env
- fromFieldPath: spec.parameters.kubeConfig.secretName
toFieldPath: spec.forProvider.manifest.spec.kubeConfigSecret