Documentation
¶
Index ¶
- func Compare[T any](a, b T, ins ...CompareStack[T]) map[string]string
- func EnsureServiceAccount(ctx context.Context, client kubernetes.Interface, owner meta.OwnerReference, ...) (bool, error)
- type Action
- func EmptyDecision[T Object](ctx context.Context, current, expected DecisionObject[T]) (Action, error)
- func ReplaceChecksum[T Object](ctx context.Context, current, expected DecisionObject[T]) (Action, error)
- func UpdateChecksum[T Object](ctx context.Context, current, expected DecisionObject[T]) (Action, error)
- func UpdateOwnerReference[T Object](ctx context.Context, current, expected DecisionObject[T]) (Action, error)
- type Client
- type ClientFactory
- type CompareStack
- type Config
- type Decision
- type DecisionObject
- type Generate
- type ImmutableFields
- type Object
- type SimpleCompareStack
- type SubCompareExtract
- type Updator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureServiceAccount ¶
func EnsureServiceAccount(ctx context.Context, client kubernetes.Interface, owner meta.OwnerReference, obj *sharedApi.ServiceAccount, name, namespace string, role, clusterRole []rbac.PolicyRule) (bool, error)
Types ¶
type Action ¶
type Action int
func EmptyDecision ¶
func ReplaceChecksum ¶
func UpdateChecksum ¶
func UpdateOwnerReference ¶
type Client ¶
type Client[T Object] interface { Get(ctx context.Context, name string, options meta.GetOptions) (T, error) Update(ctx context.Context, object T, options meta.UpdateOptions) (T, error) Create(ctx context.Context, object T, options meta.CreateOptions) (T, error) Delete(ctx context.Context, name string, options meta.DeleteOptions) error }
type ClientFactory ¶
type CompareStack ¶
func FromSimpleCompareStack ¶
func FromSimpleCompareStack[T any](name string, c SimpleCompareStack[T]) CompareStack[T]
func SubCompare ¶
func SubCompare[T, X any](prefix string, extract SubCompareExtract[T, X], ins ...CompareStack[X]) CompareStack[T]
type Config ¶
type Config[T Object] struct { Events event.RecorderInstance Logger logging.Logger Factory ClientFactory[T] Kind string }
type Decision ¶
type Decision[T Object] func(ctx context.Context, current, expected DecisionObject[T]) (Action, error)
type DecisionObject ¶
type ImmutableFields ¶
func NewImmutableFields ¶
func NewImmutableFields[T Object](in ImmutableFields[T]) ImmutableFields[T]
func (ImmutableFields[T]) Evaluate ¶
func (i ImmutableFields[T]) Evaluate(ins ...CompareStack[T]) Decision[T]
type Object ¶
type Object interface { comparable meta.Object }
type SimpleCompareStack ¶
type SubCompareExtract ¶
type SubCompareExtract[T, X any] func(in T) X
type Updator ¶
type Updator[T Object] interface { OperatorUpdate(ctx context.Context, namespace string, parent meta.Object, ref **sharedApi.Object, generator Generate[T], decisions ...Decision[T]) (T, bool, error) Update(ctx context.Context, namespace string, parent meta.Object, ref **sharedApi.Object, generator Generate[T], decisions ...Decision[T]) (T, bool, error) }
func NewUpdator ¶
Click to show internal directories.
Click to hide internal directories.