Improve registration behavior
What does this MR do?
-
Adds support for some executor advanced options (like autoscaling settings) while registering. Currently some options that we can use from command line (eg.
gitlab-runner register --machine-name "auto-scaled-%s" ...
) are not saved toconfig.toml
file. -
Makes
config.toml
file more clean after runner's registration. Generally it removes parts for non-used executors (which before this MR are present as toml headers for sections with some default values) and marks some kubernetes options withomitempty
/omitzero
.
Why was this MR needed?
- Makes registration more usable for scripting and adds support for missing options. 2. Is a nice, non-critical improvement
😉
Are there points in the code the reviewer needs to double check?
Which KubernetesConfig
fields should be really set to omitempty
and which not? I don't have any experience with Kubernetes so I chosen this guided by a hunch.
Does this MR meet the acceptance criteria?
-
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Branch has no merge conflicts with master
(if you do - rebase it please)
What are the relevant issue numbers?
Fixes #1802 (closed)