Skip to content

Use KO to build container image#410

Draft
nissessenap wants to merge 3 commits intografana:mainfrom
nissessenap:ko
Draft

Use KO to build container image#410
nissessenap wants to merge 3 commits intografana:mainfrom
nissessenap:ko

Conversation

@nissessenap
Copy link

Solves #406

@sd2k realized this became harder than I thought. Since you are using a number of internal github actions with access requirements to Vault for example.

I did some educated guesses based on how it's done in the grafana-operator, but you would definitely need todo things on your side.

The main issue is that KO don't support setting a custom entrypoint the same way as is currently done in the Dockerfile.

  • Dockerfile image: docker run grafana/mcp-grafana → starts SSE server on 0.0.0.0:8000
  • Ko image: docker run grafana/mcp-grafana → uses binary defaults

So it would be a breaking change.
Claude updated the README for me, I have barely read through it.

I can take a real stab at updating the README, but before doing, so I wanted to point out the breaking change and get your thoughts on it. + handing over the GHA stuff to you since I don't have internal access, and I have just guessed allot.

I fully understand if we just close this PR, but hopefully it was some use for you when thinking about using KO.

Solves grafana#406, by changing the base image to something slimer.
We can also remove the Dockerfile since it's not used any more.
Signed-off-by: Edvin Norling <edvin.norling@kognic.com>
Comment on lines +54 to +56
with:
go-version-file: "go.mod"
cache: true

Check failure

Code scanning / zizmor

runtime artifacts potentially vulnerable to a cache poisoning attack Error

runtime artifacts potentially vulnerable to a cache poisoning attack
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 this pull request may close these issues.

1 participant