Documentation ¶
Index ¶
- Constants
- Variables
- func AWSEnvVarsSet() bool
- func AzureEnvVarsSet() bool
- func CIDRInsideCIDR(cidrA string, cidrB string) bool
- func CIDRInsideCIDRs(cidrA string, cidrs []string) bool
- func CPUCoresFraction(q *resource.Quantity) float32
- func CreateBoundNodeNameTag(nametag, podName string) string
- func CreateClusterResourceGroupName(controllerID string) string
- func CreateClusterResourcePrefix(controllerID string) string
- func CreateEtcHosts(dnsConfigurer *dns.Configurer, ...) ([]byte, error)
- func CreateResourceGroupName(region string) string
- func CreateSecurityGroupName(controllerID, svcName string) string
- func CreateUnboundNodeNameTag(nametag string) string
- func EnvVarsToMap(envs []api.EnvVar) map[string]string
- func ExpandCommandAndArgs(spec api.PodSpec) api.PodSpec
- func FilterKeysWithPrefix(m map[string]string, prefixes []string) map[string]string
- func GCEEnvVarsSet() bool
- func GeneratePodHostname(dnsConfigurer *dns.Configurer, ...) (string, error)
- func GetNameFromString(n string) string
- func GetNamespaceFromString(n string) string
- func GetStructStringField(objs []interface{}, field string) []string
- func GetVersionInfo() api.VersionInfo
- func MakeTempFile(prefix string) (*os.File, func())
- func MakeTempFileName(prefix string) (string, func())
- func MapDiff(spec, status map[string]interface{}) ([]string, []string, []string)
- func MapUserDiff(spec, status map[string]interface{}, differ func(a, b interface{}) bool) ([]string, []string, []string)
- func NextIP(ip net.IP, inc uint) net.IP
- func ParseImageSpec(image string) (string, string, error)
- func PartitionSlice(slice interface{}, isFront func(i int) bool)
- func Retry(timeout time.Duration, f func() error, isRetryable func(error) bool) error
- func SplitNamespaceAndName(n string) (string, string)
- func StringInSlice(s string, slice []string) bool
- func StringMapDifference(a, b map[string]string) map[string]string
- func StringMapIntersection(a, b map[string]string) map[string]string
- func StringMapKeys(a map[string]string) []string
- func StringMapUnion(a, b map[string]string) map[string]string
- func StringMapValues(a map[string]string) []string
- func StringSetKeys(a map[string]struct{}) []string
- func StringSliceDifference(a, b []string) []string
- func StringSliceEqual(a, b []string) bool
- func StringSliceIntersection(a, b []string) []string
- func StringSliceMapKeys(a map[string][]string) []string
- func StringSliceRemove(s []string, r string) []string
- func StringSliceUnion(a, b []string) []string
- func StringSliceUnique(a []string) []string
- func ToGBFloat32(q *resource.Quantity) float32
- func ToGBRoundUp(q *resource.Quantity) int32
- func ToGiBFloat32(q *resource.Quantity) float32
- func ToGiBRoundUp(q *resource.Quantity) int32
- func ToMiBFloat32(q *resource.Quantity) float32
- func ToMiBRoundUp(q *resource.Quantity) int32
- func Version() string
- func WithNamespace(ns, name string) string
- func WrapError(err error, format string, args ...interface{}) error
- type WrappedError
Constants ¶
const (
NamespaceSeparator = '_'
)
Variables ¶
var (
InternalLabelPrefixes = []string{
"kiyot.",
"io.kubernetes",
"kubernetes.io",
}
)
var ( // VERSION is set during the build from "git describe --dirty". VERSION string = "" )
Functions ¶
func AWSEnvVarsSet ¶
func AWSEnvVarsSet() bool
func AzureEnvVarsSet ¶
func AzureEnvVarsSet() bool
func CIDRInsideCIDR ¶
func CIDRInsideCIDRs ¶
func CPUCoresFraction ¶
func CreateBoundNodeNameTag ¶
func CreateEtcHosts ¶
func CreateEtcHosts(dnsConfigurer *dns.Configurer, podName, namespace, specHostname, specSubdomain string, podIPs []string, hostAliases []api.HostAlias, useHostNetwork bool) ([]byte, error)
CreateEtcHosts creates an /etc/hosts file for the pod.
func CreateResourceGroupName ¶
func CreateSecurityGroupName ¶
GCP requires names to follow the regex: [a-z]([-a-z0-9]*[a-z0-9])?
func FilterKeysWithPrefix ¶
If we cared, would be a good place to use a prefix tree...
func GCEEnvVarsSet ¶ added in v1.0.0
func GCEEnvVarsSet() bool
func GeneratePodHostname ¶
func GeneratePodHostname(dnsConfigurer *dns.Configurer, podName, namespace, specHostname, specSubdomain string) (string, error)
func GetNameFromString ¶
func GetNamespaceFromString ¶
func GetStructStringField ¶
func GetVersionInfo ¶
func GetVersionInfo() api.VersionInfo
func MakeTempFile ¶
func MakeTempFileName ¶
func MapUserDiff ¶
func ParseImageSpec ¶
Most registry URLs don't have a leading scheme (e.g. http://). This means that we can't use url.Parse to find the host name from the image's path. We'll use some heuristics to get the server and image path.
func PartitionSlice ¶
take a slice and move all elements that satisfy isFront to the front of the slice. isFront is a function that, given an index of an element, looks up that elemenet in the slice and returns true if the element should be at the front of the slice.
func Retry ¶
This got written after a few Old Rasputins. I highly recommend the beer but not as much as I recommend reading this code with a critical eye
func SplitNamespaceAndName ¶
func StringInSlice ¶
func StringMapKeys ¶
func StringMapValues ¶
func StringSetKeys ¶
func StringSliceDifference ¶
func StringSliceEqual ¶
func StringSliceIntersection ¶
func StringSliceMapKeys ¶
func StringSliceRemove ¶
func StringSliceUnion ¶
func StringSliceUnique ¶
func ToGBFloat32 ¶
func ToGBRoundUp ¶
func ToGiBFloat32 ¶
func ToGiBRoundUp ¶
func ToMiBFloat32 ¶
func ToMiBRoundUp ¶
func WithNamespace ¶
Types ¶
type WrappedError ¶
type WrappedError struct {
// contains filtered or unexported fields
}
func (WrappedError) Cause ¶
func (e WrappedError) Cause() error
func (WrappedError) Error ¶
func (e WrappedError) Error() string
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Useful for 1 allowing the user to update the cloud-init file without restarting the serer.
|
Useful for 1 allowing the user to update the cloud-init file without restarting the serer. |
Package errors implements various utility functions and types around errors.
|
Package errors implements various utility functions and types around errors. |
Package rand provides utilities related to randomization.
|
Package rand provides utilities related to randomization. |
Create a map that will timeout entries and call a callback when an object in the map has expired
|
Create a map that will timeout entries and call a callback when an object in the map has expired |