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

Rename Files and Move Versioning Logic To Another Package #154

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

aiyengar2
Copy link
Contributor

@aiyengar2 aiyengar2 commented Sep 7, 2022

Part 4 of #141

@aiyengar2 aiyengar2 force-pushed the basic_refactor branch 2 times, most recently from ed2cb52 to 18206d1 Compare September 7, 2022 22:35
@aiyengar2 aiyengar2 changed the title Basic Refactor of Helm Controller Rename Files and Move Versioning Logic To Another Package Sep 7, 2022
Arvind Iyengar added 2 commits September 7, 2022 15:52
Signed-off-by: Arvind Iyengar <[email protected]>
(cherry picked from commit 9ffb443)
Signed-off-by: Arvind Iyengar <[email protected]>
(cherry picked from commit da06971)
@@ -1,4 +1,4 @@
package helm
package chart
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the rationale for this package move - the pattern for other projects that use Wrangler is to put the controller in pkg/foo/controller.go, for example system-upgrade-controller has its controller in package upgrade at pkg/upgrade/controller.go

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this in anticipation of having multiple controllers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the structure here follows what Fleet and Rancher do today. Example for Fleet: https://github.com/rancher/fleet/tree/master/pkg/controllers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More importantly, this opens the door for moving the registration logic for controllers into a separate package instead of putting it in main.go and putting constants in a separate package.

i.e. the final structure looks like this: https://github.com/aiyengar2/helm-controller/tree/master/pkg/controllers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanation. Sound like we might want to reorg system-upgrade-controller too at some point, if we're going to continue to maintain it.

Comment on lines +6 to +7
Version = "v0.0.0-dev"
GitCommit = "HEAD"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@@ -1,4 +1,4 @@
package helm
package chart
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanation. Sound like we might want to reorg system-upgrade-controller too at some point, if we're going to continue to maintain it.

@brandond brandond merged commit aaf96aa into k3s-io:master Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants