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

KO_CONFIG_PATH pointing to a file doesn't work #919

Closed
vdemeester opened this issue Jan 4, 2023 · 4 comments · Fixed by #923
Closed

KO_CONFIG_PATH pointing to a file doesn't work #919

vdemeester opened this issue Jan 4, 2023 · 4 comments · Fixed by #923

Comments

@vdemeester
Copy link
Contributor

It seems like setting KO_CONFIG_PATH to a file instead of a folder doesn't work. This commit seems to make it work but for some reason, it doesn't.

On tektoncd/pipeline repo.

$ ko version
0.12.0
$ cat /tmp/.ko.yaml
defaultBaseImage: cgr.dev/chainguard/static
baseImageOverrides:
  github.com/tektoncd/pipeline/cmd/entrypoint: ghcr.io/vdemeester/test/github.com/tektoncd/pipeline/combined-base-image@sha256:33a5146f205123032bce00d2785d62729f55d91b9d2befee37091a153a0fee18
  github.com/tektoncd/pipeline/cmd/nop: ghcr.io/vdemeester/test/github.com/tektoncd/pipeline/combined-base-image@sha256:33a5146f205123032bce00d2785d62729f55d91b9d2befee37091a153a0fee18
  github.com/tektoncd/pipeline/cmd/workingdirinit: ghcr.io/vdemeester/test/github.com/tektoncd/pipeline/combined-base-image@sha256:33a5146f205123032bce00d2785d62729f55d91b9d2befee37091a153a0fee18
  # git-init uses a base image that includes Git, and supports running either
  # as root or as user nonroot with UID 65532.
  github.com/tektoncd/pipeline/cmd/git-init: cgr.dev/chainguard/git
$ cat .ko.yaml
defaultBaseImage: cgr.dev/chainguard/static
baseImageOverrides:
  # git-init uses a base image that includes Git, and supports running either
  # as root or as user nonroot with UID 65532.
  github.com/tektoncd/pipeline/cmd/git-init: cgr.dev/chainguard/git
$ KO_CONFIG_PATH=/tmp/.ko.yaml ko resolve -f config > /tmp/foo.yaml
# […]
2023/01/04 10:20:09 Using base cgr.dev/chainguard/static@sha256:be400c5f4fa4d8b07fa6a4c6f0e264403f348c7b13606d49fef3f5b5e97f16d8 for github.com/tektoncd/pipeline/cmd/entrypoint
# […]
$ rm .ko.yaml
$ KO_CONFIG_PATH=/tmp/.ko.yaml ko resolve -f config > /tmp/foo.yaml
# […]
2023/01/04 10:20:39 Using base distroless.dev/static:latest@sha256:be400c5f4fa4d8b07fa6a4c6f0e264403f348c7b13606d49fef3f5b5e97f16d8 for github.com/tektoncd/pipeline/cmd/entrypoint
# […]
$ KO_CONFIG_PATH=/tmp/ ko resolve -f config > /tmp/foo.yaml
# […]
2023/01/04 10:21:08 Using base cgr.dev/chainguard/static@sha256:be400c5f4fa4d8b07fa6a4c6f0e264403f348c7b13606d49fef3f5b5e97f16d8 for github.com/tektoncd/pipeline/cmd/webhook
# […]
2023/01/04 10:21:09 Using base ghcr.io/vdemeester/test/github.com/tektoncd/pipeline/combined-base-image@sha256:33a5146f205123032bce00d2785d62729f55d91b9d2befee37091a153a0fee18 for github.com/tektoncd/pipeline/cmd/entrypoint
# […]
$ git co .ko.yaml # trying with a .ko.yaml in path
$ KO_CONFIG_PATH=/tmp/ ko resolve -f config > /tmp/foo.yaml
2023/01/04 10:28:30 Using base cgr.dev/chainguard/static@sha256:be400c5f4fa4d8b07fa6a4c6f0e264403f348c7b13606d49fef3f5b5e97f16d8 for github.com/tektoncd/pipeline/cmd/webhook
# […]
2023/01/04 10:28:31 Using base ghcr.io/vdemeester/test/github.com/tektoncd/pipeline/combined-base-image@sha256:33a5146f205123032bce00d2785d62729f55d91b9d2befee37091a153a0fee18 for github.com/tektoncd/pipeline/cmd/entrypoint
# […]

See tektoncd/operator#1199 (comment)

cc @imjasonh @benmoss

vdemeester added a commit to vdemeester/tektoncd-pipeline that referenced this issue Jan 4, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
@developer-guy
Copy link
Collaborator

developer-guy commented Jan 4, 2023

similar PR #910 and these both should be fixed with #904, PTAL @imjasonh

@benmoss
Copy link
Contributor

benmoss commented Jan 4, 2023

hmm i think you mean #904

@developer-guy
Copy link
Collaborator

hmm i think you mean #904

Ah yes, sorry about that 🙈

tekton-robot pushed a commit to tektoncd/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit to tekton-robot/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit to tekton-robot/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit to tekton-robot/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit to tektoncd/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit to tektoncd/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit to tektoncd/pipeline that referenced this issue Jan 5, 2023
- Export the `KO_CONFIG_PATH` variable 🤦
- Using KO_CONFIG_PATH pointing to a file doesn't seem to work with ko
  0.12.0 (ko-build/ko#919)

Signed-off-by: Vincent Demeester <[email protected]>
@developer-guy
Copy link
Collaborator

kindly ping @vdemeester ☝️ this PR will fix the issue.

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

Successfully merging a pull request may close this issue.

3 participants