-
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
Add Initializer Interface to skaffold to support other deployers in skaffold init #1756
Add Initializer Interface to skaffold to support other deployers in skaffold init #1756
Conversation
3da9c35
to
d3a71d8
Compare
3ce11bf
to
5f0bd4e
Compare
Codecov Report
@@ Coverage Diff @@
## master #1756 +/- ##
==========================================
+ Coverage 46.27% 46.46% +0.19%
==========================================
Files 137 140 +3
Lines 6492 6523 +31
==========================================
+ Hits 3004 3031 +27
- Misses 3188 3189 +1
- Partials 300 303 +3
Continue to review full report at Codecov.
|
pkg/skaffold/initializer/util.go
Outdated
// IsSupportedKubernetesFormat is for determining if a file under a glob pattern | ||
// is deployable file format. It makes no attempt to check whether or not the file | ||
// is actually deployable or has the correct contents. | ||
func IsSupportedKubernetesFormat(n string) bool { |
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.
func IsSupportedKubernetesFormat(n string) bool { | |
func IsSupportedKubernetesFileExtension(n string) bool { |
?
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, thank you
5f0bd4e
to
7aff98d
Compare
This PR is implementing the Proposal mentioned in #1726
In this PR,
Moved all the Kubectl deployer specific code to "github.com/GoogleContainerTools/skaffold/pkg/skaffold/initializer/kubectl" module and added tests.
Moved all
skaffold init
processing from cmd/skaffold/app/cmd/init.go to pkg/skaffold/initializer/init.go and corresponding tests.In order to keep the diff minimum, i have not refactored a lot of code in to modules. I will refactor funcs like "resolveDockerfileImages" or "processCLIArtifacts" as appropriate when i add other intializers.
Added tests for some utility functions.