Documentation ¶
Index ¶
- Constants
- Variables
- func ControllerRevisionName(prefix string, hash string) string
- func DeepHashObject(hasher hash.Hash, objectToWrite interface{})
- func HashControllerRevision(revision *apps.ControllerRevision, probe *int32) string
- func NewAssistantObjectReconciler() kubebuilderx.Reconciler
- func NewControllerRevision(parent metav1.Object, parentKind schema.GroupVersionKind, ...) (*apps.ControllerRevision, error)
- func NewDeletionReconciler() kubebuilderx.Reconciler
- func NewFixMetaReconciler() kubebuilderx.Reconciler
- func NewReplicasAlignmentReconciler() kubebuilderx.Reconciler
- func NewRevision(rsm *workloads.ReplicatedStateMachine) (*apps.ControllerRevision, error)
- func NewRevisionUpdateReconciler() kubebuilderx.Reconciler
- func NewStatusReconciler() kubebuilderx.Reconciler
- func NewTreeLoader() kubebuilderx.TreeLoader
- func NewUpdateReconciler() kubebuilderx.Reconciler
- type ReplicaProvider
Constants ¶
const ControllerRevisionHashLabel = "controller.kubernetes.io/hash"
ControllerRevisionHashLabel is the label used to indicate the hash value of a ControllerRevision's Data.
const ( // FeatureGateRSMReplicaProvider determines the replica provider for the RSM controller. // A replica provider is responsible for managing the underlying API resources required for the smooth operation of the RSM. // The currently supported replica providers are StatefulSet and Pod. // Planned supported replica providers include OpenKruise Advanced StatefulSet and KB Replica. FeatureGateRSMReplicaProvider = "RSM_REPLICA_PROVIDER" )
Variables ¶
var Codecs = serializer.NewCodecFactory(model.GetScheme())
Functions ¶
func ControllerRevisionName ¶
ControllerRevisionName returns the Name for a ControllerRevision in the form prefix-hash. If the length of prefix is greater than 223 bytes, it is truncated to allow for a name that is no larger than 253 bytes.
func DeepHashObject ¶
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.
func HashControllerRevision ¶
func HashControllerRevision(revision *apps.ControllerRevision, probe *int32) string
HashControllerRevision hashes the contents of revision's Data using FNV hashing. If probe is not nil, the byte value of probe is added written to the hash as well. The returned hash will be a safe encoded string to avoid bad words.
func NewAssistantObjectReconciler ¶
func NewAssistantObjectReconciler() kubebuilderx.Reconciler
func NewControllerRevision ¶
func NewControllerRevision(parent metav1.Object, parentKind schema.GroupVersionKind, templateLabels map[string]string, data runtime.RawExtension, revision int64, collisionCount *int32) (*apps.ControllerRevision, error)
NewControllerRevision returns a ControllerRevision with a ControllerRef pointing to parent and indicating that parent is of parentKind. The ControllerRevision has labels matching template labels, contains Data equal to data, and has a Revision equal to revision. The collisionCount is used when creating the name of the ControllerRevision so the name is likely unique. If the returned error is nil, the returned ControllerRevision is valid. If the returned error is not nil, the returned ControllerRevision is invalid for use.
func NewDeletionReconciler ¶
func NewDeletionReconciler() kubebuilderx.Reconciler
func NewFixMetaReconciler ¶
func NewFixMetaReconciler() kubebuilderx.Reconciler
func NewReplicasAlignmentReconciler ¶
func NewReplicasAlignmentReconciler() kubebuilderx.Reconciler
func NewRevision ¶
func NewRevision(rsm *workloads.ReplicatedStateMachine) (*apps.ControllerRevision, error)
func NewRevisionUpdateReconciler ¶
func NewRevisionUpdateReconciler() kubebuilderx.Reconciler
func NewStatusReconciler ¶
func NewStatusReconciler() kubebuilderx.Reconciler
func NewTreeLoader ¶
func NewTreeLoader() kubebuilderx.TreeLoader
func NewUpdateReconciler ¶
func NewUpdateReconciler() kubebuilderx.Reconciler
Types ¶
type ReplicaProvider ¶
type ReplicaProvider string
const ( StatefulSetProvider ReplicaProvider = "StatefulSet" PodProvider ReplicaProvider = "Pod" )