예제 #1
0
        private ManagedClusterAgentPoolProfile GetAgentPoolProfile()
        {
            var defaultAgentPoolProfile = new ManagedClusterAgentPoolProfile(
                name: NodeName ?? "default",
                count: NodeCount,
                vmSize: NodeVmSize,
                osDiskSizeGB: NodeOsDiskSize,
                type: NodeVmSetType ?? "AvailabilitySet",
                vnetSubnetID: NodeVnetSubnetID);

            if (this.IsParameterBound(c => c.NodeOsType))
            {
                defaultAgentPoolProfile.OsType = NodeOsType;
            }
            if (this.IsParameterBound(c => c.NodeMaxPodCount))
            {
                defaultAgentPoolProfile.MaxPods = NodeMaxPodCount;
            }
            if (this.IsParameterBound(c => c.NodeMinCount))
            {
                defaultAgentPoolProfile.MinCount = NodeMinCount;
            }
            if (this.IsParameterBound(c => c.NodeMaxCount))
            {
                defaultAgentPoolProfile.MaxCount = NodeMaxCount;
            }
            if (EnableNodeAutoScaling.IsPresent)
            {
                defaultAgentPoolProfile.EnableAutoScaling = EnableNodeAutoScaling.ToBool();
            }
            //if (EnableNodePublicIp.IsPresent)
            //{
            //    defaultAgentPoolProfile.EnableNodePublicIP = EnableNodePublicIp.ToBool();
            //}
            if (this.IsParameterBound(c => c.NodeScaleSetEvictionPolicy))
            {
                defaultAgentPoolProfile.ScaleSetEvictionPolicy = NodeScaleSetEvictionPolicy;
            }
            if (this.IsParameterBound(c => c.NodeSetPriority))
            {
                defaultAgentPoolProfile.ScaleSetPriority = NodeSetPriority;
            }

            return(defaultAgentPoolProfile);
        }
예제 #2
0
        ///GENMHASH:98DFA3F9E5796918208C02E358977FEC:C0847EA0CDA78F6D91EFD239C70F0FA7
        internal KubernetesClusterAgentPoolImpl(ManagedClusterAgentPoolProfile inner, KubernetesClusterImpl parent) : base(inner, parent)
        {
            string subnetId = inner?.VnetSubnetID;

            subnetName = (subnetId != null) ? ResourceUtils.NameFromResourceId(subnetId) : null;
        }