linode / linode-blockstorage-csi-driver

Container Storage Interface (CSI) Driver for Linode Block Storage
Apache License 2.0
64 stars 54 forks source link

Remove "pkg/linode-bs/metadata" #169

Closed nesv closed 3 months ago

nesv commented 3 months ago

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:

Pull Request Guidelines:

  1. [x] Does your submission pass tests?
  2. [x] Have you added tests?
  3. [x] Are you addressing a single feature in this PR?
  4. [x] Are your commits atomic, addressing one change per commit?
  5. [x] Are you following the conventions of the language?
  6. [ ] Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. [x] Have you explained your rationale for why this feature is needed?
  8. [x] Have you linked your PR to an open issue