package
1.8.0
Repository: https://github.com/openkruise/kruise.git
Documentation: pkg.go.dev

# Functions

code lifted from https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/pods/helpers.go ConvertDownwardAPIFieldLabel converts the specified downward API field label and its value in the pod of the specified version to the internal version, and returns the converted label and value.
No description provided by the author
FetchSidecarSetMatchedNamespace fetch sidecarSet matched namespaces.
GetHotUpgradeContainerName returns format: mesh-1, mesh-2.
No description provided by the author
GetPodHotUpgradeContainers return two hot upgrade sidecar containers workContainer: currently working sidecar container, record in pod annotations[kruise.io/sidecarset-working-hotupgrade-container] otherContainer: 1.
GetPodHotUpgradeInfoInAnnotations checks which hot upgrade sidecar container is working now format: sidecarset.spec.container[x].name -> pod.spec.container[x].name for example: mesh -> mesh-1, envoy -> envoy-2.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetPodSidecarSetVersionAnnotation is only used in hot upgrade container cName format: mesh-1, mesh-2.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsActivePod determines the pod whether need be injected and updated.
IsHotUpgradeContainer indicates whether sidecar container update strategy is HotUpdate.
No description provided by the author
No description provided by the author
No description provided by the author
whether this pod has been updated based on the latest sidecarSet.
No description provided by the author
No description provided by the author
IsSidecarContainer check whether initContainer is sidecar container in k8s 1.28.
isContainerInplaceUpdateCompleted checks whether imageID in container status has been changed since in-place update.
No description provided by the author
No description provided by the author
No description provided by the author
PatchPodMetadata patch pod annotations and labels.
PodMatchSidecarSet determines if pod match Selector of sidecar.
SidecarSetHash returns a hash of the SidecarSet.
SidecarSetHashWithoutImage calculates sidecars's container hash without its image we use this to determine if the sidecar reconcile needs to update a pod image.
UpdatePodSidecarSetHash when sidecarSet in-place update sidecar container, Update sidecarSet hash in Pod annotations[kruise.io/sidecarset-hash].
No description provided by the author

# Constants

SidecarEnvKey specifies the environment variable which record a container as injected.
SidecarSetHashAnnotation represents the key of a sidecarSet hash.
SidecarSetHashWithoutImageAnnotation represents the key of a sidecarset hash without images of sidecar.
SidecarsetInplaceUpdateStateKey records the state of inplace-update.
No description provided by the author
SidecarSetListAnnotation represent sidecarset list that injected pods.
SidecarSetUpgradable is a pod condition to indicate whether the pod's sidecarset is upgradable.
SidecarSetVersionAltEnvKey is container version env in the other sidecar container of the same hotupgrade sidecar(SIDECARSET_VERSION_ALT).
SidecarSetVersionEnvKey is sidecar container version in container env(SIDECARSET_VERSION).
SidecarSetWorkingHotUpgradeContainer records which hot upgrade container is working currently.

# Variables

No description provided by the author
SidecarIgnoredNamespaces specifies the namespaces where Pods won't get injected SidecarIgnoredNamespaces = []string{"kube-system", "kube-public"} SubPathExprEnvReg format: $(ODD_NAME)、$(POD_NAME)...
No description provided by the author

# Structs

No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author