model

package
v0.0.0-...-d7e1125 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostFindVolumeClaimTemplateUsedForVolumeMount

func HostFindVolumeClaimTemplateUsedForVolumeMount(host *api.Host, volumeMount *core.VolumeMount) (*api.VolumeClaimTemplate, bool)

HostFindVolumeClaimTemplateUsedForVolumeMount searches for possible VolumeClaimTemplate which was used to build volume, mounted via provided 'volumeMount'. It is not necessarily that VolumeClaimTemplate would be found, because some volumeMounts references volumes that were not created from VolumeClaimTemplate.

func IsConfigurationChangeRequiresReboot

func IsConfigurationChangeRequiresReboot(host *api.Host) bool

IsConfigurationChangeRequiresReboot checks whether configuration changes requires a reboot

func VolumeClaimTemplateApplyResourcesRequestsOnPVC

func VolumeClaimTemplateApplyResourcesRequestsOnPVC(template *api.VolumeClaimTemplate, pvc *core.PersistentVolumeClaim) bool

Types

type EntityType

type EntityType string

EntityType specifies registry entity type

const (
	// StatefulSet describes StatefulSet entity type
	StatefulSet EntityType = "StatefulSet"
	// ConfigMap describes ConfigMap entity type
	ConfigMap EntityType = "ConfigMap"
	// Service describes Service entity type
	Service EntityType = "Service"
	// Secret describes Secret entity type
	Secret EntityType = "Secret"
	// PVC describes PersistentVolumeClaim entity type
	PVC EntityType = "PVC"
	// Comment out PV
	// PV describes PersistentVolume entity type
	//PV EntityType = "PV"
	// PDB describes PodDisruptionBudget entity type
	PDB EntityType = "PDB"
)

Possible entity types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry specifies registry struct

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates new registry

func (*Registry) HasConfigMap

func (r *Registry) HasConfigMap(meta meta.Object) bool

HasConfigMap checks whether registry has specified ConfigMap

func (*Registry) HasPDB

func (r *Registry) HasPDB(meta meta.Object) bool

HasPDB checks whether registry has specified PDB

func (*Registry) HasPVC

func (r *Registry) HasPVC(meta meta.Object) bool

HasPVC checks whether registry has specified PVC

func (*Registry) HasSecret

func (r *Registry) HasSecret(meta meta.Object) bool

HasSecret checks whether registry has specified Secret

func (*Registry) HasService

func (r *Registry) HasService(meta meta.Object) bool

HasService checks whether registry has specified Service

func (*Registry) HasStatefulSet

func (r *Registry) HasStatefulSet(meta meta.Object) bool

HasStatefulSet checks whether registry has specified StatefulSet

func (*Registry) Len

func (r *Registry) Len(what ...EntityType) int

Len return len of the whole registry or specified entity types Note that this is unsafe to call recursively, including in calls to other synchronized Registry functions like Walk (and therefore in the "work" function passed into iterators like Walk and walkEntityType).

func (*Registry) NumConfigMap

func (r *Registry) NumConfigMap() int

NumConfigMap gets number of ConfigMap

func (*Registry) NumPDB

func (r *Registry) NumPDB() int

NumPDB gets number of PDB

func (*Registry) NumPVC

func (r *Registry) NumPVC() int

NumPVC gets number of PVC

func (*Registry) NumSecret

func (r *Registry) NumSecret() int

NumSecret gets number of Secret

func (*Registry) NumService

func (r *Registry) NumService() int

NumService gets number of Service

func (*Registry) NumStatefulSet

func (r *Registry) NumStatefulSet() int

NumStatefulSet gets number of StatefulSet

func (*Registry) RegisterConfigMap

func (r *Registry) RegisterConfigMap(meta meta.Object)

RegisterConfigMap register ConfigMap

func (*Registry) RegisterPDB

func (r *Registry) RegisterPDB(meta meta.Object)

RegisterPDB register PDB

func (*Registry) RegisterPVC

func (r *Registry) RegisterPVC(meta meta.Object)

RegisterPVC register PVC

func (*Registry) RegisterSecret

func (r *Registry) RegisterSecret(meta meta.Object)

RegisterSecret register Secret

func (*Registry) RegisterService

func (r *Registry) RegisterService(meta meta.Object)

RegisterService register Service

func (*Registry) RegisterStatefulSet

func (r *Registry) RegisterStatefulSet(meta meta.Object)

RegisterStatefulSet registers StatefulSet

func (*Registry) String

func (r *Registry) String() string

String makes string representation of the registry

func (*Registry) Subtract

func (r *Registry) Subtract(sub *Registry) *Registry

Subtract subtracts specified registry from main

func (*Registry) Walk

func (r *Registry) Walk(f func(entityType EntityType, meta meta.Object))

Walk walks over registry. Note: this is fairly expensive in the sense that it locks the entire registry from being written for the full duration of whatever workload is applied throughout iteration. Avoid calling when you know the entity type you want.

func (*Registry) WalkConfigMap

func (r *Registry) WalkConfigMap(f func(meta meta.Object))

WalkConfigMap walk over specified entity types

func (*Registry) WalkPDB

func (r *Registry) WalkPDB(f func(meta meta.Object))

WalkPDB walk over specified entity types

func (*Registry) WalkPVC

func (r *Registry) WalkPVC(f func(meta meta.Object))

WalkPVC walk over specified entity types

func (*Registry) WalkSecret

func (r *Registry) WalkSecret(f func(meta meta.Object))

WalkSecret walk over specified entity types

func (*Registry) WalkService

func (r *Registry) WalkService(f func(meta meta.Object))

WalkService walk over specified entity types

func (*Registry) WalkStatefulSet

func (r *Registry) WalkStatefulSet(f func(meta meta.Object))

WalkStatefulSet walk over specified entity types

Jump to

Keyboard shortcuts

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