This is specifically useful for operators working in an airgapped environment.
Unfortunately, given we don't really know what the shape of the pull secret should be, we do our best to prompt for username/password and supply the registry-endpoint value.
2. Overrode registry and registry-endpoint. Expectation is that the install will fail when attempting to pull helm chart due to bad creds:
./_output/bin/darwin_arm64/up space init --token-file=key.json v0.14.0-23.ga50d1a87 --registry=upbound/spaces-install --registry-endpoint=hub.docker.com
Username: username
Password:
WARNING One or more required prerequisites are not installed:
Description of your changes
This is specifically useful for operators working in an airgapped environment.
Unfortunately, given we don't really know what the shape of the pull secret should be, we do our best to prompt for username/password and supply the registry-endpoint value.
Fixes #349
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
up space init --token-file=key.json version
still works:❌ cert-manager ❌ universal-crossplane ❌ ingress-nginx ❌ provider-kubernetes ❌ provider-helm
Would you like to install them now? [y/N]: Yes
√ [1/5]: Installing cert-manager √ [2/5]: Installing universal-crossplane √ [3/5]: Installing ingress-nginx √ [4/5]: Installing provider-kubernetes √ [5/5]: Installing provider-helm INFO Required prerequisites met! INFO Proceeding with Upbound Spaces installation... √ [1/3]: Creating pull secret upbound-pull-secret √ [2/3]: Initializing Space components √ [3/3]: Starting Space Components 🙌 Your Upbound Space is Ready!
👀 Next Steps 👇
👉 Check out Upbound Spaces docs @ https://docs.upbound.io
./_output/bin/darwin_arm64/up space init --token-file=key.json v0.14.0-23.ga50d1a87 --registry=upbound/spaces-install --registry-endpoint=hub.docker.com Username: username Password: WARNING One or more required prerequisites are not installed:
❌ cert-manager ❌ universal-crossplane ❌ ingress-nginx ❌ provider-kubernetes ❌ provider-helm
Would you like to install them now? [y/N]: Yes
√ [1/5]: Installing cert-manager √ [2/5]: Installing universal-crossplane √ [3/5]: Installing ingress-nginx √ [4/5]: Installing provider-kubernetes √ [5/5]: Installing provider-helm INFO Required prerequisites met! INFO Proceeding with Upbound Spaces installation... √ [1/3]: Creating pull secret upbound-pull-secret ▄ [2/3]: Initializing Space components (1s)up: error: space.initCmd.Run(): could not pull chart: failed to get OCI image: GET https://auth.docker.io/token?scope=repository%3Aupbound%2Fspaces-install%2Fspaces%3Apull&service=registry.docker.io: unexpected status code 401 Unauthorized: {"details":"incorrect username or password"}
kubectl -n upbound-system get secrets upbound-pull-secret -o go-template='{{index .data ".dockerconfigjson"}}' | base64 -d {"auths":{"hub.docker.com":{"username":"username","password":"password","auth":"dXNlcm5hbWU6cGFzc3dvcmQ="}}}%