-
Notifications
You must be signed in to change notification settings - Fork 53
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
Airgapped install support #175
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, you can split this PR into three parts:
First part should provide automation for creating structure of the used images for every package by calling:
make update
The second one should provide unified makefile target to build all the images from images/
directory and output <image>.json
and <image>.tag
files:
make image
so every image can be builded separately:
make image-<image>
It should always output metadata and tag files with same name as image
I can help you with writing this target.
In the third it should substitute builded image metadata and tag into helm chart, so the charts should be modified or override the named template to putting correct image infromaton from these files:
cozystack/packages/system/cilium/templates/_helpers.tpl
Lines 1 to 3 in 02a41e1
{{- define "cilium.image" -}} | |
{{ .Files.Get "images/cilium.tag" | trim }}@{{ index (.Files.Get "images/cilium.json" | fromJson) "containerimage.digest" }} | |
{{- end -}} |
This is a huge work :)
scripts/update-dockerfiles.sh
Outdated
|
||
|
||
function with_helm() { | ||
helm template . | awk '/^[ \t"-]*image["]*: [a-zA-Z0-9/:@"\.-]+$/{print $NF}' | sed 's/"//g' | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wont work, because we have to replace all the images with ours in the helm chart, the output of helm template .
will always return our values. Try parsing upstream helm chart instead
I think I'll leave the PR as a place for duscussion, and then make separate ones with actual changes. |
Next steps:
|
Hello, @nbykov0! |
Hi @RaSerge! Yeah, I also dislike how it goes. |
My ideas:
Yesterday i found this helm plugin (it extracts images from charts).
|
no need to rewrite image names. It could be achieved simpler by
|
|
Something like this |
There is one more way by Talos itself, see |
Well, it would work for sure, but to me it seems more like a workaround. In case of a local cache I can almost feel all the concerns coming from security etc., who will notice images from public registries in private clusters :) And overriding image names on the fly might break image signing and all that. However, a pull-through/local cache is a needed feature for sure. |
packages/system/capi-operator
make update
make image
@kvaps please check if I'm moving in a right direction