-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Move deployers into separate packages #4812
Conversation
f3a7d85
to
fdc46d9
Compare
Codecov Report
@@ Coverage Diff @@
## master #4812 +/- ##
==========================================
- Coverage 71.77% 71.75% -0.03%
==========================================
Files 348 353 +5
Lines 12082 12087 +5
==========================================
+ Hits 8672 8673 +1
+ Misses 2771 2770 -1
- Partials 639 644 +5
Continue to review full report at Codecov.
|
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.
Took a quick pass. Added some minor suggestions for the previous golang code style.
30f8709
to
7ca5b06
Compare
pkg/skaffold/deploy/deploy_mux.go
Outdated
@@ -103,5 +78,5 @@ func (m DeployerMux) Render(ctx context.Context, w io.Writer, as []build.Artifac | |||
} | |||
|
|||
allResources := strings.Join(resources, "\n---\n") | |||
return outputRenderedManifests(allResources, filepath, w) | |||
return manifest.OutputRenderedManifests(allResources, filepath, w) |
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.
OutputRenderedManifests
to probably OutputRender
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.
WDYT about manifest.Write()
? the fact that the manifests are rendered seems like an implementation detail to me
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.
lgtm, other than turning off lint via //nolint:golint
. Maybe we appease the linters instead?
this is a non-functional refactor to move each deployer into its own package, to improve readability of the code and clarity around what methods apply where. this will also make it easier to further consolidate and/or make changes to shared deploy code in the future.
review guide:
pkg/skaffold/deploy
:kubectl
,kustomize
,helm
,kpt
,label
,status
,util
pkg/skaffold/deploy/util
contains shared util code related toLogFile
andStringSet
pkg/skaffold/deploy/types
, which contains shared types across other deploy packagespkg/skaffold/deploy/kubectl
and intopkg/skaffold/kubernetes/manifest
, since it is sharedkustomize.BuildCommandArgs
being used inpkg/skaffold/deploy/kpt
)follow-up work: move
kubectl.Config
out ofpkg/skaffold/deploy/kubectl
, since it is shared outside of this package.