Allow for easier flux airgap update
Problem
Airgapped users have a hard time updating and installing flux on their networks. Part of this reason is because the install_flux.sh script assumes registry1.dso.mil is the registry, always.
Solution
Set default registry to registry1.dso.mil, but add an argument for users to provide their own specific registry url/ip:port.
Merge request reports
Activity
requested review from @ryan.j.garcia
I like that the diff is small.
testing shows it works and is backwards compatible
git clone https://repo1.dso.mil/platform-one/big-bang/bigbang.git
cd bigbang
git checkout flux-airgap-update
./scripts/install_flux.sh -u testuser -p testpass -r clonedregistry.lan
Verifying new behavior:
k get secret -n=flux-system private-registry -o yaml | grep .dockerconfigjson: | cut -d " " -f 4 | base64 -d
{"auths":{"clonedregistry.lan":{"username":"testuser","password":"testpass","auth":"dGVzdHVzZXI6dGVzdHBhc3M="}}}
Verifying backwards compatibility:
./scripts/install_flux.sh -u testuser -p testpass
k get secret -n=flux-system private-registry -o yaml | grep .dockerconfigjson: | cut -d " " -f 4 | base64 -d
{"auths":{"registry1.dso.mil":{"username":"testuser","password":"testpass","auth":"dGVzdHVzZXI6dGVzdHBhc3M="}}}
LGTM, ^-- the above notes should help @ryan.j.garcia quick approve
- Resolved by Cassie Souza
ok yeah cool this edge scenario test case also looks good:
This should be safe to merge given the backwards compatibility manual smoke test (above) passed, but could you do an integration test to confirm it solves the issue:(we still have folks doing airgap clones of IB, using registry:2 w/o HTTPS / auth listening on port 5000, which is a really old legacy method)
./scripts/install_flux.sh -u testuser -p testpass -r 10.10.10.10:5000
{"auths":{"10.10.10.10:5000":{"username":"testuser","password":"testpass","auth":"dGVzdHVzZXI6dGVzdHBhc3M="}}}
I think this could work in that scenario too, I don't have an environment setup to test it more throughly, but as long as it's pointing to the url I think it'd ignore the username and password. @cassiesouza do you think you can do some more testing of this edge case?
1. load a registry:2 2. upload flux images into registry:2 3. verify flux can pull from registry:2 listening on some IP: 5000
Edited by Christopher McGrath
added statusreview label
added BB-Air-Gap label
mentioned in commit a5359281
changed milestone to %1.16.0
mentioned in issue #633 (closed)
mentioned in issue #634 (closed)