<commit_before>package acsengine

import (
	"strconv"

	"github.com/Azure/acs-engine/pkg/api"
	"github.com/Azure/acs-engine/pkg/api/common"
	"github.com/Azure/acs-engine/pkg/helpers"
)

func setAddonsConfig(cs *api.ContainerService) {
	o := cs.Properties.OrchestratorProfile
	defaultTillerAddonsConfig := api.KubernetesAddon{
		Name:    DefaultTillerAddonName,
		Enabled: helpers.PointerToBool(api.DefaultTillerAddonEnabled),
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultTillerAddonName,
				CPURequests:    "50m",
				MemoryRequests: "150Mi",
				CPULimits:      "50m",
				MemoryLimits:   "150Mi",
			},
		},
		Config: map[string]string{
			"max-history": strconv.Itoa(DefaultTillerMaxHistory),
		},
	}

	defaultACIConnectorAddonsConfig := api.KubernetesAddon{
		Name:    DefaultACIConnectorAddonName,
		Enabled: helpers.PointerToBool(api.DefaultACIConnectorAddonEnabled),
		Config: map[string]string{
			"region":   "westus",
			"nodeName": "aci-connector",
			"os":       "Linux",
			"taint":    "azure.com/aci",
		},
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultACIConnectorAddonName,
				CPURequests:    "50m",
				MemoryRequests: "150Mi",
				CPULimits:      "50m",
				MemoryLimits:   "150Mi",
			},
		},
	}

	defaultClusterAutoscalerAddonsConfig := api.KubernetesAddon{
		Name:    DefaultClusterAutoscalerAddonName,
		Enabled: helpers.PointerToBool(api.DefaultClusterAutoscalerAddonEnabled),
		Config: map[string]string{
			"minNodes": "1",
			"maxNodes": "5",
		},
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultClusterAutoscalerAddonName,
				CPURequests:    "100m",
				MemoryRequests: "300Mi",
				CPULimits:      "100m",
				MemoryLimits:   "300Mi",
			},
		},
	}

	defaultBlobfuseFlexVolumeAddonsConfig := api.KubernetesAddon{
		Name:    DefaultBlobfuseFlexVolumeAddonName,
		Enabled: helpers.PointerToBool(api.DefaultBlobfuseFlexVolumeAddonEnabled),
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultBlobfuseFlexVolumeAddonName,
				CPURequests:    "50m",
				MemoryRequests: "10Mi",
				CPULimits:      "50m",
				MemoryLimits:   "10Mi",
			},
		},
	}

	defaultSMBFlexVolumeAddonsConfig := api.KubernetesAddon{
		Name:    DefaultSMBFlexVolumeAddonName,
		Enabled: helpers.PointerToBool(api.DefaultSMBFlexVolumeAddonEnabled),
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultSMBFlexVolumeAddonName,
				CPURequests:    "50m",
				MemoryRequests: "10Mi",
				CPULimits:      "50m",
				MemoryLimits:   "10Mi",
			},<commit_msg>only enable blobfuse drivers on k8s 1.8 and above (#3648)<commit_after>package acsengine

import (
	"strconv"

	"github.com/Azure/acs-engine/pkg/api"
	"github.com/Azure/acs-engine/pkg/api/common"
	"github.com/Azure/acs-engine/pkg/helpers"
)

func setAddonsConfig(cs *api.ContainerService) {
	o := cs.Properties.OrchestratorProfile
	defaultTillerAddonsConfig := api.KubernetesAddon{
		Name:    DefaultTillerAddonName,
		Enabled: helpers.PointerToBool(api.DefaultTillerAddonEnabled),
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultTillerAddonName,
				CPURequests:    "50m",
				MemoryRequests: "150Mi",
				CPULimits:      "50m",
				MemoryLimits:   "150Mi",
			},
		},
		Config: map[string]string{
			"max-history": strconv.Itoa(DefaultTillerMaxHistory),
		},
	}

	defaultACIConnectorAddonsConfig := api.KubernetesAddon{
		Name:    DefaultACIConnectorAddonName,
		Enabled: helpers.PointerToBool(api.DefaultACIConnectorAddonEnabled),
		Config: map[string]string{
			"region":   "westus",
			"nodeName": "aci-connector",
			"os":       "Linux",
			"taint":    "azure.com/aci",
		},
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultACIConnectorAddonName,
				CPURequests:    "50m",
				MemoryRequests: "150Mi",
				CPULimits:      "50m",
				MemoryLimits:   "150Mi",
			},
		},
	}

	defaultClusterAutoscalerAddonsConfig := api.KubernetesAddon{
		Name:    DefaultClusterAutoscalerAddonName,
		Enabled: helpers.PointerToBool(api.DefaultClusterAutoscalerAddonEnabled),
		Config: map[string]string{
			"minNodes": "1",
			"maxNodes": "5",
		},
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultClusterAutoscalerAddonName,
				CPURequests:    "100m",
				MemoryRequests: "300Mi",
				CPULimits:      "100m",
				MemoryLimits:   "300Mi",
			},
		},
	}

	defaultBlobfuseFlexVolumeAddonsConfig := api.KubernetesAddon{
		Name:    DefaultBlobfuseFlexVolumeAddonName,
		Enabled: helpers.PointerToBool(common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.8.0") && api.DefaultBlobfuseFlexVolumeAddonEnabled),
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultBlobfuseFlexVolumeAddonName,
				CPURequests:    "50m",
				MemoryRequests: "10Mi",
				CPULimits:      "50m",
				MemoryLimits:   "10Mi",
			},
		},
	}

	defaultSMBFlexVolumeAddonsConfig := api.KubernetesAddon{
		Name:    DefaultSMBFlexVolumeAddonName,
		Enabled: helpers.PointerToBool(common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.8.0") && api.DefaultSMBFlexVolumeAddonEnabled),
		Containers: []api.KubernetesContainerSpec{
			{
				Name:           DefaultSMBFlexVolumeAddonName,
				CPURequests:    "50m",
				MemoryRequests: "10Mi",
				CPULimits:      "50m",
				MemoryLimits:   "10Mi",
			},
{'fraction_non_alphanumeric': 0.11991034740381024, 'fraction_numerical': 0.021105715353007096, 'mean_word_length': 3.7940913160250673, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6779386', 'n_tokens_mistral': 2223, 'n_tokens_neox': 1861, 'n_words': 257}