Documentation ¶
Index ¶
- Constants
- Variables
- func GetCloudTargetEnv(location string) string
- func GetKubeletConfigFileContent(kc map[string]string, customKc *datamodel.CustomKubeletConfig) string
- func GetOrderedKubeletConfigFlagString(k map[string]string, cs *datamodel.ContainerService, ...) string
- func GetTLSBootstrapTokenForKubeConfig(tlsBootstrapToken *string) string
- func IsKubeletClientTLSBootstrappingEnabled(tlsBootstrapToken *string) bool
- func IsKubeletConfigFileEnabled(cs *datamodel.ContainerService, profile *datamodel.AgentPoolProfile, ...) bool
- func IsKubernetesVersionGe(actualVersion, version string) bool
- func IsSgxEnabledSKU(vmSize string) bool
- 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 = 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, "--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 ¶
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
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
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 ¶
IsKubernetesVersionGe returns true if actualVersion is greater than or equal to version.
func IsSgxEnabledSKU ¶
IsSgxEnabledSKU determines if an VM SKU has SGX driver support.
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) GetDistroSigImageConfig(sigConfig datamodel.SIGConfig, region string) (map[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.