Skip to content

Improve documentation for kaniko#2186

Merged
dgageot merged 4 commits intoGoogleContainerTools:masterfrom
corneliusweig:improve-kaniko-docs
Jun 6, 2019
Merged

Improve documentation for kaniko#2186
dgageot merged 4 commits intoGoogleContainerTools:masterfrom
corneliusweig:improve-kaniko-docs

Conversation

@corneliusweig
Copy link
Copy Markdown
Contributor

Today, I finally tried out kaniko, but it was harder to get it working than it should be. Please have a look and see if this is correct (which I'm not entirely sure of) and helpful.

Also, prevent users from specifying a docker-config by path and secret-name at the same time.

Also, prevent users from specifying a docker-config by path and
secret-name at the same time.

Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@codecov-io
Copy link
Copy Markdown

codecov-io commented May 27, 2019

Codecov Report

Merging #2186 into master will increase coverage by 0.68%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2186      +/-   ##
=========================================
+ Coverage   57.41%   58.1%   +0.68%     
=========================================
  Files         187     188       +1     
  Lines        7905    7869      -36     
=========================================
+ Hits         4539    4572      +33     
+ Misses       2954    2924      -30     
+ Partials      412     373      -39
Impacted Files Coverage Δ
pkg/skaffold/schema/latest/config.go 100% <ø> (ø) ⬆️
cmd/skaffold/app/cmd/config/unset.go 15.38% <0%> (-32.24%) ⬇️
cmd/skaffold/app/cmd/config/list.go 0% <0%> (-25.81%) ⬇️
cmd/skaffold/app/cmd/delete.go 55.55% <0%> (-11.12%) ⬇️
pkg/skaffold/watch/watch.go 73.07% <0%> (-9.54%) ⬇️
cmd/skaffold/app/cmd/debug.go 54.54% <0%> (-7%) ⬇️
pkg/skaffold/watch/triggers.go 45.65% <0%> (-6.41%) ⬇️
cmd/skaffold/app/cmd/run.go 53.84% <0%> (-6.16%) ⬇️
cmd/skaffold/app/cmd/deploy.go 64.28% <0%> (-4.47%) ⬇️
cmd/skaffold/app/cmd/diagnose.go 35% <0%> (-3.1%) ⬇️
... and 45 more

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 45952db...c65fcb8. Read the comment docs.

Copy link
Copy Markdown
Contributor

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving these docs, they definitely need some love :)

Left a couple suggestions!

{{< schema root="KanikoBuildContext" >}}

Since Kaniko must push images to a registry, it is required to set up cluster credentials.
For example, Google Cloud Build requires a service account secret with push and pull access:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After line 116, I think it would be useful to point people to the kaniko docs for more guidance in setting up a secret correctly. Then we can recommend that users put the name of that secret as the pullSecretName to provide authentication to the cluster (there are alternative paths as well, but this is the recommended path)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think you meant Kubernetes instead of Google Cloud Build?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think I meant "Google Container Registry".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the reference to GCB/GCR, because this is much better explained in the kaniko docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops that makes way more sense 😅 but cool, sgtm!

```yaml
build:
cluster:
pullSecret: path-to-service-account-key-file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this yaml snippet, we can say something like,

Another option is to directly supply a path to a credentials file using `pullSecret`

Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@corneliusweig
Copy link
Copy Markdown
Contributor Author

@priyawadhwa At your convenience PTAL.

@priyawadhwa priyawadhwa added kokoro:run runs the kokoro jobs on a PR docs-modifications runs the docs preview service on the given PR labels Jun 4, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jun 4, 2019
@container-tools-bot
Copy link
Copy Markdown

Please visit http://35.236.79.231:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Jun 4, 2019
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@corneliusweig
Copy link
Copy Markdown
Contributor Author

Well I didn't realize that one of the options tables was broken. Can you take another look, @priyawadhwa?

That refactoring was a split of KanikoBuild into KanikoArtifact+ClusterDetails. It seems that before the refactoring all options from KanikoBuild were displayed here. Do you think we should add another table for the options in ClusterDetails (which were displayed before)?

@priyawadhwa
Copy link
Copy Markdown
Contributor

@corneliusweig nice catch, yah I think a table for KanikoAritfact and a table for ClusterDetails makes sense.

Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@corneliusweig
Copy link
Copy Markdown
Contributor Author

@priyawadhwa Sorry it took so long. Can you have another look?

@priyawadhwa priyawadhwa added the docs-modifications runs the docs preview service on the given PR label Jun 5, 2019
@container-tools-bot
Copy link
Copy Markdown

Please visit http://35.236.0.111:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Jun 5, 2019
@priyawadhwa priyawadhwa added the kokoro:run runs the kokoro jobs on a PR label Jun 5, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jun 5, 2019
@dgageot dgageot merged commit d5d676b into GoogleContainerTools:master Jun 6, 2019
@corneliusweig corneliusweig deleted the improve-kaniko-docs branch June 6, 2019 10:32
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.

8 participants