apiVersion: apiextensions.crossplane.io/v1alpha1 kind: FunctionIO # Optional arbitrary KRM-like resource. Each function in a pipeline will be # called with its own function config (i.e. config is not pipelined). config: apiVersion: database.example.org/v1alpha1 kind: Config metadata: name: cloudsql spec: version: POSTGRES_9_6 # The composite resource (including metadata, spec, and status) composite: apiVersion: database.example.org/v1alpha1 kind: XPostgreSQLInstance metadata: name: my-db spec: parameters: storageGB: 20 compositionSelector: matchLabels: provider: gcp writeConnectionSecretToRef: name: db-conn # TODO(negz): What if we just took the resources array of a Composition, # including patches etc? Is there value in that? Code could just ignore patches # and return fully formed bases if it wanted to. I like that this would make # the data structure identical to a Composition resources array, but is there # any other value? Would it be limiting to try to keep them identical? (Probably yes.) resources: - name: cloudsqlinstance base: apiVersion: database.gcp.crossplane.io/v1beta1 kind: CloudSQLInstance metadata: name: cloudsqlpostgresql spec: forProvider: databaseVersion: POSTGRES_9_6 region: us-central1 settings: tier: db-custom-1-3840 dataDiskType: PD_SSD dataDiskSizeGb: 20 writeConnectionSecretToRef: namespace: crossplane-system name: cloudsqlpostgresql-conn connectionDetails: - name: hostname fromConnectionSecretKey: hostname # TODO(negz): Do we want readiness checks too? Should the function be able to # write to the status of the XR directly to set a status? results: - severity: Error message: "Could not render Database.postgresql.crossplane.io/v1alpha1`