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

package key

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


Package Files

error.go key.go


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

    // HealthEndpoint is http path for liveness probe.
    HealthEndpoint = "/healthz"
    // ProbeHost host for liveness probe.
    ProbeHost = ""
    // InitialDelaySeconds is InitialDelaySeconds param in liveness probe config
    InitialDelaySeconds = 60
    // TimeoutSeconds is TimeoutSeconds param in liveness probe config
    TimeoutSeconds = 3
    // PeriodSeconds is PeriodSeconds param in liveness probe config
    PeriodSeconds = 20
    // FailureThreshold is FailureThreshold param in liveness probe config
    FailureThreshold = 4
    // SuccessThreshold is SuccessThreshold param in liveness probe config
    SuccessThreshold = 1

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

    K8SEndpointUpdaterDocker = "quay.io/giantswarm/k8s-endpoint-updater:df982fc73b71e60fc70a7444c068b52441ddb30e"
    K8SKVMDockerImage        = "quay.io/giantswarm/k8s-kvm:d808ee530c434ee1d084b1e2000f184caf5cd283"
    K8SKVMHealthDocker       = "quay.io/giantswarm/k8s-kvm-health:ddf211dfed52086ade32ab8c45e44eb0273319ef"
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 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 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 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 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 11 packages. Updated 2019-02-26. Refresh now. Tools for package owners.