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

Extended Kaniko support #4900

Merged
merged 8 commits into from
Oct 14, 2020
Merged

Extended Kaniko support #4900

merged 8 commits into from
Oct 14, 2020

Conversation

ricardo-larosa
Copy link
Contributor

@ricardo-larosa ricardo-larosa commented Oct 11, 2020

Fixes: #4852
Related: #4853

Description

Implement kaniko flags as skaffold config items.

User facing changes (remove if N/A)
Support for additionalFlags aka

        flags: 

is removed

Example:
Before

    artifacts:
    - image: registry.io/image:tag
      kaniko:
        flags: 
          - --snapshotMode=redo
          - --cleanup=true
          - --verbosity=debug

Now

    artifacts:
    - image: registry.io/image:tag
      kaniko:
        snapshotMode: redo
        cleanup: true
        verbosity: debug

Limitations/Scope

Does not implement kaniko --git tag nor related.

Notes
It looks long but is due to the number of flags implemented.

@codecov
Copy link

codecov bot commented Oct 11, 2020

Codecov Report

Merging #4900 into master will increase coverage by 0.10%.
The diff coverage is 92.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4900      +/-   ##
==========================================
+ Coverage   71.96%   72.07%   +0.10%     
==========================================
  Files         357      358       +1     
  Lines       12327    12364      +37     
==========================================
+ Hits         8871     8911      +40     
+ Misses       2799     2797       -2     
+ Partials      657      656       -1     
Impacted Files Coverage Δ
pkg/skaffold/build/cluster/kaniko.go 0.00% <0.00%> (ø)
pkg/skaffold/build/cluster/logs.go 15.78% <0.00%> (ø)
pkg/skaffold/schema/latest/config.go 100.00% <ø> (ø)
pkg/skaffold/build/cluster/pod.go 86.56% <80.00%> (-1.01%) ⬇️
pkg/skaffold/build/kaniko/args.go 95.23% <95.23%> (ø)
pkg/skaffold/build/cluster/secret.go 40.32% <100.00%> (ø)
pkg/skaffold/build/gcb/kaniko.go 77.77% <100.00%> (-4.58%) ⬇️
pkg/skaffold/schema/defaults/defaults.go 89.09% <100.00%> (ø)
pkg/skaffold/util/env_template.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6260e8...009e5d2. Read the comment docs.

@@ -32,7 +33,7 @@ const (
defaultCloudBuildDockerImage = "gcr.io/cloud-builders/docker"
defaultCloudBuildMavenImage = "gcr.io/cloud-builders/mvn"
defaultCloudBuildGradleImage = "gcr.io/cloud-builders/gradle"
defaultCloudBuildKanikoImage = constants.DefaultKanikoImage
defaultCloudBuildKanikoImage = kaniko.DefaultImage
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 moving this into kaniko package!

@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Oct 14, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Oct 14, 2020
@tejal29 tejal29 merged commit 7e5ae4c into GoogleContainerTools:master Oct 14, 2020
@vinceferro
Copy link

Btw great stuff! I've been running hacks to have kaniko configured the way we wanted, now it's supported and I couldn't be happier :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove warning message "The additionalFlags field in kaniko is deprecated"
4 participants