-
Notifications
You must be signed in to change notification settings - Fork 87
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
Conversation
ed2cb52
to
18206d1
Compare
Signed-off-by: Arvind Iyengar <[email protected]> (cherry picked from commit 9ffb443)
Signed-off-by: Arvind Iyengar <[email protected]> (cherry picked from commit da06971)
18206d1
to
83e4318
Compare
@@ -1,4 +1,4 @@ | |||
package helm | |||
package chart |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where the content that used to live in main.go is moved to the controllers package in https://github.com/aiyengar2/helm-controller/blob/e8055c48bf2cd3bc3bed5f311b501daf599ce28f/pkg/controllers/controllers.go#L37-L201
There was a problem hiding this comment.
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.
Version = "v0.0.0-dev" | ||
GitCommit = "HEAD" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Part 4 of #141