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

chore: Update ko builder to use ko v0.13.0 #8699

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

halvards
Copy link
Collaborator

Fixes: #7851 and #8698

The main user-facing change in ko v0.13.0 that is relevant to current Skaffold features is the change in default base image from gcr.io/distroless/static:nonroot to cgr.dev/chainguard/static:latest.

Some of the Skaffold ko builder examples overrides the default base image with gcr.io/distroless/static-debian11:nonroot. This assists users who run Skaffold in Google Cloud VPC networks with limited or no internet connectivity. These users can access Google's distroless images in Container Registry and Artifact Registry via Private Google Access.

This change also updates the ko builder maturity to Beta :-)

The main change in ko v0.13.0 that is relevant to current Skaffold
features it the change in default base image from
`gcr.io/distroless/static:nonroot` to `cgr.dev/chainguard/static:latest`.

Some of the ko builder examples overrides the default base image with
`gcr.io/distroless/static-debian11:nonroot`, to assist users who run
Skaffold in Google Cloud VPC networks with limited or no internet
connectivity. These users can access Google's distroless images
in Container Registry and Artifact Registry via Private Google Access.

This change also changes the ko builder maturity to Beta :-)
@@ -88,7 +88,7 @@
"debug": "x",
"area": "Build",
"feature": "ko builder",
"maturity": "alpha",
"maturity": "beta",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I hope this is ok :-D. Please let me know if it's not, I'd be happy to revert it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely! 👍

profiles:
- name: gcb
build:
googleCloudBuild:
koImage: us-central1-docker.pkg.dev/k8s-skaffold/testing/skaffold:v1.37.2-lts
koImage: us-central1-docker.pkg.dev/k8s-skaffold/testing/skaffold:v1.37.2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The previous tag didn't exist in the repository.

pushd $(mktemp -d)
curl -L https://github.com/google/ko/archive/v0.12.0.tar.gz | tar --strip-components 1 -zx
go build -o $(go env GOPATH)/bin/ko .
pushd "$(mktemp -d)"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding quotes here to fix shellcheck errors.

@@ -58,7 +58,7 @@ substitutions:
_GKE_CLUSTER_PROJECT_ID: $PROJECT_ID
_GKE_CLUSTER_ZONE: us-central1-f
_IMAGE_REPO: gcr.io/${PROJECT_ID}
_GCLOUD_IMAGE: us-central1-docker.pkg.dev/k8s-skaffold/testing/skaffold
_SKAFFOLD_IMAGE: us-central1-docker.pkg.dev/k8s-skaffold/testing/skaffold
_GCLOUD_IMAGE: gcr.io/k8s-skaffold/skaffold
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current images don't exist afaict.

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #8699 (1c80190) into main (290280e) will decrease coverage by 6.00%.
The diff coverage is 54.27%.

@@            Coverage Diff             @@
##             main    #8699      +/-   ##
==========================================
- Coverage   70.48%   64.49%   -6.00%     
==========================================
  Files         515      616     +101     
  Lines       23150    30985    +7835     
==========================================
+ Hits        16317    19983    +3666     
- Misses       5776     9502    +3726     
- Partials     1057     1500     +443     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 39 more

... and 406 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

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

LGTM

@aaron-prindle aaron-prindle merged commit 085f74c into GoogleContainerTools:main Apr 25, 2023
15 checks passed
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.

None yet

2 participants