agent

package
v1.0.1238 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 19 Imported by: 3

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"
	// 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"
)
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"
)

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 map[string]string, 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 AgentBaker added in v0.0.1234

type AgentBaker interface {
	GetNodeBootstrapping(ctx context.Context, config *datamodel.NodeBootstrappingConfiguration) (*datamodel.NodeBootstrapping, error)
	GetLatestSigImageConfig(sigConfig datamodel.SIGConfig, region string, distro datamodel.Distro) (*datamodel.SigImageConfig, error)
}

func NewAgentBaker added in v0.0.1234

func NewAgentBaker() (AgentBaker, error)

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