engine

package
v0.31.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package engine takes an AKS cluster model and generates the corresponding template Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.

Code generated by go-bindata. DO NOT EDIT. @generated sources: ../../parts/agentoutputs.t ../../parts/agentparams.t ../../parts/dcos/bstrap/bootstrapcustomdata.yml ../../parts/dcos/bstrap/bootstrapparams.t ../../parts/dcos/bstrap/bootstrapprovision.sh ../../parts/dcos/bstrap/bootstrapresources.t ../../parts/dcos/bstrap/bootstrapvars.t ../../parts/dcos/bstrap/dcos1.11.0.customdata.t ../../parts/dcos/bstrap/dcos1.11.2.customdata.t ../../parts/dcos/bstrap/dcosbase.t ../../parts/dcos/bstrap/dcosmasterresources.t ../../parts/dcos/bstrap/dcosmastervars.t ../../parts/dcos/bstrap/dcosprovision.sh ../../parts/dcos/dcosWindowsAgentResourcesVmas.t ../../parts/dcos/dcosWindowsAgentResourcesVmss.t ../../parts/dcos/dcosWindowsProvision.ps1 ../../parts/dcos/dcosagentresourcesvmas.t ../../parts/dcos/dcosagentresourcesvmss.t ../../parts/dcos/dcosagentvars.t ../../parts/dcos/dcosbase.t ../../parts/dcos/dcoscustomdata110.t ../../parts/dcos/dcoscustomdata184.t ../../parts/dcos/dcoscustomdata187.t ../../parts/dcos/dcoscustomdata188.t ../../parts/dcos/dcoscustomdata190.t ../../parts/dcos/dcoscustomdata198.t ../../parts/dcos/dcosmasterresources.t ../../parts/dcos/dcosmastervars.t ../../parts/dcos/dcosparams.t ../../parts/dcos/dcosprovision.sh ../../parts/dcos/dcosprovisionsource.sh ../../parts/iaasoutputs.t ../../parts/k8s/addons/1.10/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/1.10/kubernetesmasteraddons-kube-dns-deployment.yaml ../../parts/k8s/addons/1.11/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/1.6/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/1.6/kubernetesmasteraddons-kubernetes-dashboard-deployment.yaml ../../parts/k8s/addons/1.7/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/1.7/kubernetesmasteraddons-kube-dns-deployment.yaml ../../parts/k8s/addons/1.7/kubernetesmasteraddons-kubernetes-dashboard-deployment.yaml ../../parts/k8s/addons/1.8/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/1.8/kubernetesmasteraddons-kube-dns-deployment.yaml ../../parts/k8s/addons/1.8/kubernetesmasteraddons-kubernetes-dashboard-deployment.yaml ../../parts/k8s/addons/1.9/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/1.9/kubernetesmasteraddons-kube-dns-deployment.yaml ../../parts/k8s/addons/coredns.yaml ../../parts/k8s/addons/kubernetesmaster-audit-policy.yaml ../../parts/k8s/addons/kubernetesmasteraddons-aad-default-admin-group-rbac.yaml ../../parts/k8s/addons/kubernetesmasteraddons-azure-cloud-provider-deployment.yaml ../../parts/k8s/addons/kubernetesmasteraddons-azure-npm-daemonset.yaml ../../parts/k8s/addons/kubernetesmasteraddons-calico-daemonset.yaml ../../parts/k8s/addons/kubernetesmasteraddons-cilium-daemonset.yaml ../../parts/k8s/addons/kubernetesmasteraddons-elb-svc.yaml ../../parts/k8s/addons/kubernetesmasteraddons-flannel-daemonset.yaml ../../parts/k8s/addons/kubernetesmasteraddons-kube-dns-deployment.yaml ../../parts/k8s/addons/kubernetesmasteraddons-kube-proxy-daemonset.yaml ../../parts/k8s/addons/kubernetesmasteraddons-managed-azure-storage-classes.yaml ../../parts/k8s/addons/kubernetesmasteraddons-unmanaged-azure-storage-classes.yaml ../../parts/k8s/artifacts/kubernetesazurekms.service ../../parts/k8s/artifacts/kuberneteskubelet.service ../../parts/k8s/containeraddons/1.6/kubernetesmasteraddons-heapster-deployment.yaml ../../parts/k8s/containeraddons/1.7/kubernetesmasteraddons-heapster-deployment.yaml ../../parts/k8s/containeraddons/1.8/kubernetesmasteraddons-heapster-deployment.yaml ../../parts/k8s/containeraddons/azure-cni-networkmonitor.yaml ../../parts/k8s/containeraddons/dns-autoscaler.yaml ../../parts/k8s/containeraddons/ip-masq-agent.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-aad-pod-identity-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-aci-connector-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-blobfuse-flexvolume-installer.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-cluster-autoscaler-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-heapster-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-keyvault-flexvolume-installer.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-kube-rescheduler-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-kubernetes-dashboard-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-metrics-server-deployment.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-nvidia-device-plugin-daemonset.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-omsagent-daemonset.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-smb-flexvolume-installer.yaml ../../parts/k8s/containeraddons/kubernetesmasteraddons-tiller-deployment.yaml ../../parts/k8s/health-monitor.sh ../../parts/k8s/kubeconfig.json ../../parts/k8s/kubernetes_mountetcd.sh ../../parts/k8s/kubernetesagentcustomdata.yml ../../parts/k8s/kubernetesagentresourcesvmas.t ../../parts/k8s/kubernetesagentresourcesvmss.t ../../parts/k8s/kubernetesagentvars.t ../../parts/k8s/kubernetesbase.t ../../parts/k8s/kubernetesconfigs.sh ../../parts/k8s/kubernetescustomscript.sh ../../parts/k8s/kubernetesinstalls.sh ../../parts/k8s/kubernetesjumpboxcustomdata.yml ../../parts/k8s/kubernetesmastercustomdata.yml ../../parts/k8s/kubernetesmastergenerateproxycertscript.sh ../../parts/k8s/kubernetesmasterresources.t ../../parts/k8s/kubernetesmasterresourcesvmss.t ../../parts/k8s/kubernetesmastervars.t ../../parts/k8s/kubernetesparams.t ../../parts/k8s/kubernetesprovisionsource.sh ../../parts/k8s/kuberneteswinagentresourcesvmas.t ../../parts/k8s/kuberneteswinagentresourcesvmss.t ../../parts/k8s/kuberneteswindowsfunctions.ps1 ../../parts/k8s/kuberneteswindowssetup.ps1 ../../parts/k8s/manifests/kubernetesmaster-cloud-controller-manager.yaml ../../parts/k8s/manifests/kubernetesmaster-kube-addon-manager.yaml ../../parts/k8s/manifests/kubernetesmaster-kube-apiserver.yaml ../../parts/k8s/manifests/kubernetesmaster-kube-controller-manager.yaml ../../parts/k8s/manifests/kubernetesmaster-kube-scheduler.yaml ../../parts/k8s/manifests/kubernetesmaster-pod-security-policy.yaml ../../parts/k8s/setup-custom-search-domains.sh ../../parts/k8s/sshd_config ../../parts/k8s/windowsazurecnifunc.ps1 ../../parts/k8s/windowscnifunc.ps1 ../../parts/k8s/windowsconfigfunc.ps1 ../../parts/k8s/windowsinstallopensshfunc.ps1 ../../parts/k8s/windowskubeletfunc.ps1 ../../parts/masteroutputs.t ../../parts/masterparams.t ../../parts/swarm/Install-ContainerHost-And-Join-Swarm.ps1 ../../parts/swarm/Join-SwarmMode-cluster.ps1 ../../parts/swarm/configure-swarm-cluster.sh ../../parts/swarm/configure-swarmmode-cluster.sh ../../parts/swarm/swarmagentresourcesvmas.t ../../parts/swarm/swarmagentresourcesvmss.t ../../parts/swarm/swarmagentvars.t ../../parts/swarm/swarmbase.t ../../parts/swarm/swarmmasterresources.t ../../parts/swarm/swarmmastervars.t ../../parts/swarm/swarmparams.t ../../parts/swarm/swarmwinagentresourcesvmas.t ../../parts/swarm/swarmwinagentresourcesvmss.t ../../parts/windowsparams.t

Index

Constants

View Source
const (
	// DefaultVNETCIDR is the default CIDR block for the VNET
	DefaultVNETCIDR = "10.0.0.0/8"
	// DefaultInternalLbStaticIPOffset specifies the offset of the internal LoadBalancer's IP
	// address relative to the first consecutive Kubernetes static IP
	DefaultInternalLbStaticIPOffset = 10
	// NetworkPolicyNone is the string expression for the deprecated NetworkPolicy usage pattern "none"
	NetworkPolicyNone = "none"
	// NetworkPolicyCalico is the string expression for calico network policy config option
	NetworkPolicyCalico = "calico"
	// NetworkPolicyCilium is the string expression for cilium network policy config option
	NetworkPolicyCilium = "cilium"
	// NetworkPolicyAzure is the string expression for Azure CNI network policy manager
	NetworkPolicyAzure = "azure"
	// NetworkPluginAzure is the string expression for Azure CNI plugin
	NetworkPluginAzure = "azure"
	// NetworkPluginKubenet is the string expression for kubenet network plugin
	NetworkPluginKubenet = "kubenet"
	// NetworkPluginFlannel is the string expression for flannel network policy config option
	NetworkPluginFlannel = "flannel"
	// DefaultKubeHeapsterDeploymentAddonName is the name of the kube-heapster-deployment addon
	DefaultKubeHeapsterDeploymentAddonName = "kube-heapster-deployment"
	// DefaultKubeDNSDeploymentAddonName is the name of the kube-dns-deployment addon
	DefaultKubeDNSDeploymentAddonName = "kube-dns-deployment"
	// DefaultCoreDNSAddonName is the name of the coredns addon
	DefaultCoreDNSAddonName = "coredns"
	// DefaultDNSAutoscalerAddonName is the name of the coredns addon
	DefaultDNSAutoscalerAddonName = "dns-autoscaler"
	// DefaultKubeProxyAddonName is the name of the kube-proxy config addon
	DefaultKubeProxyAddonName = "kube-proxy-daemonset"
	// DefaultAzureStorageClassesAddonName is the name of the azure storage classes addon
	DefaultAzureStorageClassesAddonName = "azure-storage-classes"
	// DefaultAzureNpmDaemonSetAddonName is the name of the azure npm daemon set addon
	DefaultAzureNpmDaemonSetAddonName = "azure-npm-daemonset"
	// DefaultCalicoDaemonSetAddonName is the name of calico daemonset addon
	DefaultCalicoDaemonSetAddonName = "calico-daemonset"
	// DefaultCiliumDaemonSetAddonName is the name of cilium daemonset addon
	DefaultCiliumDaemonSetAddonName = "cilium-daemonset"
	// DefaultFlannelDaemonSetAddonName is the name of flannel plugin daemonset addon
	DefaultFlannelDaemonSetAddonName = "flannel-daemonset"
	// DefaultAADAdminGroupRBACAddonName is the name of the default admin group RBAC addon
	DefaultAADAdminGroupRBACAddonName = "aad-default-admin-group-rbac"
	// DefaultAzureCloudProviderDeploymentAddonName is the name of the azure cloud provider deployment addon
	DefaultAzureCloudProviderDeploymentAddonName = "azure-cloud-provider-deployment"
	// DefaultAzureCNINetworkMonitorAddonName is the name of the azure cni network monitor addon
	DefaultAzureCNINetworkMonitorAddonName = "azure-cni-networkmonitor"
	// DefaultAuditPolicyAddonName is the name of the audit policy addon
	DefaultAuditPolicyAddonName = "audit-policy"
	// DefaultTillerAddonName is the name of the tiller addon deployment
	DefaultTillerAddonName = "tiller"
	// DefaultAADPodIdentityAddonName is the name of the aad-pod-identity addon deployment
	DefaultAADPodIdentityAddonName = "aad-pod-identity"
	// DefaultACIConnectorAddonName is the name of the aci-connector addon deployment
	DefaultACIConnectorAddonName = "aci-connector"
	// DefaultDashboardAddonName is the name of the kubernetes-dashboard addon deployment
	DefaultDashboardAddonName = "kubernetes-dashboard"
	// DefaultClusterAutoscalerAddonName is the name of the autoscaler addon deployment
	DefaultClusterAutoscalerAddonName = "cluster-autoscaler"
	// DefaultBlobfuseFlexVolumeAddonName is the name of the blobfuse flexvolume addon
	DefaultBlobfuseFlexVolumeAddonName = "blobfuse-flexvolume"
	// DefaultSMBFlexVolumeAddonName is the name of the smb flexvolume addon
	DefaultSMBFlexVolumeAddonName = "smb-flexvolume"
	// DefaultKeyVaultFlexVolumeAddonName is the name of the keyvault flexvolume addon deployment
	DefaultKeyVaultFlexVolumeAddonName = "keyvault-flexvolume"
	// DefaultELBSVCAddonName is the name of the elb service addon deployment
	DefaultELBSVCAddonName = "elb-svc"
	// DefaultGeneratorCode specifies the source generator of the cluster template.
	DefaultGeneratorCode = "aksengine"
	// DefaultReschedulerAddonName is the name of the rescheduler addon deployment
	DefaultReschedulerAddonName = "rescheduler"
	// DefaultHeapsterAddonName is the name of the heapster addon deployment
	DefaultHeapsterAddonName = "heapster"
	// DefaultMetricsServerAddonName is the name of the kubernetes Metrics server addon deployment
	DefaultMetricsServerAddonName = "metrics-server"
	// NVIDIADevicePluginAddonName is the name of the kubernetes NVIDIA Device Plugin daemon set
	NVIDIADevicePluginAddonName = "nvidia-device-plugin"
	// ContainerMonitoringAddonName is the name of the kubernetes Container Monitoring addon deployment
	ContainerMonitoringAddonName = "container-monitoring"
	// AzureCNINetworkMonitoringAddonName is the name of the Azure CNI networkmonitor addon
	AzureCNINetworkMonitoringAddonName = "azure-cni-networkmonitor"
	// AzureNetworkPolicyAddonName is the name of the Azure CNI networkmonitor addon
	AzureNetworkPolicyAddonName = "azure-npm-daemonset"
	// IPMASQAgentAddonName is the name of the ip masq agent addon
	IPMASQAgentAddonName = "ip-masq-agent"
	// DefaultKubernetesKubeletMaxPods is the max pods per kubelet
	DefaultKubernetesKubeletMaxPods = 110
	// DefaultMasterEtcdServerPort is the default etcd server port for Kubernetes master nodes
	DefaultMasterEtcdServerPort = 2380
	// DefaultMasterEtcdClientPort is the default etcd client port for Kubernetes master nodes
	DefaultMasterEtcdClientPort = 2379
)
View Source
const (
	//DefaultExtensionsRootURL  Root URL for extensions
	DefaultExtensionsRootURL = "https://raw.githubusercontent.com/Azure/aks-engine/master/"
	// DefaultDockerEngineRepo for grabbing docker engine packages
	DefaultDockerEngineRepo = "https://download.docker.com/linux/ubuntu"
	// DefaultDockerComposeURL for grabbing docker images
	DefaultDockerComposeURL = "https://github.com/docker/compose/releases/download"
)
View Source
const (
	//DefaultConfigurationScriptRootURL  Root URL for configuration script (used for script extension on RHEL)
	DefaultConfigurationScriptRootURL = "https://raw.githubusercontent.com/Azure/aks-engine/master/parts/"
)

Variables

This section is empty.

Functions

func Asset added in v0.31.0

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir added in v0.31.0

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo added in v0.31.0

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames added in v0.31.0

func AssetNames() []string

AssetNames returns the names of the assets.

func GenerateKubeConfig

func GenerateKubeConfig(properties *api.Properties, location string) (string, error)

GenerateKubeConfig returns a JSON string representing the KubeConfig

func GetTenantID

func GetTenantID(resourceManagerEndpoint string, subscriptionID string) (string, error)

GetTenantID figures out the AAD tenant ID of the subscription by making an unauthenticated request to the Get Subscription Details endpoint and parses the value from WWW-Authenticate header. TODO this should probably to to the armhelpers library

func MustAsset added in v0.31.0

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset added in v0.31.0

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets added in v0.31.0

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type ArtifactWriter

type ArtifactWriter struct {
	Translator *i18n.Translator
}

ArtifactWriter represents the object that writes artifacts

func (*ArtifactWriter) WriteTLSArtifacts

func (w *ArtifactWriter) WriteTLSArtifacts(containerService *api.ContainerService, apiVersion, template, parameters, artifactsDir string, certsGenerated bool, parametersOnly bool) error

WriteTLSArtifacts saves TLS certificates and keys to the server filesystem

type AzureEndpointConfig

type AzureEndpointConfig struct {
	ResourceManagerVMDNSSuffix string
}

AzureEndpointConfig describes an Azure endpoint

type AzureOSImageConfig

type AzureOSImageConfig struct {
	ImageOffer     string
	ImageSku       string
	ImagePublisher string
	ImageVersion   string
}

AzureOSImageConfig describes an Azure OS image

type Context

type Context struct {
	Translator *i18n.Translator
}

Context represents the object that is passed to the package

type CustomFileReader

type CustomFileReader struct {
	Source io.Reader
	Dest   string
}

CustomFileReader takes represents the source text of a file as an io.Reader and the desired destination to add it to

type DCOSSpecConfig

type DCOSSpecConfig struct {
	DCOS188BootstrapDownloadURL     string
	DCOS190BootstrapDownloadURL     string
	DCOS198BootstrapDownloadURL     string
	DCOS110BootstrapDownloadURL     string
	DCOS111BootstrapDownloadURL     string
	DCOSWindowsBootstrapDownloadURL string
	DcosRepositoryURL               string // For custom install, for example CI, need these three addributes
	DcosClusterPackageListID        string // the id of the package list file
	DcosProviderPackageID           string // the id of the dcos-provider-xxx package
}

DCOSSpecConfig is the configurations of DCOS

type DockerSpecConfig

type DockerSpecConfig struct {
	DockerEngineRepo         string
	DockerComposeDownloadURL string
}

DockerSpecConfig is the configurations of docker

type KeyVaultID

type KeyVaultID struct {
	ID string `json:"id"`
}

KeyVaultID represents a KeyVault instance on Azure

type KeyVaultRef

type KeyVaultRef struct {
	KeyVault      KeyVaultID `json:"keyVault"`
	SecretName    string     `json:"secretName"`
	SecretVersion string     `json:"secretVersion,omitempty"`
}

KeyVaultRef represents a reference to KeyVault instance on Azure

type KubernetesSpecConfig

type KubernetesSpecConfig struct {
	KubernetesImageBase              string
	TillerImageBase                  string
	ACIConnectorImageBase            string
	NVIDIAImageBase                  string
	AzureCNIImageBase                string
	EtcdDownloadURLBase              string
	KubeBinariesSASURLBase           string
	WindowsTelemetryGUID             string
	CNIPluginsDownloadURL            string
	VnetCNILinuxPluginsDownloadURL   string
	VnetCNIWindowsPluginsDownloadURL string
	ContainerdDownloadURLBase        string
}

KubernetesSpecConfig is the kubernetes container images used.

type TemplateGenerator

type TemplateGenerator struct {
	Translator *i18n.Translator
}

TemplateGenerator represents the object that performs the template generation.

func InitializeTemplateGenerator

func InitializeTemplateGenerator(ctx Context) (*TemplateGenerator, error)

InitializeTemplateGenerator creates a new template generator object

func (*TemplateGenerator) GenerateTemplate

func (t *TemplateGenerator) GenerateTemplate(containerService *api.ContainerService, generatorCode string, aksengineVersion string) (templateRaw string, parametersRaw string, err error)

GenerateTemplate generates the template from the API Model

type V20160330ContainerService

type V20160330ContainerService struct {
	api.TypeMeta
	*v20160330.ContainerService
}

V20160330ContainerService is the type we read and write from file needed because the json that is sent to ARM and aks-engine is different from the json that the ACS RP Api gets from ARM

type VlabsContainerService

type VlabsContainerService struct {
	api.TypeMeta
	*vlabs.ContainerService
}

VlabsContainerService is the type we read and write from file needed because the json that is sent to ARM and aks-engine is different from the json that the ACS RP Api gets from ARM

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL