crossplane icon indicating copy to clipboard operation
crossplane copied to clipboard

`crossplane xpkg build` seems not checking the file name

Open cychiang opened this issue 1 year ago • 1 comments

What happened?

According to this docs, to create a Crossplane package, it needs to place crossplane.yaml in the root folder.

However, it seems not the case because you can name the YAML file in any name as long as there is only one Configuration file in the folder.

How can we reproduce it?

For example:

├── v1
    └── test.yaml

where test.yaml is:

apiVersion: meta.pkg.crossplane.io/v1alpha1
kind: Configuration
metadata:
  name: v1
spec:
  dependsOn:
    - ...
  crossplane:
    version: ...

From above setup, you can generate package successfully with crossplane xpkg build --package-root=v1.

So the requirements to generate a Crossplane package seems to me like:

  • Create a folder as a root folder, and put a YAML file that follow the Configuration schema from meta.pkg.crossplane.io/v1alpha1
  • Create subfolder in the root folder with any name, and put any additional YAML files for the configuration
  • There is no restriction on the YAML file name
  • Run build command, and it will generate xpkg image.

What environment did it happen in?

Crossplane version: Client Version: v1.16.0

cychiang avatar Jul 18 '24 13:07 cychiang

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] avatar Oct 17 '24 01:10 github-actions[bot]