parser

package
v0.20240426.0-lilypan Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

All the helper functions should be hosted by another public repo later. (e.g. agentbaker) Helper functions in this file will be called by bootstrappers to populate nb contract payload.

Index

Constants

View Source
const (
	NetworkPluginKubenet = "kubenet"

	AksCustomCloudName = "akscustom"
	AzureStackCloud    = "AzureStackCloud"
)

Variables

This section is empty.

Functions

func GetDefaultOutboundCommand

func GetDefaultOutboundCommand() string

GetDefaultOutboundCommand returns a default outbound traffic command.

func GetKubeletConfigFlag

func GetKubeletConfigFlag(k map[string]string, cs *datamodel.ContainerService, profile *datamodel.AgentPoolProfile,
	kubeletConfigFileToggleEnabled bool) map[string]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 GetKubeletNodeLabels

func GetKubeletNodeLabels(agentPool *datamodel.AgentPoolProfile) map[string]string

func GetLoadBalancerSKU

GetLoadBalancerSKI returns the LoadBalancerSku enum based on the input string.

func GetNetworkPluginType

func GetNetworkPluginType(networkPlugin string) nbcontractv1.NetworkPlugin

GetNetworkPluginType returns the NetworkPluginType enum based on the input string.

func GetNetworkPolicyType

func GetNetworkPolicyType(networkPolicy string) nbcontractv1.NetworkPolicy

GetNetworkPolicyType returns the NetworkPolicyType enum based on the input string.

func GetOutBoundCmd

func GetOutBoundCmd(nbc *datamodel.NodeBootstrappingConfiguration) string

GetOutBoundCmd returns a proper outbound traffic command based on some cloud and Linux distro configs.

func IsKubernetesVersionGe

func IsKubernetesVersionGe(actualVersion, version string) bool

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

func Parse

func Parse(inputJSON []byte) string

this function will eventually take a pointer to the bootstrap contract struct. it will then template out the variables into the final bootstrap trigger script.

func ValidateAndSetLinuxKubeletFlags

func ValidateAndSetLinuxKubeletFlags(kubeletFlags map[string]string, cs *datamodel.ContainerService, profile *datamodel.AgentPoolProfile)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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