Documentation ¶
Index ¶
- Constants
- Variables
- func GPUNeedsFabricManager(size string) bool
- func GetAKSGPUImageSHA(size string) string
- func GetCloudTargetEnv(location string) string
- func GetDataDir(config *datamodel.NodeBootstrappingConfiguration) string
- func GetGPUDriverVersion(size string) string
- func GetKubeletConfigFileContent(kc map[string]string, customKc *datamodel.CustomKubeletConfig) string
- func GetKubernetesEndpoint(cs *datamodel.ContainerService) string
- func GetOrderedKubeletConfigFlagString(config *datamodel.NodeBootstrappingConfiguration) string
- func GetTLSBootstrapTokenForKubeConfig(tlsBootstrapToken *string) string
- func HasDataDir(config *datamodel.NodeBootstrappingConfiguration) bool
- func IsKubeletConfigFileEnabled(cs *datamodel.ContainerService, profile *datamodel.AgentPoolProfile, ...) bool
- func IsKubeletServingCertificateRotationEnabled(config *datamodel.NodeBootstrappingConfiguration) bool
- func IsKubernetesVersionGe(actualVersion, version string) bool
- func IsSgxEnabledSKU(vmSize string) bool
- func IsTLSBootstrappingEnabledWithHardCodedToken(tlsBootstrapToken *string) bool
- func NewAgentBaker() (*agentBakerImpl, error)
- func ValidateAndSetLinuxNodeBootstrappingConfiguration(config *datamodel.NodeBootstrappingConfiguration)
- type AgentBaker
- type TemplateGenerator
Constants ¶
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" )
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 ¶
var TranslatedKubeletConfigFlags = 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, "--node-status-report-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, "--rotate-server-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, "--serialize-image-pulls": true, }
TranslatedKubeletConfigFlags represents kubelet flags that will be translated into config file
(if kubelet config file is enabled).
Functions ¶
func GPUNeedsFabricManager ¶ added in v0.12345678.1
func GetAKSGPUImageSHA ¶ added in v0.12345678.1
func GetCloudTargetEnv ¶
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 GetDataDir ¶ added in v0.12345678.1
func GetDataDir(config *datamodel.NodeBootstrappingConfiguration) string
func GetGPUDriverVersion ¶ added in v0.12345678.1
NV series GPUs target graphics workloads vs NC which targets compute. they typically use GRID, not CUDA drivers, and will fail to install CUDA drivers. NVv1 seems to run with CUDA, NVv5 requires GRID. NVv3 is untested on AKS, NVv4 is AMD so n/a, and NVv2 no longer seems to exist (?).
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 GetKubernetesEndpoint ¶ added in v0.12345678.1
func GetKubernetesEndpoint(cs *datamodel.ContainerService) string
func GetOrderedKubeletConfigFlagString ¶ added in v0.0.1234
func GetOrderedKubeletConfigFlagString(config *datamodel.NodeBootstrappingConfiguration) 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
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 HasDataDir ¶ added in v0.12345678.1
func HasDataDir(config *datamodel.NodeBootstrappingConfiguration) bool
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 IsKubeletServingCertificateRotationEnabled ¶ added in v0.12345611.0
func IsKubeletServingCertificateRotationEnabled(config *datamodel.NodeBootstrappingConfiguration) bool
func IsKubernetesVersionGe ¶
IsKubernetesVersionGe returns true if actualVersion is greater than or equal to version.
func IsSgxEnabledSKU ¶
IsSgxEnabledSKU determines if an VM SKU has SGX driver support.
func IsTLSBootstrappingEnabledWithHardCodedToken ¶ added in v0.22222.0
IsTLSBootstrappingEnabledWithHardCodedToken returns true if the specified TLS bootstrap token is non-nil, meaning we will use it to perform TLS bootstrapping.
func NewAgentBaker ¶ added in v0.0.1234
func NewAgentBaker() (*agentBakerImpl, error)
func ValidateAndSetLinuxNodeBootstrappingConfiguration ¶ added in v0.12345678.1
func ValidateAndSetLinuxNodeBootstrappingConfiguration(config *datamodel.NodeBootstrappingConfiguration)
ValidateAndSetLinuxNodeBootstrappingConfiguration is exported only for temporary usage in e2e testing of new config.
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, distro datamodel.Distro, envInfo *datamodel.EnvironmentInfo) (*datamodel.SigImageConfig, error) GetDistroSigImageConfig(sigConfig datamodel.SIGConfig, envInfo *datamodel.EnvironmentInfo) (map[datamodel.Distro]datamodel.SigImageConfig, 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.