Documentation ¶
Index ¶
- func AddFinalizer(obj metav1.Object, finalizers ...string)
- func GetCluster(ctx context.Context, client ctrlruntimeclient.Client, ...) (*v1alpha1.Cluster, error)
- func GetConfigMapData(ctx context.Context, client ctrlruntimeclient.Client, namespace string, ...) (string, error)
- func GetNotificationSink(ctx context.Context, client ctrlruntimeclient.Client, ...) (*v1alpha1.NotificationSink, error)
- func GetPrAutomation(ctx context.Context, client ctrlruntimeclient.Client, ...) (*v1alpha1.PrAutomation, error)
- func GetSecret(ctx context.Context, client ctrlruntimeclient.Client, ...) (*corev1.Secret, error)
- func GetServiceDeployment(ctx context.Context, client ctrlruntimeclient.Client, ...) (*v1alpha1.ServiceDeployment, error)
- func HashObject(a any) (string, error)
- func HashString(s string) string
- func MarkCondition(set func(condition metav1.Condition), conditionType v1alpha1.ConditionType, ...)
- func MarkFalse(set func(metav1.Condition), conditionType v1alpha1.ConditionType, ...)
- func MarkTrue(set func(metav1.Condition), conditionType v1alpha1.ConditionType, ...)
- func RemoveFinalizer(obj metav1.Object, toRemove ...string)
- func SyncCondition(set func(condition metav1.Condition), ...)
- func TryAddControllerRef(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func TryAddFinalizer(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func TryAddOwnerRef(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func TryRemoveFinalizer(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func TryUpdateStatus[PatchObject ctrlruntimeclient.Object](ctx context.Context, client ctrlruntimeclient.Client, object PatchObject, ...) error
- type ConsoleHelper
- type Patcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶
AddFinalizer will add the given finalizer to the object. It uses a StringSet to avoid duplicates.
func GetCluster ¶
func GetCluster(ctx context.Context, client ctrlruntimeclient.Client, ref *corev1.ObjectReference) (*v1alpha1.Cluster, error)
func GetConfigMapData ¶
func GetConfigMapData(ctx context.Context, client ctrlruntimeclient.Client, namespace string, ref *corev1.ConfigMapKeySelector) (string, error)
func GetNotificationSink ¶
func GetNotificationSink(ctx context.Context, client ctrlruntimeclient.Client, ref *corev1.ObjectReference) (*v1alpha1.NotificationSink, error)
func GetPrAutomation ¶
func GetPrAutomation(ctx context.Context, client ctrlruntimeclient.Client, ref *corev1.ObjectReference) (*v1alpha1.PrAutomation, error)
func GetSecret ¶
func GetSecret(ctx context.Context, client ctrlruntimeclient.Client, ref *corev1.SecretReference) (*corev1.Secret, error)
func GetServiceDeployment ¶
func GetServiceDeployment(ctx context.Context, client ctrlruntimeclient.Client, ref *corev1.ObjectReference) (*v1alpha1.ServiceDeployment, error)
func HashObject ¶
func HashString ¶
func MarkCondition ¶
func MarkCondition(set func(condition metav1.Condition), conditionType v1alpha1.ConditionType, conditionStatus metav1.ConditionStatus, conditionReason v1alpha1.ConditionReason, message string)
func MarkFalse ¶
func MarkFalse(set func(metav1.Condition), conditionType v1alpha1.ConditionType, conditionReason v1alpha1.ConditionReason, message string)
func MarkTrue ¶
func MarkTrue(set func(metav1.Condition), conditionType v1alpha1.ConditionType, conditionReason v1alpha1.ConditionReason, message string)
func RemoveFinalizer ¶
RemoveFinalizer removes the given finalizers from the object.
func SyncCondition ¶
func TryAddControllerRef ¶
func TryAddControllerRef(ctx context.Context, client ctrlruntimeclient.Client, owner ctrlruntimeclient.Object, controlled ctrlruntimeclient.Object, scheme *runtime.Scheme) error
func TryAddFinalizer ¶
func TryAddFinalizer(ctx context.Context, client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object, finalizers ...string) error
func TryAddOwnerRef ¶
func TryAddOwnerRef(ctx context.Context, client ctrlruntimeclient.Client, owner ctrlruntimeclient.Object, object ctrlruntimeclient.Object, scheme *runtime.Scheme) error
func TryRemoveFinalizer ¶
func TryRemoveFinalizer(ctx context.Context, client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object, finalizers ...string) error
func TryUpdateStatus ¶
func TryUpdateStatus[PatchObject ctrlruntimeclient.Object](ctx context.Context, client ctrlruntimeclient.Client, object PatchObject, patch Patcher[PatchObject]) error
TryUpdateStatus TODO ...
Types ¶
type ConsoleHelper ¶
type ConsoleHelper struct {
// contains filtered or unexported fields
}
func NewConsoleHelper ¶
func NewConsoleHelper(ctx context.Context, client client.ConsoleClient, k8sClient k8sclient.Client) *ConsoleHelper
func (*ConsoleHelper) IDFromRef ¶
func (in *ConsoleHelper) IDFromRef(ref *v1.ObjectReference, resource v1alpha1.PluralResource) (*string, error)
Click to show internal directories.
Click to hide internal directories.