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.azure.caas.upbound.io
creationTimestamp: null
labels:
type: gitops-master
spec:
compositeTypeRef:
apiVersion: azure.caas.upbound.io/v1alpha1
kind: XServices
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:
- fromFieldPath: metadata.labels
toFieldPath: metadata.labels
- fromFieldPath: metadata.annotations
toFieldPath: metadata.annotations
- fromFieldPath: spec.providerConfigRef.name
toFieldPath: spec.providerConfigRef.name
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
- 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:
- fromFieldPath: metadata.labels
toFieldPath: metadata.labels
- fromFieldPath: metadata.annotations
toFieldPath: metadata.annotations
- fromFieldPath: spec.providerConfigRef.name
toFieldPath: spec.providerConfigRef.name
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
- 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:
- fromFieldPath: metadata.labels
toFieldPath: metadata.labels
- fromFieldPath: metadata.annotations
toFieldPath: metadata.annotations
- fromFieldPath: spec.providerConfigRef.name
toFieldPath: spec.providerConfigRef.name
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
- 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.