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

Detect ko images for debugging, by envvar #6563

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

halvards
Copy link
Contributor

@halvards halvards commented Sep 3, 2021

Description

All container images built by ko have the KO_DATA_PATH environment variable set: https://github.com/google/ko#static-assets

This can be used for images built using Skaffold's ko builder (when ready), and for images built using ko via a custom build (usable now).

Tracking: #6041
Related: #6569
Context: #6496 (comment)

All container images built by ko have the `KO_DATA_PATH` environment
variable set: https://github.com/google/ko#static-assets

This can be used for images built using Skaffold's ko builder (when
ready), and for images build using ko via a custom build (usable now).

Tracking: GoogleContainerTools#6041
@halvards halvards requested a review from a team as a code owner September 3, 2021 06:03
@halvards halvards requested a review from tejal29 September 3, 2021 06:03
@google-cla google-cla bot added the cla: yes label Sep 3, 2021
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #6563 (59f157f) into main (290280e) will increase coverage by 0.04%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6563      +/-   ##
==========================================
+ Coverage   70.48%   70.53%   +0.04%     
==========================================
  Files         515      515              
  Lines       23150    23150              
==========================================
+ Hits        16317    16328      +11     
+ Misses       5776     5768       -8     
+ Partials     1057     1054       -3     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/cmd.go 70.68% <0.00%> (-0.38%) ⬇️
cmd/skaffold/app/cmd/flags.go 90.81% <ø> (ø)
cmd/skaffold/skaffold.go 0.00% <ø> (ø)
pkg/skaffold/build/buildpacks/logger.go 0.00% <ø> (ø)
pkg/skaffold/config/options.go 100.00% <ø> (ø)
pkg/skaffold/schema/latest/v1/config.go 62.16% <ø> (ø)
pkg/skaffold/server/server.go 46.87% <0.00%> (-0.75%) ⬇️
.../skaffold/kubernetes/status/resource/deployment.go 85.09% <50.00%> (-0.71%) ⬇️
pkg/skaffold/event/v2/event.go 84.22% <66.66%> (-0.37%) ⬇️
pkg/skaffold/build/buildpacks/lifecycle.go 83.59% <100.00%> (ø)
... and 11 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 70e9db9...59f157f. Read the comment docs.

@halvards halvards added the kokoro:run runs the kokoro jobs on a PR label Sep 6, 2021
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Sep 6, 2021
@halvards halvards changed the title Detect Go images built by ko for debugging, based on envvar Detect ko images for debugging, by envvar Sep 6, 2021
halvards added a commit to halvards/skaffold that referenced this pull request Sep 6, 2021
**Description**

Container images built by ko have the
[author](https://github.com/opencontainers/image-spec/blob/main/config.md#properties)
property set to the value
[`github.com/google/ko`](https://github.com/google/ko/blob/v0.8.3/pkg/build/gobuild.go#L610).

Skaffold debug can use this property to detect a Go runtime artifact.

This feature can be used for images built using Skaffold's ko builder (when ready),
and for images build using ko via a custom build (usable now).

**Tracking**: GoogleContainerTools#6041
**Related**: GoogleContainerTools#6563
**Context**: GoogleContainerTools#6496 (comment)
@tejal29 tejal29 merged commit 6eab093 into GoogleContainerTools:main Sep 8, 2021
tejal29 pushed a commit that referenced this pull request Sep 8, 2021
**Description**

Container images built by ko have the
[author](https://github.com/opencontainers/image-spec/blob/main/config.md#properties)
property set to the value
[`github.com/google/ko`](https://github.com/google/ko/blob/v0.8.3/pkg/build/gobuild.go#L610).

Skaffold debug can use this property to detect a Go runtime artifact.

This feature can be used for images built using Skaffold's ko builder (when ready),
and for images build using ko via a custom build (usable now).

**Tracking**: #6041
**Related**: #6563
**Context**: #6496 (comment)
halvards added a commit to halvards/skaffold that referenced this pull request Sep 13, 2021
Disable Go compiler optimizations when building an artifact with the ko
builder, and the Skaffold run mode is debug.

**Tracking**: GoogleContainerTools#6041
**Related**: GoogleContainerTools#6563, GoogleContainerTools#6569
MarlonGamez pushed a commit that referenced this pull request Sep 20, 2021
Disable Go compiler optimizations when building an artifact with the ko
builder, and the Skaffold run mode is debug.

**Tracking**: #6041
**Related**: #6563, #6569
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.

4 participants