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

Enhance Generated Makefile #1940

Closed
droctothorpe opened this issue Jan 13, 2021 · 5 comments
Closed

Enhance Generated Makefile #1940

droctothorpe opened this issue Jan 13, 2021 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@droctothorpe
Copy link
Contributor

droctothorpe commented Jan 13, 2021

The Makefile supplied by kubebuilder init could benefit from some additional functionality.

For example:

  • An automatically updated help target that prints all of the targets and a description of what they do.
  • A controller delete target. Something along the lines of:
undeploy: manifests
	cd config/manager && kustomize edit set image controller=${IMG}
	kustomize build config/default | kubectl delete -f -
  • A target to apply and a target to delete the auto-generated sample CR.

I would be happy to submit a PR in short order pending a green light from the team.

Thanks!

/kind feature

@droctothorpe droctothorpe added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 13, 2021
@droctothorpe droctothorpe changed the title Enhance Makefile Enhance Generated Makefile Jan 13, 2021
@Adirio
Copy link
Contributor

Adirio commented Jan 13, 2021

  • The automatically updated help target SGTM. We already have this for kubebuilder (the project) Makefile. Ssafe to be applied to the v3 plugin. Mixed feelings about applying it to the v2 plugin though.
  • We already have a undeploy target in v3 plugin.
  • I dont feel like samples should have Make targets, but I don't have a strong opinion either.

@droctothorpe
Copy link
Contributor Author

droctothorpe commented Jan 14, 2021

Thanks for the input, @Adirio!

PR submitted: #1947

It might be nice to bring in the lint and lint-fix targets from the base Makefile into the makefile template as well. Happy to implement that if you think it makes sense.

@Adirio
Copy link
Contributor

Adirio commented Jan 14, 2021

We already discussed it. We dont want to scaffold the golangci-lint dependency, using it for our code is one thing, but scaffolding it for user generated projects is another.

In any case, it would be a plugin mantained by golangci-lint themselves.

@Adirio
Copy link
Contributor

Adirio commented Jan 14, 2021

#1947 implemented this

/close

@k8s-ci-robot
Copy link
Contributor

@Adirio: Closing this issue.

In response to this:

#1947 implemented this

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants