kapp-controller icon indicating copy to clipboard operation
kapp-controller copied to clipboard

Package Authors should be able to validate their packages locally

Open fjagugar opened this issue 3 years ago • 6 comments

Describe the problem/challenge you have

I'm building a PackageRepository image bundle containing several Packages in it locally. I would like to have a way to verify that all of them are correct before pushing the bundle to a registry and deploying them into my cluster.

Describe the solution you'd like

I would like to have a command line that I could execute locally to verify that the contents I've just created are valid and that when deploying them to the cluster I won't face any kind of syntax error.

Potential list of things to validate

  • Validation of the structure of the CRs such as PackageMetadata CR and Package CR
  • Optional validation on the recommended metadata for packages that go in PackageMetadata CR or the Package CR. (such as icon, description, categories, release notes, etc.) [Refer to #307]
  • Before pushing a package repository bundle, validate the recommended directory structure

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

fjagugar avatar May 18 '21 11:05 fjagugar

Thanks for opening this @fjagugar. We have had similar requests in the past for some kind of CLI tooling that is specific to kapp-controller (#56). We are not planning any work in this area in the immediate future, but would welcome ideas around this and also encourage POC kind of work if anyone feels up to it for the time being.

Some initial questions:

could focus on the schema of the resources created

Can you expound on what is meant by this? What resources are being created/what schema? Is this for kapp-controller custom resources?

case of the PackageRegistry bundle, it could validate that the folder contains the expected structure

This could be interesting as we do expect PackageRepositories to follow the folder structure below:

repo
├── .imgpkg
|  └── images.yml
├── packages
   └── package.yml

danielhelfand avatar May 18 '21 14:05 danielhelfand

Can you expound on what is meant by this? What resources are being created/what schema? Is this for kapp-controller custom resources?

Yes, for now the ones I would like to validate are Package and PackageRepository ones.

fjagugar avatar May 21 '21 10:05 fjagugar

We heard this feedback from some other users as well. I have modified the title of this issue and the contents a bit to add more details.

vibhas avatar Jul 21 '21 18:07 vibhas

cc @renuy -- cli packaging experience idea

cppforlife avatar Feb 25 '22 19:02 cppforlife

hey @renuy / @praveenrewar . I think this might be done with the inclusion of kctrl dev. Does that sound right?

neil-hickey avatar Feb 22 '23 20:02 neil-hickey

The only missing bit is that we do not seem to validate PackageMetadata CRs today. The dev command does verify the integrity of Package CRs today.

100mik avatar Feb 23 '23 13:02 100mik