[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License headers are not injected into the generated example manifests #379

Open
sergenyalcin opened this issue Mar 15, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@sergenyalcin
Copy link
Member

What happened?

In the upjet-generated providers, there are Header template variables on the generated go files. Please see these template files. Header template variable example:

This Header variable adds the license statements to the generated go files. However, there is no header injection mechanism for the generated example manifests. Because of this, the generated example manifests are generated without any header, even if a license statement is specified in the repo.

Example header statement from provider-upjet-aws: https://github.com/crossplane-contrib/provider-upjet-aws/blob/main/hack/boilerplate.go.txt

Example controller.go that has this generated license header: https://github.com/crossplane-contrib/provider-upjet-aws/blob/main/internal/controller/accessanalyzer/analyzer/zz_controller.go

The generated example manifest does not have a license header: https://github.com/crossplane-contrib/provider-upjet-aws/blob/main/examples-generated/accessanalyzer/v1beta1/analyzer.yaml

How can we reproduce it?

This issue can be reproduced by any upjet-generated provider by running make generate. This generation will not produce any license statements for the generated example manifests.

Proposed Solution

A mechanism can be added to the example generation pipeline (similar to the other). By this way, we will have the generated license headers in the generated example manifests.

@sergenyalcin sergenyalcin added the bug Something isn't working label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant