From bfbf0c2a70d838d5dc76627d84cd8b432142212f Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Wed, 6 Nov 2024 10:07:05 +1300 Subject: [PATCH] fix e2e compile errors --- e2e/template.go | 4 ++-- e2e/validation.go | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/e2e/template.go b/e2e/template.go index b06f2af462b..ad1d0a12766 100644 --- a/e2e/template.go +++ b/e2e/template.go @@ -80,8 +80,8 @@ func nbcToNbcContractV1(nbc *datamodel.NodeBootstrappingConfiguration) *aksnodec KubeletFlags: aksnodeconfigv1.GetKubeletConfigFlag(nbc.KubeletConfig, cs, agentPool, false), KubeletNodeLabels: aksnodeconfigv1.GetKubeletNodeLabels(agentPool), }, - TlsBootstrappingConfig: &aksnodeconfigv1.TLSBootstrappingConfig{ - TlsBootstrappingToken: *nbc.KubeletClientTLSBootstrapToken, + BootstrappingConfig: &aksnodeconfigv1.BootstrappingConfig{ + TlsBootstrappingToken: nbc.KubeletClientTLSBootstrapToken, }, KubernetesCaCert: base64.StdEncoding.EncodeToString([]byte(cs.Properties.CertificateProfile.CaCertificate)), KubeBinaryConfig: &aksnodeconfigv1.KubeBinaryConfig{ diff --git a/e2e/validation.go b/e2e/validation.go index 58d26d48cca..7a4a8464d34 100644 --- a/e2e/validation.go +++ b/e2e/validation.go @@ -170,10 +170,15 @@ func leakedSecretsValidators(scenario *Scenario) []*LiveVMValidator { "bootstrap token": *scenario.Runtime.NBC.KubeletClientTLSBootstrapToken, } } else { + token := scenario.Runtime.AKSNodeConfig.BootstrappingConfig.TlsBootstrappingToken + strToken := "" + if token != nil { + strToken = *token + } secrets = map[string]string{ "client private key": b64Encoded(scenario.Runtime.AKSNodeConfig.KubeletConfig.KubeletClientKey), "service principal secret": b64Encoded(scenario.Runtime.AKSNodeConfig.AuthConfig.ServicePrincipalSecret), - "bootstrap token": scenario.Runtime.AKSNodeConfig.TlsBootstrappingConfig.TlsBootstrappingToken, + "bootstrap token": strToken, } }