feat: handle base URL and fake SMD consistently #96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These were previously options that were sorta halfway set up as CLI args, and are now fully set up as CLI args.
Add a --smd-simulator flag for the CLOUD_INIT_SMD_SIMULATOR and set the fakeSMDEnabled variable to it. Previously the envvar was used in some cases, and the variable in others, and nothing actually set the variable.
Previously the envvar enabled the fake SMD client, but did not expose the admin endpoints to manipulate the fake SMD, which relied on the unset
fakeSMDvar.Pass baseUrl to the VendorDataHandler initializer and use it if none is set in the store. Previously this was only used for logging, and was effectively inaccurate as such.
Previously setting
BASE_URLhad no effect on VendorDataHandler (the only thing that uses it AFAIK); you hadd to use the cluster-defaults API endpoint to get anything other than thehttp://cloud-init:27777magic string baked into VendorDataHandler.