Documentation
¶
Index ¶
- func NewDeploymentComponent(name string, opts ComponentOptions) *controlPlaneWorkloadBuilder[*appsv1.Deployment]
- func NewStatefulSetComponent(name string, opts ComponentOptions) *controlPlaneWorkloadBuilder[*appsv1.StatefulSet]
- func WithAdaptFunction[T client.Object](adapt func(cpContext ControlPlaneContext, resource T) error) option
- func WithPredicate(predicate Predicate) option
- type ComponentOptions
- type ControlPlaneComponent
- type ControlPlaneContext
- type KonnectivityContainerOptions
- type NamedComponent
- type Predicate
- type ProxyMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeploymentComponent ¶
func NewDeploymentComponent(name string, opts ComponentOptions) *controlPlaneWorkloadBuilder[*appsv1.Deployment]
func NewStatefulSetComponent ¶
func NewStatefulSetComponent(name string, opts ComponentOptions) *controlPlaneWorkloadBuilder[*appsv1.StatefulSet]
func WithAdaptFunction ¶
func WithAdaptFunction[T client.Object](adapt func(cpContext ControlPlaneContext, resource T) error) option
func WithPredicate ¶
func WithPredicate(predicate Predicate) option
Types ¶
type ComponentOptions ¶
type ControlPlaneComponent ¶
type ControlPlaneComponent interface {
NamedComponent
Reconcile(cpContext ControlPlaneContext) error
}
type ControlPlaneContext ¶
type ControlPlaneContext struct {
context.Context
upsert.CreateOrUpdateProviderV2
Client client.Client
HCP *hyperv1.HostedControlPlane
ReleaseImageProvider imageprovider.ReleaseImageProvider
UserReleaseImageProvider imageprovider.ReleaseImageProvider
SetDefaultSecurityContext bool
MetricsSet metrics.MetricsSet
// This is needed for the generic unit test, so we can always generate a fixture for the components deployment/statefulset.
SkipPredicate bool
}
type NamedComponent ¶
type NamedComponent interface {
Name() string
}
type Predicate ¶
type Predicate func(cpContext ControlPlaneContext) bool
func DisableIfAnnotationExist ¶
DisableIfAnnotationExist is a helper predicte for the common use case of disabling a resource when an annotation exists.
Click to show internal directories.
Click to hide internal directories.