Documentation
¶
Index ¶
- Variables
- func ApplyPatchFromRevision(pod *corev1.Pod, revision *appsv1.ControllerRevision) (*corev1.Pod, error)
- func BuildPvcWithHash(cls *appsv1alpha1.CollaSet, pvcTmp *corev1.PersistentVolumeClaim, id string) (*corev1.PersistentVolumeClaim, error)
- func CollectPodInstanceID(pods []*PodWrapper) map[int]struct{}
- func ComparePod(l, r *corev1.Pod) bool
- func ExtractPvcTmpName(cls *appsv1alpha1.CollaSet, pvc *corev1.PersistentVolumeClaim) (string, error)
- func GetPodFromRevision(revision *appsv1.ControllerRevision) (*corev1.Pod, error)
- func GetPodInstanceID(pod *corev1.Pod) (int, error)
- func GetPodRevisionPatch(revision *appsv1.ControllerRevision) ([]byte, error)
- func GetPodsPrefix(controllerName string) string
- func IsPodInactive(pod *corev1.Pod) bool
- func NewPodFrom(owner metav1.Object, ownerRef *metav1.OwnerReference, ...) (*corev1.Pod, error)
- func PatchToPod(currentRevisionObj, updateRevisionObj, currentObj client.Object) (client.Object, error)
- func PodNamingSuffixPersistentSequence(cls *appsv1alpha1.CollaSet) bool
- func PodReadyTime(pod *corev1.Pod) *metav1.Time
- func PvcPolicyWhenDelete(cls *appsv1alpha1.CollaSet) appsv1alpha1.PersistentVolumeClaimRetentionPolicyType
- func PvcPolicyWhenScaled(cls *appsv1alpha1.CollaSet) appsv1alpha1.PersistentVolumeClaimRetentionPolicyType
- func PvcTmpHash(pvc *corev1.PersistentVolumeClaim) (string, error)
- func PvcTmpHashMapping(pvcTmps []corev1.PersistentVolumeClaim) (map[string]string, error)
- type PodWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PodGVK = corev1.SchemeGroupVersion.WithKind("Pod") PVCGVK = corev1.SchemeGroupVersion.WithKind("PersistentVolumeClaim") CollaSetGVK = appsv1alpha1.SchemeGroupVersion.WithKind("CollaSet") ResourceContextGVK = appsv1alpha1.SchemeGroupVersion.WithKind("ResourceContext") )
View Source
var PodCodec = scheme.Codecs.LegacyCodec(corev1.SchemeGroupVersion)
Functions ¶
func ApplyPatchFromRevision ¶
func BuildPvcWithHash ¶
func BuildPvcWithHash(cls *appsv1alpha1.CollaSet, pvcTmp *corev1.PersistentVolumeClaim, id string) (*corev1.PersistentVolumeClaim, error)
func CollectPodInstanceID ¶
func CollectPodInstanceID(pods []*PodWrapper) map[int]struct{}
func ComparePod ¶
func ExtractPvcTmpName ¶
func ExtractPvcTmpName(cls *appsv1alpha1.CollaSet, pvc *corev1.PersistentVolumeClaim) (string, error)
func GetPodFromRevision ¶
func GetPodFromRevision(revision *appsv1.ControllerRevision) (*corev1.Pod, error)
func GetPodRevisionPatch ¶
func GetPodRevisionPatch(revision *appsv1.ControllerRevision) ([]byte, error)
func GetPodsPrefix ¶
func IsPodInactive ¶ added in v0.7.0
func NewPodFrom ¶
func PatchToPod ¶
func PatchToPod(currentRevisionObj, updateRevisionObj, currentObj client.Object) (client.Object, error)
PatchToPod Use three-way merge to get a updated pod.
func PodNamingSuffixPersistentSequence ¶ added in v0.7.0
func PodNamingSuffixPersistentSequence(cls *appsv1alpha1.CollaSet) bool
func PvcPolicyWhenDelete ¶
func PvcPolicyWhenDelete(cls *appsv1alpha1.CollaSet) appsv1alpha1.PersistentVolumeClaimRetentionPolicyType
func PvcPolicyWhenScaled ¶
func PvcPolicyWhenScaled(cls *appsv1alpha1.CollaSet) appsv1alpha1.PersistentVolumeClaimRetentionPolicyType
func PvcTmpHash ¶
func PvcTmpHash(pvc *corev1.PersistentVolumeClaim) (string, error)
func PvcTmpHashMapping ¶
func PvcTmpHashMapping(pvcTmps []corev1.PersistentVolumeClaim) (map[string]string, error)
Types ¶
type PodWrapper ¶
type PodWrapper struct {
*corev1.Pod
ID int
ContextDetail *appsv1alpha1.ContextDetail
PlaceHolder bool
ToDelete bool
ToExclude bool
}
Click to show internal directories.
Click to hide internal directories.