Documentation ¶
Index ¶
- func HostFindVolumeClaimTemplateUsedForVolumeMount(host *api.Host, volumeMount *core.VolumeMount) (*api.VolumeClaimTemplate, bool)
- func IsConfigurationChangeRequiresReboot(host *api.Host) bool
- func VolumeClaimTemplateApplyResourcesRequestsOnPVC(template *api.VolumeClaimTemplate, pvc *core.PersistentVolumeClaim) bool
- type EntityType
- type Registry
- func (r *Registry) HasConfigMap(meta meta.Object) bool
- func (r *Registry) HasPDB(meta meta.Object) bool
- func (r *Registry) HasPVC(meta meta.Object) bool
- func (r *Registry) HasSecret(meta meta.Object) bool
- func (r *Registry) HasService(meta meta.Object) bool
- func (r *Registry) HasStatefulSet(meta meta.Object) bool
- func (r *Registry) Len(what ...EntityType) int
- func (r *Registry) NumConfigMap() int
- func (r *Registry) NumPDB() int
- func (r *Registry) NumPVC() int
- func (r *Registry) NumSecret() int
- func (r *Registry) NumService() int
- func (r *Registry) NumStatefulSet() int
- func (r *Registry) RegisterConfigMap(meta meta.Object)
- func (r *Registry) RegisterPDB(meta meta.Object)
- func (r *Registry) RegisterPVC(meta meta.Object)
- func (r *Registry) RegisterSecret(meta meta.Object)
- func (r *Registry) RegisterService(meta meta.Object)
- func (r *Registry) RegisterStatefulSet(meta meta.Object)
- func (r *Registry) String() string
- func (r *Registry) Subtract(sub *Registry) *Registry
- func (r *Registry) Walk(f func(entityType EntityType, meta meta.Object))
- func (r *Registry) WalkConfigMap(f func(meta meta.Object))
- func (r *Registry) WalkPDB(f func(meta meta.Object))
- func (r *Registry) WalkPVC(f func(meta meta.Object))
- func (r *Registry) WalkSecret(f func(meta meta.Object))
- func (r *Registry) WalkService(f func(meta meta.Object))
- func (r *Registry) WalkStatefulSet(f func(meta meta.Object))
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 ¶
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 (*Registry) HasConfigMap ¶
HasConfigMap checks whether registry has specified ConfigMap
func (*Registry) HasService ¶
HasService checks whether registry has specified Service
func (*Registry) HasStatefulSet ¶
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 ¶
NumConfigMap gets number of ConfigMap
func (*Registry) NumStatefulSet ¶
NumStatefulSet gets number of StatefulSet
func (*Registry) RegisterConfigMap ¶
RegisterConfigMap register ConfigMap
func (*Registry) RegisterPDB ¶
RegisterPDB register PDB
func (*Registry) RegisterPVC ¶
RegisterPVC register PVC
func (*Registry) RegisterSecret ¶
RegisterSecret register Secret
func (*Registry) RegisterService ¶
RegisterService register Service
func (*Registry) RegisterStatefulSet ¶
RegisterStatefulSet registers StatefulSet
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 ¶
WalkConfigMap walk over specified entity types
func (*Registry) WalkSecret ¶
WalkSecret walk over specified entity types
func (*Registry) WalkService ¶
WalkService walk over specified entity types
func (*Registry) WalkStatefulSet ¶
WalkStatefulSet walk over specified entity types