hooks

package
v1.33.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRITypeDocker           = "Docker"
	CRITypeContainerd       = "Containerd"
	NodeGroupDefaultCRIType = CRITypeContainerd
)
View Source
const (
	NodeGroupNameLabel                = "node.deckhouse.io/group"
	LastAppliedNodeTemplateAnnotation = "node-manager.deckhouse.io/last-applied-node-template"
	NodeUnininitalizedTaintKey        = "node.deckhouse.io/uninitialized"
)
View Source
const EpochWindowSize int64 = 4 * 60 * 60 // 4 hours

Variables

View Source
var NumPercentRegex = regexp.MustCompile(`^([0-9]+)%$`)

Functions

func ApplyTemplateMap

func ApplyTemplateMap(actual, template, lastApplied map[string]string) (map[string]string, bool)

ApplyTemplateMap return actual merged with template without excess keys.

func DecodeDataFromSecret

func DecodeDataFromSecret(obj *unstructured.Unstructured) (map[string]interface{}, error)

DecodeDataFromSecret returns data section from Secret. If possible, top level keys are converted from JSON.

func ExcessMapKeys

func ExcessMapKeys(a, b map[string]string) set.Set

ExcessMapKeys returns keys from a without keys from b.

func SemverMajMin

func SemverMajMin(ver *semver.Version) string

SemverMajMin is a Go implementation of this bash snippet:

function semver::majmin() {
  echo "$(echo $1 | cut -d. -f1,2)"
}

func SemverMin

func SemverMin(versions []*semver.Version) *semver.Version

Types

type CsrInfo

type CsrInfo struct {
	Name   string
	Valid  bool
	ErrMsg string
}

type InstanceClassCrdInfo

type InstanceClassCrdInfo struct {
	Name string
	Spec interface{}
}

type MachineDeploymentCrdInfo

type MachineDeploymentCrdInfo struct {
	Name string
	Zone string
}

type NodeGroupCrdInfo

type NodeGroupCrdInfo struct {
	Name            string
	Spec            ngv1.NodeGroupSpec
	ManualRolloutID string
}

type NodeSettings

type NodeSettings struct {
	Name                    string
	NodeType                ngv1.NodeType
	NodeGroup               string
	Annotations             map[string]string
	Labels                  map[string]string
	Taints                  []v1.Taint
	LastAppliedNodeTemplate *NodeSettings
}

type StandbyNodeGroupForValues

type StandbyNodeGroupForValues struct {
	Name          string     `json:"name"`
	Standby       int        `json:"standby"`
	ReserveCPU    string     `json:"reserveCPU"`
	ReserveMemory string     `json:"reserveMemory"`
	Taints        []v1.Taint `json:"taints"`
}

type StandbyNodeGroupInfo

type StandbyNodeGroupInfo struct {
	Name                    string
	NeedStandby             bool
	MaxPerZone              int
	ZonesCount              int
	Standby                 *intstr.IntOrString
	StandbyNotHeldResources ngv1.Resources
	Taints                  []v1.Taint
}

type StandbyNodeInfo

type StandbyNodeInfo struct {
	Group             string
	AllocatableCPU    *resource.Quantity
	AllocatableMemory *resource.Quantity
	IsReady           bool
	IsUnschedulable   bool
}

type StandbyPodInfo

type StandbyPodInfo struct {
	Group   string
	IsReady bool
}

Directories

Path Synopsis
internal
v1
pkg

Jump to

Keyboard shortcuts

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