The Crossplane Helm provider manages Helm charts as cloud resources. Used with Crossplane compositions, it lets teams request infrastructure through simplified Kubernetes resources while operations teams control how that infrastructure is configured. section 5.3
For the Conference application, compositions can provision Redis, PostgreSQL, and Kafka separately from application services. The same provider can also create vclusters for isolated development environments. section 5.3 section 6.3
Listing 5.7 Key/value Database Crossplane composition
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: keyvalue.db.local.salaboy.com #1
labels: #2
type: dev
provider: local
kind: keyvalue
spec:
writeConnectionSecretsToNamespace: crossplane-system
compositeTypeRef: #3
apiVersion: salaboy.com/v1alpha1
kind: Database
resources:
- name: redis-helm-release #4
base:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
metadata:
annotations:
crossplane.io/external-name: # patched
spec:
rollbackLimit: 3
forProvider:
namespace: default
chart: #5
name: redis
repository: https://charts.bitnami.com/bitnami
version: "17.8.0"
values:
architecture: standalone
providerConfigRef: #6
name: default
patches: #7
- fromFieldPath: metadata.name
toFieldPath: metadata.annotations[crossplane.io/external-name]
policy:
fromFieldPath: Required
- fromFieldPath: metadata.name
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-redis"
readinessChecks: #8
- type: MatchString
fieldPath: status.atProvider.state
matchString: deployed
This composition defines a Helm Release for Redis as one resource in a key-value Database implementation. section 5.3
