kvm-operator: github.com/giantswarm/kvm-operator/service/controller/v17patch1/key Index | Files

package key

import "github.com/giantswarm/kvm-operator/service/controller/v17patch1/key"

Index

Package Files

error.go key.go

Constants

const (
    MasterID = "master"
    WorkerID = "worker"
    EtcdPort = 443

    // HealthEndpoint is http path for liveness probe.
    HealthEndpoint = "/healthz"
    // ProbeHost host for liveness probe.
    ProbeHost = "127.0.0.1"
    // LivenessProbeInitialDelaySeconds is LivenessProbeInitialDelaySeconds param in liveness probe config.
    LivenessProbeInitialDelaySeconds = 360
    // ReadinessProbeInitialDelaySeconds is ReadinessProbeInitialDelaySeconds param in readiness probe config.
    ReadinessProbeInitialDelaySeconds = 100
    // TimeoutSeconds is TimeoutSeconds param in liveness probe config.
    TimeoutSeconds = 5
    // PeriodSeconds is PeriodSeconds param in liveness probe config.
    PeriodSeconds = 35
    // FailureThreshold is FailureThreshold param in liveness probe config
    FailureThreshold = 4
    // SuccessThreshold is SuccessThreshold param in liveness probe config
    SuccessThreshold = 1

    // Enable k8s-kvm-health check for k8s api.
    CheckK8sApi = "true"

    // Environment variable names for Downward API use (shutdown-deferrer).
    EnvKeyMyPodName      = "MY_POD_NAME"
    EnvKeyMyPodNamespace = "MY_POD_NAMESPACE"

    FlannelEnvPathPrefix = "/run/flannel"
    CoreosImageDir       = "/var/lib/coreos-kvm-images"
    CoreosVersion        = "1967.5.0"

    K8SEndpointUpdaterDocker = "quay.io/giantswarm/k8s-endpoint-updater:590479a6228c2c143695a268bda5382b52f7ffe1"
    K8SKVMDockerImage        = "quay.io/giantswarm/k8s-kvm:42b9987667392934e3e59247b68bcfd4152b5c2c"
    K8SKVMHealthDocker       = "quay.io/giantswarm/k8s-kvm-health:1b1983e44775736bb0b9d7a08ca0ba888fda6567"
    ShutdownDeferrerDocker   = "quay.io/giantswarm/shutdown-deferrer:b2ffdb2c4ec93fe6bf2d4af8e55c8a4b11253611"

    // DefaultDockerDiskSize defines the space used to partition the docker FS
    // within k8s-kvm. Note we use this only for masters, since the value for the
    // workers can be configured at runtime by the user.
    DefaultDockerDiskSize = "50G"
    // DefaultKubeletDiskSize defines the space used to partition the kubelet FS
    // within k8s-kvm. Note we use this only for masters, since the value for the
    // workers can be configured at runtime by the user.
    DefaultKubeletDiskSize = "5G"
    // DefaultOSDiskSize defines the space used to partition the root FS within
    // k8s-kvm.
    DefaultOSDiskSize = "5G"
)
const (
    AnnotationAPIEndpoint       = "kvm-operator.giantswarm.io/api-endpoint"
    AnnotationEtcdDomain        = "giantswarm.io/etcd-domain"
    AnnotationIp                = "endpoint.kvm.giantswarm.io/ip"
    AnnotationService           = "endpoint.kvm.giantswarm.io/service"
    AnnotationPodDrained        = "endpoint.kvm.giantswarm.io/drained"
    AnnotationPrometheusCluster = "giantswarm.io/prometheus-cluster"
    AnnotationVersionBundle     = "kvm-operator.giantswarm.io/version-bundle"

    LabelApp           = "app"
    LabelCluster       = "giantswarm.io/cluster"
    LabelCustomer      = "customer"
    LabelManagedBy     = "giantswarm.io/managed-by"
    LabelOrganization  = "giantswarm.io/organization"
    LabelVersionBundle = "giantswarm.io/version-bundle"

    LegacyLabelCluster = "cluster"
)
const (
    OperatorName = "kvm-operator"
)
const (
    PodDeletionGracePeriod = 5 * time.Minute
)
const (
    PodWatcherLabel = "kvm-operator.giantswarm.io/pod-watcher"
)
const (
    VersionBundleVersionAnnotation = "giantswarm.io/version-bundle-version"
)

func ArePodContainersTerminated Uses

func ArePodContainersTerminated(pod *corev1.Pod) bool

ArePodContainersTerminated checks ContainerState for all containers present in given pod. When all containers are in Terminated state, true is returned.

func CPUQuantity Uses

func CPUQuantity(n v1alpha1.KVMConfigSpecKVMNode) (resource.Quantity, error)

func ClusterAPIEndpoint Uses

func ClusterAPIEndpoint(customObject v1alpha1.KVMConfig) string

func ClusterAPIEndpointFromPod Uses

func ClusterAPIEndpointFromPod(pod *corev1.Pod) (string, error)

func ClusterCustomer Uses

func ClusterCustomer(customObject v1alpha1.KVMConfig) string

func ClusterEtcdDomain Uses

func ClusterEtcdDomain(customObject v1alpha1.KVMConfig) string

func ClusterID Uses

func ClusterID(customObject v1alpha1.KVMConfig) string

func ClusterIDFromPod Uses

func ClusterIDFromPod(pod *corev1.Pod) string

func ClusterNamespace Uses

func ClusterNamespace(customObject v1alpha1.KVMConfig) string

func ClusterRoleBindingName Uses

func ClusterRoleBindingName(customObject v1alpha1.KVMConfig) string

func ClusterRoleBindingPSPName Uses

func ClusterRoleBindingPSPName(customObject v1alpha1.KVMConfig) string

func ConfigMapName Uses

func ConfigMapName(customObject v1alpha1.KVMConfig, node v1alpha1.ClusterNode, prefix string) string

func DeploymentName Uses

func DeploymentName(prefix string, nodeID string) string

func DockerVolumeSizeFromNode Uses

func DockerVolumeSizeFromNode(node v1alpha1.KVMConfigSpecKVMNode) string

func EtcdPVCName Uses

func EtcdPVCName(clusterID string, vmNumber string) string

func HealthListenAddress Uses

func HealthListenAddress(customObject v1alpha1.KVMConfig) string

func IsDeleted Uses

func IsDeleted(customObject v1alpha1.KVMConfig) bool

func IsMissingAnnotationError Uses

func IsMissingAnnotationError(err error) bool

func IsPodDeleted Uses

func IsPodDeleted(pod *corev1.Pod) bool

func IsPodDrained Uses

func IsPodDrained(pod *corev1.Pod) (bool, error)

IsPodDrained checks whether the pod status indicates it got drained. The pod status is partially reflected by its annotations. Here we check for the annotation that tells us if the pod was already drained or not. In case the pod does not have any annotations an unrecoverable error is returned. Such situations should actually never happen. If it happens, something really bad is going on. This is nothing we can just sort right away in our code.

TODO(xh3b4sd) handle pod status via the runtime object status primitives and not via annotations.

func IsWrongTypeError Uses

func IsWrongTypeError(err error) bool

IsWrongTypeError asserts wrongTypeError.

func KubeletVolumeSizeFromNode Uses

func KubeletVolumeSizeFromNode(node v1alpha1.KVMConfigSpecKVMNode) string

func LivenessPort Uses

func LivenessPort(customObject v1alpha1.KVMConfig) int32

func MasterCount Uses

func MasterCount(customObject v1alpha1.KVMConfig) int

func MasterHostPathVolumeDir Uses

func MasterHostPathVolumeDir(clusterID string, vmNumber string) string

func MemoryQuantityMaster Uses

func MemoryQuantityMaster(n v1alpha1.KVMConfigSpecKVMNode) (resource.Quantity, error)

MemoryQuantity returns a resource.Quantity that represents the memory to be used by the nodes. It adds the memory from the node definition parameter to the additional memory calculated on the node role

func MemoryQuantityWorker Uses

func MemoryQuantityWorker(n v1alpha1.KVMConfigSpecKVMNode) (resource.Quantity, error)

MemoryQuantity returns a resource.Quantity that represents the memory to be used by the nodes. It adds the memory from the node definition parameter to the additional memory calculated on the node role

func NetworkBridgeName Uses

func NetworkBridgeName(customObject v1alpha1.KVMConfig) string

func NetworkDNSBlock Uses

func NetworkDNSBlock(servers []net.IP) string

func NetworkEnvFilePath Uses

func NetworkEnvFilePath(customObject v1alpha1.KVMConfig) string

func NetworkNTPBlock Uses

func NetworkNTPBlock(servers []net.IP) string

func NetworkTapName Uses

func NetworkTapName(customObject v1alpha1.KVMConfig) string

func PVCNames Uses

func PVCNames(customObject v1alpha1.KVMConfig) []string

func PortMappings Uses

func PortMappings(customObject v1alpha1.KVMConfig) []corev1.ServicePort

func ServiceAccountName Uses

func ServiceAccountName(customObject v1alpha1.KVMConfig) string

func ShutdownDeferrerListenAddress Uses

func ShutdownDeferrerListenAddress(customObject v1alpha1.KVMConfig) string

func ShutdownDeferrerListenPort Uses

func ShutdownDeferrerListenPort(customObject v1alpha1.KVMConfig) int

func ShutdownDeferrerPollPath Uses

func ShutdownDeferrerPollPath(customObject v1alpha1.KVMConfig) string

func StorageType Uses

func StorageType(customObject v1alpha1.KVMConfig) string

func ToClusterEndpoint Uses

func ToClusterEndpoint(v interface{}) (string, error)

func ToClusterID Uses

func ToClusterID(v interface{}) (string, error)

func ToClusterStatus Uses

func ToClusterStatus(v interface{}) (v1alpha1.StatusCluster, error)

func ToCustomObject Uses

func ToCustomObject(v interface{}) (v1alpha1.KVMConfig, error)

func ToNodeCount Uses

func ToNodeCount(v interface{}) (int, error)

func ToPod Uses

func ToPod(v interface{}) (*corev1.Pod, error)

func ToVersionBundleVersion Uses

func ToVersionBundleVersion(v interface{}) (string, error)

func VMNumber Uses

func VMNumber(ID int) string

func VersionBundleVersion Uses

func VersionBundleVersion(customObject v1alpha1.KVMConfig) string

func VersionBundleVersionFromPod Uses

func VersionBundleVersionFromPod(pod *corev1.Pod) (string, error)

func WorkerCount Uses

func WorkerCount(customObject v1alpha1.KVMConfig) int

Package key imports 11 packages (graph) and is imported by 12 packages. Updated 2019-02-26. Refresh now. Tools for package owners.