Documentation
¶
Index ¶
- func AdaptPodDisruptionBudget() option
- func DisableIfAnnotationExist(annotation string) option
- func EnableForPlatform(platform hyperv1.PlatformType) option
- 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 WorkloadContext, resource T) error) option
- func WithPredicate(predicate Predicate) option
- type ComponentOptions
- type ControlPlaneComponent
- type ControlPlaneContext
- type HTTPSOptions
- type KonnectivityContainerOptions
- type NamedComponent
- type Predicate
- type ProxyMode
- type Socks5Options
- type WorkloadContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptPodDisruptionBudget ¶ added in v0.1.51
func AdaptPodDisruptionBudget() option
func DisableIfAnnotationExist ¶
func DisableIfAnnotationExist(annotation string) option
DisableIfAnnotationExist is a helper predicate for the common use case of disabling a resource when an annotation exists.
func EnableForPlatform ¶ added in v0.1.51
func EnableForPlatform(platform hyperv1.PlatformType) option
EnableForPlatform is a helper predicate for the common use case of only enabling a resource for a specific platform.
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 WorkloadContext, 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 ImageMetadataProvider util.ImageMetadataProvider InfraStatus infra.InfrastructureStatus SetDefaultSecurityContext bool EnableCIDebugOutput 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 HTTPSOptions ¶ added in v0.1.52
type HTTPSOptions struct { // KonnectivityHost is the host name of the Konnectivity server proxy. KonnectivityHost string // KonnectivityPort is the port of the Konnectivity server proxy. KonnectivityPort uint32 // The port that https proxy should serve on. ServingPort uint32 // ConnectDirectlyToCloudAPIs specifies whether cloud APIs should be bypassed // by the proxy. This is used by the ingress operator to be able to create DNS records // before worker nodes are present in the cluster. // See https://github.com/openshift/hypershift/pull/1601 ConnectDirectlyToCloudAPIs *bool }
type KonnectivityContainerOptions ¶
type KonnectivityContainerOptions struct { Mode ProxyMode // defaults to 'kubeconfig' KubeconfingVolumeName string HTTPSOptions HTTPSOptions Socks5Options Socks5Options }
type NamedComponent ¶
type NamedComponent interface {
Name() string
}
type Predicate ¶
type Predicate func(cpContext WorkloadContext) bool
type Socks5Options ¶ added in v0.1.52
type Socks5Options struct { // KonnectivityHost is the host name of the Konnectivity server proxy. KonnectivityHost string // KonnectivityPort is the port of the Konnectivity server proxy. KonnectivityPort uint32 // The port that socks5 proxy should serve on. ServingPort uint32 // ConnectDirectlyToCloudAPIs specifies whether cloud APIs should be bypassed // by the proxy. This is used by the ingress operator to be able to create DNS records // before worker nodes are present in the cluster. // See https://github.com/openshift/hypershift/pull/1601 ConnectDirectlyToCloudAPIs *bool // ResolveFromManagementClusterDNS tells the dialer to fallback to the management // cluster's DNS (and direct dialer) initially until the konnectivity tunnel is available. // Once the konnectivity tunnel is available, it no longer falls back on the management // cluster. This is used by the OAuth server to allow quicker initialization of identity // providers while worker nodes have not joined. // See https://github.com/openshift/hypershift/pull/2261 ResolveFromManagementClusterDNS *bool // ResolveFromGuestClusterDNS tells the dialer to resolve names using the guest // cluster's coreDNS service. Used by oauth and ingress operator. ResolveFromGuestClusterDNS *bool // DisableResolver disables any name resolution by the resolver. This is used by the CNO. // See https://github.com/openshift/hypershift/pull/3986 DisableResolver *bool }
type WorkloadContext ¶ added in v0.1.53
type WorkloadContext struct { context.Context // reader client, as workloads should not be creating resources. Client client.Reader HCP *hyperv1.HostedControlPlane ReleaseImageProvider imageprovider.ReleaseImageProvider UserReleaseImageProvider imageprovider.ReleaseImageProvider ImageMetadataProvider util.ImageMetadataProvider InfraStatus infra.InfrastructureStatus SetDefaultSecurityContext bool EnableCIDebugOutput bool MetricsSet metrics.MetricsSet }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.