Versions in this module Expand all Collapse all v1 v1.4.0 Aug 14, 2023 Changes in this version + const ControllerRevisionHashLabel + const SidecarEnvKey + const SidecarSetHashAnnotation + const SidecarSetHashWithoutImageAnnotation + const SidecarSetKindName + const SidecarSetListAnnotation + const SidecarSetVersionAltEnvKey + const SidecarSetVersionEnvKey + const SidecarSetWorkingHotUpgradeContainer + const SidecarsetInplaceUpdateStateKey + var RevisionAdapterImpl = &revisionAdapterImpl + var SubPathExprEnvReg = regexp.Compile(`\$\(([-._a-zA-Z][-._a-zA-Z0-9]*)\)`) + func ControllerRevisionName(prefix string, hash string) string + func ConvertDownwardAPIFieldLabel(version, label, value string) (string, string, error) + func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) + func ExtractContainerNameFromFieldPath(fs *corev1.ObjectFieldSelector, pod *corev1.Pod) (string, error) + func GetHotUpgradeContainerName(name string) (string, string) + func GetInjectedVolumeMountsAndEnvs(control SidecarControl, sidecarContainer *appsv1alpha1.SidecarContainer, ...) ([]corev1.VolumeMount, []corev1.EnvVar) + func GetPodHotUpgradeContainers(sidecarName string, pod *corev1.Pod) (workContainer, otherContainer string) + func GetPodHotUpgradeInfoInAnnotations(pod *corev1.Pod) map[string]string + func GetPodSidecarSetControllerRevision(sidecarSetName string, pod metav1.Object) string + func GetPodSidecarSetRevision(sidecarSetName string, pod metav1.Object) string + func GetPodSidecarSetVersionAltAnnotation(cName string) string + func GetPodSidecarSetVersionAnnotation(cName string) string + func GetPodSidecarSetWithoutImageRevision(sidecarSetName string, pod metav1.Object) string + func GetPodsSortFunc(pods []*corev1.Pod, waitUpdateIndexes []int) func(i, j int) bool + func GetRevisionSelector(s *appsv1alpha1.SidecarSet) labels.Selector + func GetSidecarContainersInPod(sidecarSet *appsv1alpha1.SidecarSet) sets.String + func GetSidecarSetRevision(sidecarSet *appsv1alpha1.SidecarSet) string + func GetSidecarSetWithoutImageRevision(sidecarSet *appsv1alpha1.SidecarSet) string + func GetSidecarTransferEnvs(sidecarContainer *appsv1alpha1.SidecarContainer, pod *corev1.Pod) (injectedEnvs []corev1.EnvVar) + func HashControllerRevision(revision *apps.ControllerRevision, probe *int32) string + func IsActivePod(pod *corev1.Pod) bool + func IsHotUpgradeContainer(sidecarContainer *appsv1alpha1.SidecarContainer) bool + func IsInjectedSidecarContainerInPod(container *corev1.Container) bool + func IsPodConsistentWithSidecarSet(pod *corev1.Pod, sidecarSet *appsv1alpha1.SidecarSet) bool + func IsPodInjectedSidecarSet(pod *corev1.Pod, sidecarSet *appsv1alpha1.SidecarSet) bool + func IsPodSidecarUpdated(sidecarSet *appsv1alpha1.SidecarSet, pod *corev1.Pod) bool + func IsSharePodVolumeMounts(container *appsv1alpha1.SidecarContainer) bool + func IsSidecarContainerUpdateCompleted(pod *v1.Pod, sidecarSets, containers sets.String) bool + func MockSidecarSetForRevision(set *appsv1alpha1.SidecarSet) metav1.Object + func NewControllerRevision(parent metav1.Object, parentKind schema.GroupVersionKind, ...) (*apps.ControllerRevision, error) + func NewRevision(s *appsv1alpha1.SidecarSet, namespace string, revision int64, ...) (*apps.ControllerRevision, error) + func NextRevision(revisions []*apps.ControllerRevision) int64 + func PatchPodMetadata(originMetadata *metav1.ObjectMeta, ...) (skip bool, err error) + func PodMatchedSidecarSet(pod *corev1.Pod, sidecarSet *appsv1alpha1.SidecarSet) (bool, error) + func SidecarSetHash(sidecarSet *appsv1alpha1.SidecarSet) (string, error) + func SidecarSetHashWithoutImage(sidecarSet *appsv1alpha1.SidecarSet) (string, error) + func SidecarSetMutatingPod(pod, oldPod *corev1.Pod, sidecarSets []*appsv1alpha1.SidecarSet, ...) (skip bool, err error) + func SortControllerRevisions(revisions []*apps.ControllerRevision) + func UpdatePodSidecarSetHash(pod *corev1.Pod, sidecarSet *appsv1alpha1.SidecarSet) + type HistoryControl interface + CreateControllerRevision func(parent metav1.Object, revision *apps.ControllerRevision, collisionCount *int32) (*apps.ControllerRevision, error) + DeleteControllerRevision func(revision *apps.ControllerRevision) error + GetHistorySidecarSet func(sidecarSet *appsv1alpha1.SidecarSet, ...) (*appsv1alpha1.SidecarSet, error) + GetSuitableRevisionSidecarSet func(sidecarSet *appsv1alpha1.SidecarSet, oldPod, newPod *v1.Pod) (*appsv1alpha1.SidecarSet, error) + ListSidecarSetControllerRevisions func(sidecarSet *appsv1alpha1.SidecarSet) ([]*apps.ControllerRevision, error) + UpdateControllerRevision func(revision *apps.ControllerRevision, newRevision int64) (*apps.ControllerRevision, error) + func NewHistoryControl(client clientset.Interface, indexer cache.Indexer, namespace string) HistoryControl + type SidecarControl interface + FindContainerToHotUpgrade func(sidecarContainer *appsv1alpha1.SidecarContainer, pod *v1.Pod, ...) (string, string) + GetSuitableRevisionSidecarSet func(sidecarSet *appsv1alpha1.SidecarSet, oldPod, newPod *v1.Pod) (*appsv1alpha1.SidecarSet, error) + IsPodAvailabilityChanged func(pod, oldPod *v1.Pod) bool + IsPodReady func(pod *v1.Pod, sidecarSet *appsv1alpha1.SidecarSet) bool + IsPodStateConsistent func(pod *v1.Pod, sidecarSet *appsv1alpha1.SidecarSet, ...) bool + IsSidecarSetUpgradable func(pod *v1.Pod, sidecarSet *appsv1alpha1.SidecarSet) bool + NeedToInjectInUpdatedPod func(pod, oldPod *v1.Pod, sidecarContainer *appsv1alpha1.SidecarContainer, ...) (needInject bool, existSidecars []*appsv1alpha1.SidecarContainer, ...) + NeedToInjectVolumeMount func(volumeMount v1.VolumeMount) bool + UpdatePodAnnotationsInUpgrade func(changedContainers []string, pod *v1.Pod, sidecarSet *appsv1alpha1.SidecarSet) + UpgradeSidecarContainer func(sidecarContainer *appsv1alpha1.SidecarContainer, pod *v1.Pod, ...) *v1.Container + func NewCommonControl(indexer cache.Indexer, namespace string) SidecarControl + type SidecarSetUpgradeSpec struct + SidecarList []string + SidecarSetControllerRevision string + SidecarSetHash string + SidecarSetName string + UpdateTimestamp metav1.Time + func GetPodSidecarSetUpgradeSpecInAnnotations(sidecarSetName, annotationKey string, pod metav1.Object) SidecarSetUpgradeSpec