Skip to content

Commit

Permalink
fix: follow-up fixes on bootstrappingclient mode (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
comtalyst authored and tallaxes committed Jan 24, 2025
1 parent c4b949a commit 153728a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type ProvisionClientBootstrap struct {

var _ Bootstrapper = (*ProvisionClientBootstrap)(nil) // assert ProvisionClientBootstrap implements customscriptsbootstrapper

// nolint gocyclo - will be refactored later
func (p ProvisionClientBootstrap) GetCustomDataAndCSE(ctx context.Context) (string, string, error) {
if p.IsWindows {
// TODO(Windows)
Expand Down Expand Up @@ -120,16 +121,9 @@ func (p ProvisionClientBootstrap) GetCustomDataAndCSE(ctx context.Context) (stri

if p.KubeletConfig != nil {
provisionProfile.CustomKubeletConfig = &models.CustomKubeletConfig{
// CPUManagerPolicy: lo.ToPtr(p.KubeletConfig.CPUManagerPolicy),
CPUCfsQuota: p.KubeletConfig.CPUCFSQuota,
// CPUCfsQuotaPeriod: lo.ToPtr(p.KubeletConfig.CPUCFSQuotaPeriod.String()),
CPUCfsQuota: p.KubeletConfig.CPUCFSQuota,
ImageGcHighThreshold: p.KubeletConfig.ImageGCHighThresholdPercent,
ImageGcLowThreshold: p.KubeletConfig.ImageGCLowThresholdPercent,
// TopologyManagerPolicy: lo.ToPtr(p.KubeletConfig.TopologyManagerPolicy),
// AllowedUnsafeSysctls: p.KubeletConfig.AllowedUnsafeSysctls,
// ContainerLogMaxSizeMB: convertContainerLogMaxSizeToMB(p.KubeletConfig.ContainerLogMaxSize),
// ContainerLogMaxFiles: p.KubeletConfig.ContainerLogMaxFiles,
// PodMaxPids: convertPodMaxPids(p.KubeletConfig.PodPidsLimit),
}
}

Expand Down
14 changes: 8 additions & 6 deletions pkg/providers/imagefamily/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ func (r Resolver) Resolve(ctx context.Context, nodeClass *v1alpha2.AKSNodeClass,

logging.FromContext(ctx).Infof("Resolved image %s for instance type %s", imageID, instanceType.Name)

taints := lo.Flatten([][]corev1.Taint{
nodeClaim.Spec.Taints,
nodeClaim.Spec.StartupTaints,
generalTaints := nodeClaim.Spec.Taints
startupTaints := nodeClaim.Spec.StartupTaints
allTaints := lo.Flatten([][]corev1.Taint{
generalTaints,
startupTaints,
})

storageProfile := "ManagedDisks"
Expand All @@ -100,15 +102,15 @@ func (r Resolver) Resolve(ctx context.Context, nodeClass *v1alpha2.AKSNodeClass,
StaticParameters: staticParameters,
ScriptlessCustomData: imageFamily.ScriptlessCustomData(
prepareKubeletConfiguration(instanceType, nodeClaim),
taints,
allTaints,
staticParameters.Labels,
staticParameters.CABundle,
instanceType,
),
CustomScriptsNodeBootstrapping: imageFamily.CustomScriptsNodeBootstrapping(
prepareKubeletConfiguration(instanceType, nodeClaim),
nodeClaim.Spec.Taints,
nodeClaim.Spec.StartupTaints,
generalTaints,
startupTaints,
staticParameters.Labels,
instanceType,
imageDistro,
Expand Down

0 comments on commit 153728a

Please sign in to comment.