AgentBaker
AgentBaker copied to clipboard
Timmy/installer
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds the following functions to node-bootstrapper:
- It produces a kubeconfig or bootstrap-kubeconfig (depending on scenario) for Arc or Azure machines that use the VM (or M)'s MSI as a token to join the cluster.
- It modifies the windows scripts so they will run on a vanilla windows VM (needed for singularity)
To produce variants of kubeconfig, it introduces new config params:
- NodeBootstrappingConfiguration.BootstrappingMethod which can have a string enum value with values below.
- NodeBootstrappingConfiguration.BootstrappingManagedIdentityID to provide a managed identity ID to use to auth to the cluster
const (
UseArcMsiToMakeCSR BootstrappingMethod = "UseArcMsiToMakeCSR"
UseAzureMsiToMakeCSR BootstrappingMethod = "UseAzureMsiToMakeCSR"
UseArcMsiDirectly BootstrappingMethod = "UseArcMsiDirectly"
UseAzureMsiDirectly BootstrappingMethod = "UseAzureMsiDirectly"
UseSecureTLSBootstrapping BootstrappingMethod = "UseSecureTLSBootstrapping"
//nolint:gosec // this is a const string to use in switch statements, not hardcoded credentials
UseTLSBootstrapToken BootstrappingMethod = "UseTLSBootstrapToken"
)
The other config params relevant to bootstrapping are:
- NodeBootstrappingConfiguration.KubeletClientTLSBootstrapToken
- NodeBootstrappingConfiguration.EnableSecureTLSBootstrapping
so the new one (being an enum) gives us extensibility in future and is in the same config place as the existing one.
Which issue(s) this PR fixes:
Fixes #
Requirements:
- [ ] uses conventional commit messages
- [ ] includes documentation
- [ ] adds unit tests
- [ ] tested upgrade from previous version
Special notes for your reviewer:
Release note:
none