-
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
Use default deployer in 'skaffold apply' #5776
Use default deployer in 'skaffold apply' #5776
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5776 +/- ##
==========================================
- Coverage 71.00% 71.00% -0.01%
==========================================
Files 438 439 +1
Lines 16497 16495 -2
==========================================
- Hits 11714 11712 -2
Misses 3921 3921
Partials 862 862
Continue to review full report at Codecov.
|
pkg/skaffold/runner/new_test.go
Outdated
@@ -39,6 +39,7 @@ func TestGetDeployer(tOuter *testing.T) { | |||
cfg latest_v1.DeployType | |||
helmVersion string | |||
expected deploy.Deployer | |||
apply 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.
So we're using apply = true
to implicitly test getDefaultDeployer()
. I think it would be better to test getDefaultDeployer()
explicitly, and add some more cases like Kustomize flags and conflicts.
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.
there is actually another set of test cases below this one that tests getDefaultDeployer()
explicitly - the main thing I changed here is to embed the if runCtx.Opts.Apply
check in the call to getDeployer()
which sends us through to getDefaultDeployer()
, which I thought cleaned up the code in NewForConfig()
a bit.
the addition of the apply
boolean to this set of tests just tests the branching logic that ensures if we're in skaffold apply
, we get a default deployer - the other tests make sure that all the other cases (e.g. Kustomize flags, unresolvable config, etc.) are working as intended.
CI is failing because of an issue with |
96a3cbb
to
3c17376
Compare
3c17376
to
9dc311e
Compare
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 👍🏼
EDIT: merge after: #5791
#5543 added support for
skaffold apply
to send rendered manifests to a cluster, but didn't plumb through the creation of the default deployer all the way. this change makes sure that always happen with theapply
command is issued.