-
Christian Groschupp authored
This pull request adds support for setting default labels on all newly created volumes in the Hetzner Cloud CSI driver. ## Changes - Introduced the environment variable `HCLOUD_VOLUME_DEFAULT_LABELS`, which accepts a comma-separated list of key:value pairs. - Added the `ParseEnvMap` function to parse and validate the environment variable into a `map[string]string`. - Extended `VolumeService` to apply the parsed labels during volume creation. - Added unit tests for the `ParseEnvMap` function in `internal/app/app_test.go`. ## Notes - Labels are only applied if `HCLOUD_VOLUME_DEFAULT_LABELS` is set and contains valid key=value pairs. - Invalid formats in the environment variable will cause the controller to fail on startup.
Christian Groschupp authoredThis pull request adds support for setting default labels on all newly created volumes in the Hetzner Cloud CSI driver. ## Changes - Introduced the environment variable `HCLOUD_VOLUME_DEFAULT_LABELS`, which accepts a comma-separated list of key:value pairs. - Added the `ParseEnvMap` function to parse and validate the environment variable into a `map[string]string`. - Extended `VolumeService` to apply the parsed labels during volume creation. - Added unit tests for the `ParseEnvMap` function in `internal/app/app_test.go`. ## Notes - Labels are only applied if `HCLOUD_VOLUME_DEFAULT_LABELS` is set and contains valid key=value pairs. - Invalid formats in the environment variable will cause the controller to fail on startup.