Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions e2e/node_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,16 @@ func nbcToAKSNodeConfigV1(nbc *datamodel.NodeBootstrappingConfiguration) *aksnod
agent.ValidateAndSetLinuxNodeBootstrappingConfiguration(nbc)

bootstrappingConfig := &aksnodeconfigv1.BootstrappingConfig{
TlsBootstrappingToken: nbc.KubeletClientTLSBootstrapToken,
SecureTlsBootstrappingDeadline: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetDeadline()),
SecureTlsBootstrappingAadResource: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetAADResource()),
SecureTlsBootstrappingUserAssignedIdentityId: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetUserAssignedIdentityID()),
SecureTlsBootstrappingCustomClientDownloadUrl: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetCustomClientDownloadURL()),
TlsBootstrappingToken: nbc.KubeletClientTLSBootstrapToken,
SecureTlsBootstrappingValidateKubeconfigTimeout: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetValidateKubeconfigTimeout()),
SecureTlsBootstrappingGetAccessTokenTimeout: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetGetAccessTokenTimeout()),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming nit: GetGetAccessTokenTimeout the naming looks awkward

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't change that in this PR, I might look at changing in a separate PR

SecureTlsBootstrappingGetInstanceDataTimeout: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetGetInstanceDataTimeout()),
SecureTlsBootstrappingGetNonceTimeout: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetGetNonceTimeout()),
SecureTlsBootstrappingGetAttestedDataTimeout: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetGetAttestedDataTimeout()),
SecureTlsBootstrappingGetCredentialTimeout: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetGetCredentialTimeout()),
SecureTlsBootstrappingAadResource: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetAADResource()),
SecureTlsBootstrappingUserAssignedIdentityId: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetUserAssignedIdentityID()),
SecureTlsBootstrappingCustomClientDownloadUrl: to.Ptr(nbc.SecureTLSBootstrappingConfig.GetCustomClientDownloadURL()),
}
if nbc.SecureTLSBootstrappingConfig.GetEnabled() {
bootstrappingConfig.BootstrappingAuthMethod = aksnodeconfigv1.BootstrappingAuthMethod_BOOTSTRAPPING_AUTH_METHOD_SECURE_TLS_BOOTSTRAPPING
Expand Down
10 changes: 5 additions & 5 deletions e2e/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func Test_Flatcar_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing.T) {
BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.SecureTLSBootstrappingConfig = &datamodel.SecureTLSBootstrappingConfig{
Enabled: true,
Deadline: (10 * time.Second).String(),
GetAccessTokenTimeout: (10 * time.Second).String(),
UserAssignedIdentityID: "invalid", // use an unexpected user-assigned identity ID to force a secure TLS bootstrapping failure
}
},
Expand Down Expand Up @@ -350,7 +350,7 @@ func Test_ACL_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing.T) {
BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.SecureTLSBootstrappingConfig = &datamodel.SecureTLSBootstrappingConfig{
Enabled: true,
Deadline: (10 * time.Second).String(),
GetAccessTokenTimeout: (10 * time.Second).String(),
UserAssignedIdentityID: "invalid", // use an unexpected user-assigned identity ID to force a secure TLS bootstrapping failure
}
},
Expand Down Expand Up @@ -490,7 +490,7 @@ func Test_AzureLinuxV3_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing
BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.SecureTLSBootstrappingConfig = &datamodel.SecureTLSBootstrappingConfig{
Enabled: true,
Deadline: (10 * time.Second).String(),
GetAccessTokenTimeout: (10 * time.Second).String(),
UserAssignedIdentityID: "invalid", // use an unexpected user-assigned identity ID to force a secure TLS bootstrapping failure
}
},
Expand Down Expand Up @@ -2416,7 +2416,7 @@ func Test_Ubuntu2204_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing.T
BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.SecureTLSBootstrappingConfig = &datamodel.SecureTLSBootstrappingConfig{
Enabled: true,
Deadline: (10 * time.Second).String(),
GetAccessTokenTimeout: (10 * time.Second).String(),
UserAssignedIdentityID: "invalid", // use an unexpected user-assigned identity ID to force a secure TLS bootstrapping failure
}
},
Expand All @@ -2436,7 +2436,7 @@ func Test_Ubuntu2404_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing.T
BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.SecureTLSBootstrappingConfig = &datamodel.SecureTLSBootstrappingConfig{
Enabled: true,
Deadline: (10 * time.Second).String(),
GetAccessTokenTimeout: (10 * time.Second).String(),
UserAssignedIdentityID: "invalid", // use an unexpected user-assigned identity ID to force a secure TLS bootstrapping failure
}
},
Expand Down
2 changes: 1 addition & 1 deletion e2e/scenario_win_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func Test_Windows2022_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing.
BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.SecureTLSBootstrappingConfig = &datamodel.SecureTLSBootstrappingConfig{
Enabled: true,
Deadline: (10 * time.Second).String(),
GetAccessTokenTimeout: (10 * time.Second).String(),
UserAssignedIdentityID: "invalid", // use an unexpected user-assigned identity ID to force a secure TLS bootstrapping failure
}
},
Expand Down
Loading