Skip to content

Improve registration behavior

Tomasz Maczukin requested to merge improvement/registration-command into master

What does this MR do?

  1. 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 to config.toml file.

  2. 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 with omitempty/omitzero.

Why was this MR needed?

  1. 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)

Merge request reports

Loading