Documentation ¶
Index ¶
- Constants
- func AcceleratedNetworkingSupported(sku string) bool
- func CreatePki(extraFQDNs []string, extraIPs []net.IP, clusterDomain string, ...) (*PkiKeyCertPair, *PkiKeyCertPair, *PkiKeyCertPair, *PkiKeyCertPair, ...)
- func CreateSSH(rg io.Reader, s *i18n.Translator) (privateKey *rsa.PrivateKey, publicKeyString string, err error)
- func CreateSaveSSH(username, outputDirectory string, s *i18n.Translator) (privateKey *rsa.PrivateKey, publicKeyString string, err error)
- func EqualError(a, b error) bool
- func GetAzureLocations() []string
- func GetCloudTargetEnv(location string) string
- func GetDCOSMasterAllowedSizes() string
- func GetHomeDir() string
- func GetKubernetesAllowedSizes() string
- func GetSizeMap() string
- func IsFalseBoolPointer(b *bool) bool
- func IsTrueBoolPointer(b *bool) bool
- func JSONMarshal(content interface{}, escape bool) ([]byte, error)
- func JSONMarshalIndent(content interface{}, prefix, indent string, escape bool) ([]byte, error)
- func NormalizeAzureRegion(name string) string
- func PointerToBool(b bool) *bool
- func PointerToInt(i int) *int
- func PointerToString(s string) *string
- func ShellQuote(s string) string
- type FileSaver
- type PkiKeyCertPair
Constants ¶
const ( // ValidityDuration specifies the duration an TLS certificate is valid ValidityDuration = time.Hour * 24 * 365 * 2 // PkiKeySize is the size in bytes of the PKI key PkiKeySize = 4096 )
const (
// SSHKeySize is the size (in bytes) of SSH key to create
SSHKeySize = 4096
)
Variables ¶
This section is empty.
Functions ¶
func AcceleratedNetworkingSupported ¶
AcceleratedNetworkingSupported check if the VmSKU support the Accelerated Networking
func CreatePki ¶
func CreatePki(extraFQDNs []string, extraIPs []net.IP, clusterDomain string, caPair *PkiKeyCertPair, masterCount int) (*PkiKeyCertPair, *PkiKeyCertPair, *PkiKeyCertPair, *PkiKeyCertPair, *PkiKeyCertPair, []*PkiKeyCertPair, error)
CreatePki creates PKI certificates
func CreateSSH ¶
func CreateSSH(rg io.Reader, s *i18n.Translator) (privateKey *rsa.PrivateKey, publicKeyString string, err error)
CreateSSH creates an SSH key pair.
func CreateSaveSSH ¶
func CreateSaveSSH(username, outputDirectory string, s *i18n.Translator) (privateKey *rsa.PrivateKey, publicKeyString string, err error)
CreateSaveSSH generates and stashes an SSH key pair.
func EqualError ¶
EqualError is a nil-safe method which reports whether errors a and b are considered equal. They're equal if both are nil, or both are not nil and a.Error() == b.Error().
func GetAzureLocations ¶
func GetAzureLocations() []string
GetAzureLocations provides all azure regions in prod. Related powershell to refresh this list:
Get-AzureRmLocation | Select-Object -Property Location
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 GetDCOSMasterAllowedSizes ¶
func GetDCOSMasterAllowedSizes() string
GetDCOSMasterAllowedSizes returns the master allowed sizes
func GetKubernetesAllowedSizes ¶
func GetKubernetesAllowedSizes() string
GetKubernetesAllowedSizes returns the allowed sizes for Kubernetes agent
func IsFalseBoolPointer ¶
IsFalseBoolPointer is a simple boolean helper function for boolean pointers
func IsTrueBoolPointer ¶
IsTrueBoolPointer is a simple boolean helper function for boolean pointers
func JSONMarshal ¶
JSONMarshal marshals JSON w/ optional SetEscapeHTML
func JSONMarshalIndent ¶
JSONMarshalIndent marshals formatted JSON w/ optional SetEscapeHTML
func NormalizeAzureRegion ¶
NormalizeAzureRegion returns a normalized Azure region with white spaces removed and converted to lower case
func PointerToString ¶
PointerToString returns a pointer to a string
func ShellQuote ¶
ShellQuote returns a string that is enclosed within single quotes. If the string already has single quotes, they will be escaped.
Types ¶
type FileSaver ¶
type FileSaver struct {
Translator *i18n.Translator
}
FileSaver represents the object that save string or byte data to file
type PkiKeyCertPair ¶
PkiKeyCertPair represents an PKI public and private cert pair
func CreatePkiKeyCertPair ¶
func CreatePkiKeyCertPair(commonName string) (*PkiKeyCertPair, error)
CreatePkiKeyCertPair generates a pair of PKI certificate and private key