agent

package
v0.20210331.12 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultVNETCIDR is the default CIDR block for the VNET
	DefaultVNETCIDR = "10.0.0.0/8"
	// DefaultVNETCIDRIPv6 is the default IPv6 CIDR block for the VNET
	DefaultVNETCIDRIPv6 = "2001:1234:5678:9a00::/56"
	// 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"
	// NetworkPluginCilium is the string expression for cilium network plugin config option
	NetworkPluginCilium = NetworkPolicyCilium
	// NetworkPolicyAntrea is the string expression for antrea network policy config option
	NetworkPolicyAntrea = "antrea"
	// 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 plugin
	NetworkPluginFlannel = "flannel"
	// DefaultGeneratorCode specifies the source generator of the cluster template.
	DefaultGeneratorCode = "agentbaker"
	// 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

	// BasicLoadBalancerSku is the string const for Azure Basic Load Balancer
	BasicLoadBalancerSku = "Basic"
	// StandardLoadBalancerSku is the string const for Azure Standard Load Balancer
	StandardLoadBalancerSku = "Standard"
)
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 (
	// AADPodIdentityAddonName is the name of the aad-pod-identity addon deployment
	AADPodIdentityAddonName = "aad-pod-identity"
	// ACIConnectorAddonName is the name of the aci-connector addon deployment
	ACIConnectorAddonName = "aci-connector"
	// AppGwIngressAddonName appgw addon
	AppGwIngressAddonName = "appgw-ingress"
)
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

View Source
var TranslatedKubeletConfigFlags map[string]bool = map[string]bool{
	"--address":                           true,
	"--anonymous-auth":                    true,
	"--client-ca-file":                    true,
	"--authentication-token-webhook":      true,
	"--authorization-mode":                true,
	"--pod-manifest-path":                 true,
	"--cluster-dns":                       true,
	"--cgroups-per-qos":                   true,
	"--tls-cert-file":                     true,
	"--tls-private-key-file":              true,
	"--tls-cipher-suites":                 true,
	"--cluster-domain":                    true,
	"--max-pods":                          true,
	"--eviction-hard":                     true,
	"--node-status-update-frequency":      true,
	"--image-gc-high-threshold":           true,
	"--image-gc-low-threshold":            true,
	"--event-qps":                         true,
	"--pod-max-pids":                      true,
	"--enforce-node-allocatable":          true,
	"--streaming-connection-idle-timeout": true,
	"--rotate-certificates":               true,
	"--read-only-port":                    true,
	"--feature-gates":                     true,
	"--protect-kernel-defaults":           true,
	"--resolv-conf":                       true,
	"--system-reserved":                   true,
	"--kube-reserved":                     true,
	"--cpu-manager-policy":                true,
	"--cpu-cfs-quota":                     true,
	"--cpu-cfs-quota-period":              true,
	"--topology-manager-policy":           true,
	"--allowed-unsafe-sysctls":            true,
	"--fail-swap-on":                      true,
	"--container-log-max-size":            true,
	"--container-log-max-files":           true,
}

TranslatedKubeletConfigFlags represents kubelet flags that will be translated into config file (if kubelet config file is enabled)

Functions

func GetCloudTargetEnv

func GetCloudTargetEnv(location string) string

GetCloudTargetEnv determines and returns whether the region is a sovereign cloud which have their own data compliance regulations (China/Germany/USGov) or standard Azure public cloud

func GetKubeletConfigFileContent added in v0.0.1234

func GetKubeletConfigFileContent(kc map[string]string, customKc *datamodel.CustomKubeletConfig) string

GetKubeletConfigFileContent converts kubelet flags we set to a file, and return the json content

func GetOrderedKubeletConfigFlagString added in v0.0.1234

func GetOrderedKubeletConfigFlagString(k *datamodel.KubernetesConfig, cs *datamodel.ContainerService, profile *datamodel.AgentPoolProfile, kubeletConfigFileToggleEnabled bool) string

GetOrderedKubeletConfigFlagString returns an ordered string of key/val pairs copied from AKS-Engine and filter out flags that already translated to config file

func GetTLSBootstrapTokenForKubeConfig added in v0.0.1234

func GetTLSBootstrapTokenForKubeConfig(tlsBootstrapToken *string) string

GetTLSBootstrapTokenForKubeConfig returns the TLS bootstrap token for kubeconfig usage. It returns empty string if TLS bootstrap token is not enabled.

ref: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/#kubelet-configuration

func IsKubeletClientTLSBootstrappingEnabled added in v0.0.1234

func IsKubeletClientTLSBootstrappingEnabled(tlsBootstrapToken *string) bool

IsKubeletClientTLSBootstrappingEnabled get if kubelet client TLS bootstrapping is enabled

func IsKubeletConfigFileEnabled added in v0.0.1234

func IsKubeletConfigFileEnabled(cs *datamodel.ContainerService, profile *datamodel.AgentPoolProfile, kubeletConfigFileToggleEnabled bool) bool

IsKubeletConfigFileEnabled get if dynamic kubelet is supported in AKS and toggle is on

func IsKubernetesVersionGe

func IsKubernetesVersionGe(actualVersion, version string) bool

IsKubernetesVersionGe returns true if actualVersion is greater than or equal to version

func IsSgxEnabledSKU

func IsSgxEnabledSKU(vmSize string) bool

IsSgxEnabledSKU determines if an VM SKU has SGX driver support

func ParseCSEMessage added in v0.0.1234

func ParseCSEMessage(message string) (*datamodel.CSEStatus, *datamodel.CSEStatusParsingError)

ParseCSEMessage parses the raw CSE output

Types

type TemplateGenerator

type TemplateGenerator struct{}

TemplateGenerator represents the object that performs the template generation.

func InitializeTemplateGenerator

func InitializeTemplateGenerator() *TemplateGenerator

InitializeTemplateGenerator creates a new template generator object

func (*TemplateGenerator) GetNodeBootstrappingCmd

func (t *TemplateGenerator) GetNodeBootstrappingCmd(config *datamodel.NodeBootstrappingConfiguration) string

GetNodeBootstrappingCmd get node bootstrapping cmd

func (*TemplateGenerator) GetNodeBootstrappingPayload

func (t *TemplateGenerator) GetNodeBootstrappingPayload(config *datamodel.NodeBootstrappingConfiguration) string

GetNodeBootstrappingPayload get node bootstrapping data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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