Documentation
¶
Index ¶
- func EqualIgnoreHash(template1, template2 *corev1.PodTemplateSpec) bool
- func FindNewReplicaSet(d *appsv1.Deployment, rsList []*appsv1.ReplicaSet) *appsv1.ReplicaSet
- func GetNewReplicaSetWithoutRetry(d *appsv1.Deployment) (*appsv1.ReplicaSet, error)
- func GetPodInCache(ns, name string) (*corev1.Pod, bool, error)
- func GetPodsInCache(ns string, ls labels.Selector) ([]*corev1.Pod, error)
- func GetReplicaSetsInCache(d *appsv1.Deployment) ([]*appsv1.ReplicaSet, error)
- type DeploysByCreationTimestamp
- type PodsByCreationTimestamp
- type ReplicaSetsByCreationTimestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualIgnoreHash ¶
func EqualIgnoreHash(template1, template2 *corev1.PodTemplateSpec) bool
EqualIgnoreHash returns true if two given podTemplateSpec are equal, ignoring the diff in value of Labels[pod-template-hash] We ignore pod-template-hash because:
- The hash result would be different upon podTemplateSpec API changes (e.g. the addition of a new field will cause the hash code to change)
- The deployment template won't have hash labels
func FindNewReplicaSet ¶
func FindNewReplicaSet(d *appsv1.Deployment, rsList []*appsv1.ReplicaSet) *appsv1.ReplicaSet
FindNewReplicaSet returns the new RS this given deployment targets (the one with the same pod template).
func GetNewReplicaSetWithoutRetry ¶
func GetNewReplicaSetWithoutRetry(d *appsv1.Deployment) (*appsv1.ReplicaSet, error)
GetNewReplicaSetWithoutRetry returns the new rs (the one with the same pod template).
func GetPodsInCache ¶
GetPodsInCache gets pods in local cache, if 1. ns is empty, return all pods in all namespace 2. ns is set, but ls is nil, return all pods in namespace 3. both ns and ls are set, return all pods matching ls
func GetReplicaSetsInCache ¶
func GetReplicaSetsInCache(d *appsv1.Deployment) ([]*appsv1.ReplicaSet, error)
Types ¶
type DeploysByCreationTimestamp ¶
type DeploysByCreationTimestamp []*tritonappsv1alpha1.DeployFlow
DeploysByCreationTimestamp sorts a list of Deploy by creation timestamp, using their names as a tie breaker.
func (DeploysByCreationTimestamp) Len ¶
func (o DeploysByCreationTimestamp) Len() int
func (DeploysByCreationTimestamp) Less ¶
func (o DeploysByCreationTimestamp) Less(i, j int) bool
func (DeploysByCreationTimestamp) Swap ¶
func (o DeploysByCreationTimestamp) Swap(i, j int)
type PodsByCreationTimestamp ¶
ObjectsByCreationTimestamp sorts a list of Pod 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 ReplicaSetsByCreationTimestamp ¶
type ReplicaSetsByCreationTimestamp []*appsv1.ReplicaSet
ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker.
func (ReplicaSetsByCreationTimestamp) Len ¶
func (o ReplicaSetsByCreationTimestamp) Len() int
func (ReplicaSetsByCreationTimestamp) Less ¶
func (o ReplicaSetsByCreationTimestamp) Less(i, j int) bool
func (ReplicaSetsByCreationTimestamp) Swap ¶
func (o ReplicaSetsByCreationTimestamp) Swap(i, j int)