linode / linode-blockstorage-csi-driver

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

Verify that ProviderID prefix is `linode://` before writing #92

Closed tchinmai7 closed 1 year ago

tchinmai7 commented 1 year ago

This fixes #61. Nodes created by RKE2 or k3s do not have the spec.ProviderID set to linode://<linodeID>. This change verifies that the Node's spec.Provider ID has the linode:// prefix before writing to to /linode-info/linode-id. If the linode-id file is not populated, the code falls back to looking up the linodeID using its label (which must be the same as its hostname)

General:

Pull Request Guidelines:

  1. [ ] Does your submission pass tests?
  2. [ ] 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