diff --git a/pkg/provider/aci.go b/pkg/provider/aci.go index 7c57b93b..992789c5 100644 --- a/pkg/provider/aci.go +++ b/pkg/provider/aci.go @@ -73,7 +73,7 @@ type ACIProvider struct { resourceManager *manager.ResourceManager containerGroupExtensions []*client2.Extension enabledFeatures *featureflag.FlagIdentifier - ProviderNetwork network.ProviderNetwork + providerNetwork network.ProviderNetwork resourceGroup string region string @@ -196,8 +196,8 @@ func NewACIProvider(ctx context.Context, config string, azConfig auth.Config, az } - if p.ProviderNetwork.VnetResourceGroup == "" { - p.ProviderNetwork.VnetResourceGroup = p.resourceGroup + if p.providerNetwork.VnetResourceGroup == "" { + p.providerNetwork.VnetResourceGroup = p.resourceGroup } // If the log analytics file has been specified, load workspace credentials from the file if logAnalyticsAuthFile := os.Getenv("LOG_ANALYTICS_AUTH_LOCATION"); logAnalyticsAuthFile != "" { @@ -250,11 +250,11 @@ func NewACIProvider(ctx context.Context, config string, azConfig auth.Config, az return nil, err } - if err := p.ProviderNetwork.SetVNETConfig(ctx, &azConfig); err != nil { + if err := p.providerNetwork.SetVNETConfig(ctx, &azConfig); err != nil { return nil, err } - if p.ProviderNetwork.SubnetName != "" { + if p.providerNetwork.SubnetName != "" { // windows containers don't support kube-proxy nor realtime metrics if p.operatingSystem != string(azaci.OperatingSystemTypesWindows) { err = p.setACIExtensions(ctx) @@ -342,7 +342,7 @@ func (p *ACIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error { }) } } - if len(ports) > 0 && p.ProviderNetwork.SubnetName == "" { + if len(ports) > 0 && p.providerNetwork.SubnetName == "" { cg.ContainerGroupPropertiesWrapper.ContainerGroupProperties.IPAddress = &azaci.IPAddress{ Ports: &ports, Type: azaci.ContainerGroupIPAddressTypePublic, @@ -364,7 +364,7 @@ func (p *ACIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error { "CreationTimestamp": &podCreationTimestamp, } - p.ProviderNetwork.AmendVnetResources(ctx, *cg, pod, p.clusterDomain) + p.providerNetwork.AmendVnetResources(ctx, *cg, pod, p.clusterDomain) // windows containers don't support kube-proxy nor realtime metrics if cg.ContainerGroupPropertiesWrapper.ContainerGroupProperties.OsType != azaci.OperatingSystemTypesWindows { diff --git a/pkg/provider/config.go b/pkg/provider/config.go index 7cf3decf..760aacd7 100644 --- a/pkg/provider/config.go +++ b/pkg/provider/config.go @@ -58,7 +58,7 @@ func (p *ACIProvider) loadConfig(r io.Reader) error { // default subnet name if config.SubnetName != "" { - p.ProviderNetwork.SubnetName = config.SubnetName + p.providerNetwork.SubnetName = config.SubnetName } if config.SubnetCIDR != "" { if config.SubnetName == "" {