-
Notifications
You must be signed in to change notification settings - Fork 6
add oci pull to images #175
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
base: master
Are you sure you want to change the base?
Conversation
|
@majst01 okay, so this is what I came up with. Can you do a review, pls? Besides, I'm wondering if it's suitable to retrieve the oci credentials from env vars. Can you help me out here? |
The OCI creadentials should be passed as optional fields from the pixiecore to the metal-hammer: https://github.com/metal-stack/metal-hammer/blob/master/cmd/pixie-client.go#L14 Ideally a slice of registryconfig which contains the registry url, the username and the password should come from pixiecore. |
|
@majst01 does this work? https://github.com/metal-stack/metal-hammer/pull/175/files#diff-cfcd5a78ad9476ee24d7680dd023e71136f329c771d76ae6837ba68320b6379cR37 what does |
It contains the full URL as configured in the image |
0bfe689 to
7052ccb
Compare
machine.Allocation.Image.URL can be used without auth
since it's not supported by name.ParseReference
…nd default to image
ad2bb15 to
2506148
Compare
7b7365d to
2a95918
Compare
| for _, c := range ociConfigs { | ||
| err = img.NewImage(h.log).OciPull(ctx, c.RegistryURL, h.chrootPrefix, c.Username, c.Password) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| } |
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.
The ociconfig should be a map from registry -> credentials, then you can simple get the credentials required for this registry and no need to iterate
| // keep this until https://github.com/u-root/u-root/pull/3451 is merged and released | ||
| github.com/u-root/u-root => github.com/majst01/u-root v0.0.0-20250910091544-306665b6f8e8 | ||
|
|
||
| google.golang.org/genproto => google.golang.org/genproto v0.0.0-20250826171959-ef028d996bc1 |
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.
why is this required ?
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.
I had an import cycle which was fixed by this. If you have any idea on how to solve this differently, I'm happy to implement it.
Description
References
TODO