package petset
import "k8s.io/kubernetes/pkg/controller/petset"
Index ¶
- Constants
- func NewPetQueue(ps *apps.StatefulSet, podList []*api.Pod) *petQueue
- func NewStatefulSetIterator(ps *apps.StatefulSet, podList []*api.Pod) *statefulSetIterator
- type NameIdentityMapper
- func (n *NameIdentityMapper) Identity(pet *api.Pod) string
- func (n *NameIdentityMapper) SetIdentity(id string, pet *api.Pod)
- func (n *NameIdentityMapper) String(pet *api.Pod) string
- type NetworkIdentityMapper
- func (n *NetworkIdentityMapper) Identity(pet *api.Pod) string
- func (n *NetworkIdentityMapper) SetIdentity(id string, pet *api.Pod)
- func (n *NetworkIdentityMapper) String(pet *api.Pod) string
- type PodsByCreationTimestamp
- func (o PodsByCreationTimestamp) Len() int
- func (o PodsByCreationTimestamp) Less(i, j int) bool
- func (o PodsByCreationTimestamp) Swap(i, j int)
- type StatefulSetController
- func NewStatefulSetController(podInformer cache.SharedIndexInformer, kubeClient internalclientset.Interface, resyncPeriod time.Duration) *StatefulSetController
- func (psc *StatefulSetController) Run(workers int, stopCh <-chan struct{})
- func (psc *StatefulSetController) Sync(key string) error
- type VolumeIdentityMapper
- func (v *VolumeIdentityMapper) GetClaims(id string) map[string]api.PersistentVolumeClaim
- func (v *VolumeIdentityMapper) GetClaimsForPet(pet *api.Pod) []api.PersistentVolumeClaim
- func (v *VolumeIdentityMapper) Identity(pet *api.Pod) string
- func (v *VolumeIdentityMapper) SetIdentity(id string, pet *api.Pod)
- func (v *VolumeIdentityMapper) String(pet *api.Pod) string
Constants ¶
const ( // Time to sleep before polling to see if the pod cache has synced. PodStoreSyncedPollPeriod = 100 * time.Millisecond )
const ( // StatefulSetInitAnnotation is an annotation which when set, indicates that the // pet has finished initializing itself. // TODO: Replace this with init container status. StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized" )
Functions ¶
func NewPetQueue ¶
func NewPetQueue(ps *apps.StatefulSet, podList []*api.Pod) *petQueue
NewPetQueue returns a queue for tracking pets
func NewStatefulSetIterator ¶
func NewStatefulSetIterator(ps *apps.StatefulSet, podList []*api.Pod) *statefulSetIterator
NewStatefulSetIterator returns a new iterator. All pods in the given podList are used to seed the queue of the iterator.
Types ¶
type NameIdentityMapper ¶
type NameIdentityMapper struct {
// contains filtered or unexported fields
}
NameIdentityMapper assigns names to pets. It also puts the pet in the same namespace as the parent.
func (*NameIdentityMapper) Identity ¶
func (n *NameIdentityMapper) Identity(pet *api.Pod) string
Identity returns the name identity of the pet.
func (*NameIdentityMapper) SetIdentity ¶
func (n *NameIdentityMapper) SetIdentity(id string, pet *api.Pod)
SetIdentity sets the pet namespace and name.
func (*NameIdentityMapper) String ¶
func (n *NameIdentityMapper) String(pet *api.Pod) string
String is a string function for the name identity of the pet.
type NetworkIdentityMapper ¶
type NetworkIdentityMapper struct {
// contains filtered or unexported fields
}
NetworkIdentityMapper assigns network identity to pets.
func (*NetworkIdentityMapper) Identity ¶
func (n *NetworkIdentityMapper) Identity(pet *api.Pod) string
Identity returns the network identity of the pet.
func (*NetworkIdentityMapper) SetIdentity ¶
func (n *NetworkIdentityMapper) SetIdentity(id string, pet *api.Pod)
SetIdentity sets network identity on the pet.
func (*NetworkIdentityMapper) String ¶
func (n *NetworkIdentityMapper) String(pet *api.Pod) string
String is a string function for the network identity of the pet.
type PodsByCreationTimestamp ¶
PodsByCreationTimestamp sorts a list of Pods by creation timestamp, using their names as a tie breaker.
func (PodsByCreationTimestamp) Len ¶
func (o PodsByCreationTimestamp) Len() int
func (PodsByCreationTimestamp) Less ¶
func (o PodsByCreationTimestamp) Less(i, j int) bool
func (PodsByCreationTimestamp) Swap ¶
func (o PodsByCreationTimestamp) Swap(i, j int)
type StatefulSetController ¶
type StatefulSetController struct {
// contains filtered or unexported fields
}
StatefulSetController controls statefulsets.
func NewStatefulSetController ¶
func NewStatefulSetController(podInformer cache.SharedIndexInformer, kubeClient internalclientset.Interface, resyncPeriod time.Duration) *StatefulSetController
NewStatefulSetController creates a new statefulset controller.
func (*StatefulSetController) Run ¶
func (psc *StatefulSetController) Run(workers int, stopCh <-chan struct{})
Run runs the statefulset controller.
func (*StatefulSetController) Sync ¶
func (psc *StatefulSetController) Sync(key string) error
Sync syncs the given statefulset.
type VolumeIdentityMapper ¶
type VolumeIdentityMapper struct {
// contains filtered or unexported fields
}
VolumeIdentityMapper assigns storage identity to pets.
func (*VolumeIdentityMapper) GetClaims ¶
func (v *VolumeIdentityMapper) GetClaims(id string) map[string]api.PersistentVolumeClaim
GetClaims returns the volume claims associated with the given id. The claims belong to the statefulset. The id should be unique within a statefulset.
func (*VolumeIdentityMapper) GetClaimsForPet ¶
func (v *VolumeIdentityMapper) GetClaimsForPet(pet *api.Pod) []api.PersistentVolumeClaim
GetClaimsForPet returns the pvcs for the given pet.
func (*VolumeIdentityMapper) Identity ¶
func (v *VolumeIdentityMapper) Identity(pet *api.Pod) string
Identity returns the storage identity of the pet.
func (*VolumeIdentityMapper) SetIdentity ¶
func (v *VolumeIdentityMapper) SetIdentity(id string, pet *api.Pod)
SetIdentity sets storge identity on the pet.
func (*VolumeIdentityMapper) String ¶
func (v *VolumeIdentityMapper) String(pet *api.Pod) string
String is a string function for the network identity of the pet.
Source Files ¶
fakes.go identity_mappers.go iterator.go pet.go pet_set.go pet_set_utils.go
- Version
- v1.5.4
- Published
- Mar 7, 2017
- Platform
- js/wasm
- Imports
- 30 packages
- Last checked
- 7 minutes ago –
Tools for package owners.