I followed the Crossplane docs about creating a Configuration Package and created the following crossplane.yaml:
apiVersion: meta.pkg.crossplane.io/v1alpha1
kind: Configuration
metadata:
name: crossplane-eks-cluster
spec:
dependsOn:
- provider: xpkg.upbound.io/upbound/provider-aws-ec2
version: ">=v1.1.1"
- provider: xpkg.upbound.io/upbound/provider-aws-iam
version: ">=v1.1.1"
- provider: xpkg.upbound.io/upbound/provider-aws-eks
version: ">=v1.1.1"
crossplane:
version: ">=v1.15.1-0"
I have a Composition and a XRD in the apis directory, but when I run crossplane xpkg build --package-root=/apis I get the following error:
$ crossplane xpkg build --package-root=apis/
crossplane: error: failed to build package: not exactly one package meta type
The docs state nothing what I can do and also google didn't help.
Luckily I tested the other option I found to create a Configuration: There are templates one could use to create the crossplane.yaml using the crossplane CLI's new
beta xpkg initcommand. I ran the following:The resulting
crossplane.yamlhad multiplemetadata.annotationslike this:So simply add the annotations and the error is gone.
This makes a lot of sence, since a Configuration's user should be able to know, who's responsible for the CRDs. But the error message should maybe be enhanced.