-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ko to build container image (#19)
`ko` is a tool that can build and deploy k8s resources that reference go paths which are build and transparently substituted into the resulting resources. ko works by finding `ko://` references in the k8s yaml that point at a go compile target, the built binary is placed into the base image and pushed to an image registry specified by the KO_DOCKER_REPO env var. A digested reference to the pushed image is substituted into the yaml replacing the `ko://...` reference. https://github.com/google/ko In this case, we can replace direct dependencies on the kubectl and docker CLIs and the Docker daemon. ko also makes it much easier to produce multi-platform/architecture images for which there is a compatible base image (gcr.io/distroless/static:nonroot by default) and can be cross compiled by go. Signed-off-by: Scott Andrews <andrewssc@vmware.com>
- Loading branch information
Showing
8 changed files
with
717 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/k8s-service-bindings/implementation/hack/ko | ||
|
||
go 1.16 | ||
|
||
require github.com/google/ko v0.8.3 |
Oops, something went wrong.