Documentation ¶
Index ¶
- Constants
- func AddConfigMapDigestSuffix(cm *corev1.ConfigMap) error
- func FindConfigMapVolume(podSpec *corev1.PodSpec, pred func(string) bool) string
- func GetStorageVolumeName(storageVolumeName string, memberType v1alpha1.MemberType) v1alpha1.StorageVolumeName
- func SetStatefulSetLastAppliedConfigAnnotation(set *apps.StatefulSet) error
- func SetUpgradePartition(set *apps.StatefulSet, upgradeOrdinal int32)
- func Sha256Sum(v interface{}) (string, error)
- func StatefulSetEqual(new apps.StatefulSet, old apps.StatefulSet) bool
- func StatefulSetIsUpgrading(set *apps.StatefulSet) bool
- func UpdateConfigMapIfNeed(ctx context.Context, cli client.Client, ...) error
- func UpdateStatefulSet(ctx context.Context, cli client.Client, newSet, oldSet *apps.StatefulSet) error
- func UpdateStatefulSetWithPreCheck(tc *v1alpha1.TiflowCluster, resaon string, newSts, oldSts *apps.StatefulSet) error
Constants ¶
const (
// LastAppliedConfigAnnotation is annotation key of last applied configuration
LastAppliedConfigAnnotation = "pingcap.com/last-applied-configuration"
)
Variables ¶
This section is empty.
Functions ¶
func FindConfigMapVolume ¶
FindConfigMapVolume returns the configmap which's name matches the predicate in a PodSpec, empty indicates not found
func GetStorageVolumeName ¶
func GetStorageVolumeName(storageVolumeName string, memberType v1alpha1.MemberType) v1alpha1.StorageVolumeName
func SetStatefulSetLastAppliedConfigAnnotation ¶
func SetStatefulSetLastAppliedConfigAnnotation(set *apps.StatefulSet) error
SetStatefulSetLastAppliedConfigAnnotation set last applied config to Statefulset's annotation
func SetUpgradePartition ¶
func SetUpgradePartition(set *apps.StatefulSet, upgradeOrdinal int32)
SetUpgradePartition set statefulSet's rolling update partition
func StatefulSetEqual ¶
func StatefulSetEqual(new apps.StatefulSet, old apps.StatefulSet) bool
StatefulSetEqual compares the new Statefulset's spec with old Statefulset's last applied config
func StatefulSetIsUpgrading ¶
func StatefulSetIsUpgrading(set *apps.StatefulSet) bool
StatefulSetIsUpgrading confirms whether the statefulSet is upgrading phase
func UpdateConfigMapIfNeed ¶
func UpdateConfigMapIfNeed( ctx context.Context, cli client.Client, configUpdateStrategy pingcapcomv1alpha1.ConfigUpdateStrategy, inUseName string, desired *corev1.ConfigMap, ) error
UpdateConfigMapIfNeed set the toml field as the old one if they are logically equal.
func UpdateStatefulSet ¶
func UpdateStatefulSet(ctx context.Context, cli client.Client, newSet, oldSet *apps.StatefulSet) error
UpdateStatefulSet is a template function to update the statefulset of components
func UpdateStatefulSetWithPreCheck ¶
func UpdateStatefulSetWithPreCheck(tc *v1alpha1.TiflowCluster, resaon string, newSts, oldSts *apps.StatefulSet) error
UpdateStatefulSetWithPreCheck todo: impl this logic
Types ¶
This section is empty.