Documentation
¶
Index ¶
- func AsName(val string) string
- func ConvertMap(in map[string]any) map[string]string
- func DisableClientLimits(config *rest.Config)
- func GetCurrentCanaryStep(rollout *v1alpha1.Rollout) (*v1alpha1.CanaryStep, *int32)
- func GetOperatorNamespace() (string, error)
- func HashObject(object any) (string, error)
- func HashResource(resource unstructured.Unstructured) (string, error)
- func Jitter(interval time.Duration) time.Duration
- func MapIncludes(m, elements map[string]string) bool
- func MarkCondition(set func(condition metav1.Condition), conditionType v1alpha1.ConditionType, ...)
- func NewFactory(cfg *rest.Config) util.Factory
- func NewNamespacedFactory(cfg *rest.Config, namespace string) util.Factory
- func PromoteRollout(ctx context.Context, rolloutIf clientset.RolloutInterface, name string) (*v1alpha1.Rollout, error)
- func TryAddControllerRef(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func TryAddOwnerRef(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func UnstructuredAsJSON(resource *unstructured.Unstructured) string
- func UnstructuredToConditions(c []interface{}) []metav1.Condition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMap ¶
ConvertMap converts map from `string: any` to `string: string`.
func DisableClientLimits ¶
func GetCurrentCanaryStep ¶
func GetCurrentCanaryStep(rollout *v1alpha1.Rollout) (*v1alpha1.CanaryStep, *int32)
GetCurrentCanaryStep returns the current canary step. If there are no steps or the rollout has already executed the last step, the func returns nil
func GetOperatorNamespace ¶
func HashObject ¶
func HashResource ¶
func HashResource(resource unstructured.Unstructured) (string, error)
HashResource calculates SHA for an unstructured resource. It uses object metadata (name, namespace, labels, annotations, deletion timestamp) and all other top-level fields except status.
func MapIncludes ¶
MapIncludes checks if all `elements` are included in `m` map.
func MarkCondition ¶
func MarkCondition(set func(condition metav1.Condition), conditionType v1alpha1.ConditionType, conditionStatus metav1.ConditionStatus, conditionReason v1alpha1.ConditionReason, message string)
func NewNamespacedFactory ¶
func PromoteRollout ¶
func PromoteRollout(ctx context.Context, rolloutIf clientset.RolloutInterface, name string) (*v1alpha1.Rollout, error)
PromoteRollout promotes a rollout to the next step, or to end of all steps
func TryAddControllerRef ¶
func TryAddControllerRef(ctx context.Context, client ctrlruntimeclient.Client, owner ctrlruntimeclient.Object, controlled ctrlruntimeclient.Object, scheme *runtime.Scheme) error
func TryAddOwnerRef ¶
func TryAddOwnerRef(ctx context.Context, client ctrlruntimeclient.Client, owner ctrlruntimeclient.Object, object ctrlruntimeclient.Object, scheme *runtime.Scheme) error
func UnstructuredAsJSON ¶
func UnstructuredAsJSON(resource *unstructured.Unstructured) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.