The following resources are composed to implement the referenced Composite Resource Definition (XRD).
Release
Object
Release
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xservicesgitops.aws.caas.upbound.io
creationTimestamp: null
labels:
type: gitops-master
spec:
compositeTypeRef:
apiVersion: aws.caas.upbound.io/v1alpha1
kind: XServices
patchSets:
- name: Common
patches:
- type: FromCompositeFieldPath
fromFieldPath: metadata.labels
toFieldPath: metadata.labels
- type: FromCompositeFieldPath
fromFieldPath: metadata.annotations
toFieldPath: metadata.annotations
- type: FromCompositeFieldPath
fromFieldPath: spec.providerConfigRef.name
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: spec.deletionPolicy
toFieldPath: spec.deletionPolicy
resources:
- name: releaseFlux
base:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
spec:
forProvider:
chart:
name: flux2
url: https://github.com/fluxcd-community/helm-charts/releases/download/flux2-2.9.2/flux2-2.9.2.tgz
version: 2.9.2
namespace: flux-system
values:
imageAutomationController:
create: false
imageReflectionController:
create: false
rollbackLimit: 3
patches:
- type: PatchSet
patchSetName: Common
- fromFieldPath: spec.operators.flux.version
toFieldPath: spec.forProvider.chart.version
- type: CombineFromComposite
combine:
variables:
- fromFieldPath: spec.operators.flux.version
- fromFieldPath: spec.operators.flux.version
strategy: string
string:
fmt: https://github.com/fluxcd-community/helm-charts/releases/download/flux2-%s/flux2-%s.tgz
toFieldPath: spec.forProvider.chart.url
- name: mcp-kubeconfig-transfer-secret
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: v1
kind: Secret
metadata:
namespace: flux-system
references:
- patchesFrom:
apiVersion: v1
fieldPath: data.kubeconfig
kind: Secret
toFieldPath: data.kubeconfig
patches:
- type: PatchSet
patchSetName: Common
- fromFieldPath: spec.gitops.kubeConfigSecretRef.name
toFieldPath: spec.references[0].patchesFrom.name
- fromFieldPath: spec.gitops.kubeConfigSecretRef.namespace
toFieldPath: spec.references[0].patchesFrom.namespace
- fromFieldPath: spec.gitops.kubeConfigSecretRef.name
toFieldPath: spec.forProvider.manifest.metadata.name
- name: syncFlux
base:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
spec:
forProvider:
chart:
name: flux2-sync
repository: https://fluxcd-community.github.io/helm-charts
version: 1.6.2
namespace: flux-system
values:
gitRepository:
spec:
gitImplementation: go-git
interval: 10m0s
ref:
branch: main
timeout: 20s
kustomization:
spec:
interval: 10m
kubeConfig:
secretRef:
key: kubeconfig
path: ./infrastructure
sourceRef:
kind: GitRepository
rollbackLimit: 3
patches:
- type: PatchSet
patchSetName: Common
- fromFieldPath: spec.providerConfigRef.name
toFieldPath: metadata.annotations[crossplane.io/external-name]
- fromFieldPath: spec.gitops.url
toFieldPath: spec.forProvider.values.gitRepository.spec.url
- fromFieldPath: spec.gitops.kubeConfigSecretRef.name
toFieldPath: spec.forProvider.values.kustomization.spec.kubeConfig.secretRef.name
writeConnectionSecretsToNamespace: upbound-system
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.