Closed pdcastro closed 3 years ago
[pdcastro] This issue has attached support thread https://jel.ly.fish/19ffc301-2f91-48f2-b432-3c36ff3030ce
I think that function could be slightly modified to return the domain name as well.
This or another function, something like getRegistryDomain(imageLocation)
balena preload
is forming the registry URL with: https://github.com/balena-io-modules/balena-preload/blob/v10.4.1/lib/preload.js#L518... which currently resolves to
registry2.xxx
wherexxx
is the user's openBalena domain name (likemydomain.com
). However, such aregistry2
hostname does not exist in openBalena.Putting aside the discussion of whether or not
registry2.xxx
should exist in openBalena, it was pointed out, I think correctly, thatbalena-preload
should prefer extracting the registry URL from the image's name, rather than building the URL as in the code snippet above. In particular, I see this function:https://github.com/balena-io-modules/balena-preload/blob/v10.4.1/lib/preload.js#L562-L571
... that already parses the imageLocation name that is supposed to have the "correct" registry domain name, which is being ignored in favour of
this.balenaSettings.registry2Url
. I think that function could be slightly modified to return the domain name as well.