@@ -841,6 +841,75 @@ func Test_Flatcar_DisableSSH(t *testing.T) {
841841 })
842842}
843843
844+ func Test_Flatcar_NetworkIsolatedCluster_NonAnonymousACR (t * testing.T ) {
845+ RunScenario (t , & Scenario {
846+ Description : "Tests that a node using Flatcar VHD with network isolated cluster enabled" ,
847+ Tags : Tags {
848+ NetworkIsolated : true ,
849+ NonAnonymousACR : true ,
850+ },
851+ Config : Config {
852+ Cluster : ClusterAzureNetworkIsolated ,
853+ VHD : config .VHDFlatcarGen2 ,
854+ BootstrapConfigMutator : func (nbc * datamodel.NodeBootstrappingConfiguration ) {
855+ nbc .OutboundType = datamodel .OutboundTypeBlock
856+ nbc .ContainerService .Properties .SecurityProfile = & datamodel.SecurityProfile {
857+ PrivateEgress : & datamodel.PrivateEgress {
858+ Enabled : true ,
859+ ContainerRegistryServer : fmt .Sprintf ("%s.azurecr.io/aks-managed-repository" , config .PrivateACRNameNotAnon (config .Config .DefaultLocation )),
860+ },
861+ }
862+ nbc .ContainerService .Properties .OrchestratorProfile .KubernetesConfig .UseManagedIdentity = true
863+ nbc .AgentPoolProfile .KubernetesConfig .UseManagedIdentity = true
864+ nbc .K8sComponents .LinuxCredentialProviderURL = fmt .Sprintf (
865+ "https://packages.aks.azure.com/cloud-provider-azure/v%s/binaries/azure-acr-credential-provider-linux-amd64-v%s.tar.gz" ,
866+ nbc .ContainerService .Properties .OrchestratorProfile .OrchestratorVersion ,
867+ nbc .ContainerService .Properties .OrchestratorProfile .OrchestratorVersion )
868+ nbc .KubeletConfig ["--image-credential-provider-config" ] = "/var/lib/kubelet/credential-provider-config.yaml"
869+ nbc .KubeletConfig ["--image-credential-provider-bin-dir" ] = "/var/lib/kubelet/credential-provider"
870+ },
871+ Validator : func (ctx context.Context , s * Scenario ) {
872+ },
873+ },
874+ })
875+ }
876+
877+ func Test_ACL_NetworkIsolatedCluster_NonAnonymousACR (t * testing.T ) {
878+ RunScenario (t , & Scenario {
879+ Description : "Tests that a node using ACL VHD with network isolated cluster enabled" ,
880+ Tags : Tags {
881+ NetworkIsolated : true ,
882+ NonAnonymousACR : true ,
883+ },
884+ Config : Config {
885+ Cluster : ClusterAzureNetworkIsolated ,
886+ VHD : config .VHDACLGen2TL ,
887+ VMConfigMutator : func (vmss * armcompute.VirtualMachineScaleSet ) {
888+ vmss .Properties = addTrustedLaunchToVMSS (vmss .Properties )
889+ },
890+ BootstrapConfigMutator : func (nbc * datamodel.NodeBootstrappingConfiguration ) {
891+ nbc .OutboundType = datamodel .OutboundTypeBlock
892+ nbc .ContainerService .Properties .SecurityProfile = & datamodel.SecurityProfile {
893+ PrivateEgress : & datamodel.PrivateEgress {
894+ Enabled : true ,
895+ ContainerRegistryServer : fmt .Sprintf ("%s.azurecr.io/aks-managed-repository" , config .PrivateACRNameNotAnon (config .Config .DefaultLocation )),
896+ },
897+ }
898+ nbc .ContainerService .Properties .OrchestratorProfile .KubernetesConfig .UseManagedIdentity = true
899+ nbc .AgentPoolProfile .KubernetesConfig .UseManagedIdentity = true
900+ nbc .K8sComponents .LinuxCredentialProviderURL = fmt .Sprintf (
901+ "https://packages.aks.azure.com/cloud-provider-azure/v%s/binaries/azure-acr-credential-provider-linux-amd64-v%s.tar.gz" ,
902+ nbc .ContainerService .Properties .OrchestratorProfile .OrchestratorVersion ,
903+ nbc .ContainerService .Properties .OrchestratorProfile .OrchestratorVersion )
904+ nbc .KubeletConfig ["--image-credential-provider-config" ] = "/var/lib/kubelet/credential-provider-config.yaml"
905+ nbc .KubeletConfig ["--image-credential-provider-bin-dir" ] = "/var/lib/kubelet/credential-provider"
906+ },
907+ Validator : func (ctx context.Context , s * Scenario ) {
908+ },
909+ },
910+ })
911+ }
912+
844913func Test_AzureLinuxV3_NetworkIsolatedCluster_NonAnonymousACR (t * testing.T ) {
845914 RunScenario (t , & Scenario {
846915 Description : "Tests that a node using a AzureLinuxV3 (CgroupV2) VHD can be properly bootstrapped" ,
0 commit comments