These changes drop pkg/linode-bs/metadata in favour of a Metadata struct in pkg/linode-bs that can be retrieved from either the GetMetadata or GetMetadataFromAPI functions in the same package. I'm sure there were good intentions around defining an interface for retrieving metadata for a node, but for how the metadata was being retrieved and used, and how it was faked out for testing, it felt a little overwrought.
This pull request also adds a small change to the get-linode-id script provided by the Helm chart (and invoked in an init container): the use of awk(1) is dropped for using the -s, --string KEYWORD flag to dmidecode(8).
General:
[x] Have you removed all sensitive information, including but not limited to access keys and passwords?
[x] Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?
Pull Request Guidelines:
[x] Does your submission pass tests?
[x] Have you added tests?
[x] Are you addressing a single feature in this PR?
[x] Are your commits atomic, addressing one change per commit?
[x] Are you following the conventions of the language?
[ ] Have you saved your large formatting changes for a different PR, so we can focus on your work?
[x] Have you explained your rationale for why this feature is needed?
These changes drop
pkg/linode-bs/metadata
in favour of aMetadata
struct inpkg/linode-bs
that can be retrieved from either theGetMetadata
orGetMetadataFromAPI
functions in the same package. I'm sure there were good intentions around defining an interface for retrieving metadata for a node, but for how the metadata was being retrieved and used, and how it was faked out for testing, it felt a little overwrought.This pull request also adds a small change to the
get-linode-id
script provided by the Helm chart (and invoked in an init container): the use of awk(1) is dropped for using the-s, --string KEYWORD
flag to dmidecode(8).General:
Pull Request Guidelines: