AgentBaker icon indicating copy to clipboard operation
AgentBaker copied to clipboard

Timmy/installer

Open timmy-wright opened this issue 1 year ago • 0 comments

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:

Special notes for your reviewer:

Release note:

none

timmy-wright avatar Sep 12 '24 01:09 timmy-wright