Documentation
¶
Index ¶
- func DeduceAnonymousReportsEnabled(anonymousReportsEnabled bool, cpOpts *operatorv1beta1.ControlPlaneOptions) bool
- func GenerateImage(opts *operatorv1beta1.ControlPlaneOptions, ...) (string, error)
- func GetCPForRef(ctx context.Context, cl client.Client, cpRef commonv1alpha1.ControlPlaneRef, ...) (*konnectv1alpha1.KonnectGatewayControlPlane, error)
- func GetControlPlaneRef[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]](e TEnt) mo.Option[commonv1alpha1.ControlPlaneRef]
- func SetDefaults(spec *operatorv1beta1.ControlPlaneOptions, args DefaultsArgs) bool
- func SpecDeepEqual(spec1, spec2 *operatorv1beta1.ControlPlaneOptions, envVarsToIgnore ...string) bool
- type DefaultsArgs
- type ReferencedControlPlaneDoesNotExistError
- type ReferencedKongGatewayControlPlaneIsUnsupported
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeduceAnonymousReportsEnabled ¶
func DeduceAnonymousReportsEnabled(anonymousReportsEnabled bool, cpOpts *operatorv1beta1.ControlPlaneOptions) bool
DeduceAnonymousReportsEnabled returns the value of the anonymous reports enabled based on the environment variable `CONTROLLER_ANONYMOUS_REPORTS` in the control plane pod template spec and operator development mode setting.
This allows users to override the setting that is a derivative of the operator development mode using the environment variable `CONTROLLER_ANONYMOUS_REPORTS` in the control plane pod template spec.
func GenerateImage ¶
func GenerateImage(opts *operatorv1beta1.ControlPlaneOptions, validators ...versions.VersionValidationOption) (string, error)
GenerateImage returns the image to use for the control plane.
func GetCPForRef ¶ added in v1.6.0
func GetCPForRef( ctx context.Context, cl client.Client, cpRef commonv1alpha1.ControlPlaneRef, namespace string, ) (*konnectv1alpha1.KonnectGatewayControlPlane, error)
GetCPForRef returns the KonnectGatewayControlPlane for the given ControlPlaneRef.
func GetControlPlaneRef ¶ added in v1.6.0
func GetControlPlaneRef[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]]( e TEnt, ) mo.Option[commonv1alpha1.ControlPlaneRef]
GetControlPlaneRef returns the ControlPlaneRef for the given entity.
func SetDefaults ¶
func SetDefaults( spec *operatorv1beta1.ControlPlaneOptions, args DefaultsArgs, ) bool
SetDefaults updates the environment variables of control plane and returns true if env field is changed.
func SpecDeepEqual ¶
func SpecDeepEqual(spec1, spec2 *operatorv1beta1.ControlPlaneOptions, envVarsToIgnore ...string) bool
SpecDeepEqual returns true if the two ControlPlaneOptions are equal.
Types ¶
type DefaultsArgs ¶
type DefaultsArgs struct { Namespace string ControlPlaneName string DataPlaneIngressServiceName string DataPlaneAdminServiceName string OwnedByGateway string AnonymousReportsEnabled bool }
DefaultsArgs contains the parameters to pass to setControlPlaneDefaults
type ReferencedControlPlaneDoesNotExistError ¶ added in v1.6.0
type ReferencedControlPlaneDoesNotExistError struct { Reference commonv1alpha1.ControlPlaneRef Err error }
ReferencedControlPlaneDoesNotExistError is an error type that is returned when a Konnect entity references a KonnectGatewayControlPlane that does not exist.
func (ReferencedControlPlaneDoesNotExistError) Error ¶ added in v1.6.0
func (e ReferencedControlPlaneDoesNotExistError) Error() string
Error implements the error interface.
func (ReferencedControlPlaneDoesNotExistError) Unwrap ¶ added in v1.6.0
func (e ReferencedControlPlaneDoesNotExistError) Unwrap() error
Unwrap returns the underlying error.
type ReferencedKongGatewayControlPlaneIsUnsupported ¶ added in v1.6.0
type ReferencedKongGatewayControlPlaneIsUnsupported struct {
Reference commonv1alpha1.ControlPlaneRef
}
ReferencedKongGatewayControlPlaneIsUnsupported is an error type that is returned when a given CP reference type is not supported.
func (ReferencedKongGatewayControlPlaneIsUnsupported) Error ¶ added in v1.6.0
func (e ReferencedKongGatewayControlPlaneIsUnsupported) Error() string