Documentation ¶
Index ¶
- Constants
- func HTTPRouteID(namespacedName types.NamespacedName) string
- func NewBinder(client gatewayclient.Client) *binder
- func TCPRouteID(namespacedName types.NamespacedName) string
- type DeployerConfig
- type GatewayDeployer
- func (d *GatewayDeployer) Deploy(ctx context.Context, gateway *K8sGateway) error
- func (d *GatewayDeployer) Deployment(namespace string, config apigwv1alpha1.GatewayClassConfig, ...) *apps.Deployment
- func (d *GatewayDeployer) Service(config apigwv1alpha1.GatewayClassConfig, gateway *gwv1beta1.Gateway) *core.Service
- type GatewayReconcileManager
- func (m *GatewayReconcileManager) DeleteGateway(ctx context.Context, name types.NamespacedName) error
- func (m *GatewayReconcileManager) DeleteGatewayClass(ctx context.Context, name string) error
- func (m *GatewayReconcileManager) DeleteHTTPRoute(ctx context.Context, name types.NamespacedName) error
- func (m *GatewayReconcileManager) DeleteTCPRoute(ctx context.Context, name types.NamespacedName) error
- func (m *GatewayReconcileManager) UpsertGateway(ctx context.Context, g *gwv1beta1.Gateway) error
- func (m *GatewayReconcileManager) UpsertGatewayClass(ctx context.Context, gc *gwv1beta1.GatewayClass) error
- func (m *GatewayReconcileManager) UpsertHTTPRoute(ctx context.Context, r *gwv1alpha2.HTTPRoute) error
- func (m *GatewayReconcileManager) UpsertTCPRoute(ctx context.Context, r *gwv1alpha2.TCPRoute) error
- type K8sGateway
- type K8sGatewayClass
- type K8sGatewayClassConfig
- type K8sGatewayClasses
- type K8sRoute
- type K8sRouteConfig
- type ManagerConfig
- type Marshaler
- type ReconcileManager
- type Route
- type StatusUpdater
Constants ¶
View Source
const (
// NamespaceNameLabel represents that label added automatically to namespaces is newer Kubernetes clusters
NamespaceNameLabel = "kubernetes.io/metadata.name"
)
Variables ¶
This section is empty.
Functions ¶
func HTTPRouteID ¶
func HTTPRouteID(namespacedName types.NamespacedName) string
func NewBinder ¶ added in v0.5.0
func NewBinder(client gatewayclient.Client) *binder
func TCPRouteID ¶
func TCPRouteID(namespacedName types.NamespacedName) string
Types ¶
type DeployerConfig ¶ added in v0.5.0
type GatewayDeployer ¶ added in v0.5.0
type GatewayDeployer struct {
// contains filtered or unexported fields
}
GatewayDeployer creates gateway deployments and services and ensures that they exist
func NewDeployer ¶ added in v0.5.0
func NewDeployer(config DeployerConfig) *GatewayDeployer
func (*GatewayDeployer) Deploy ¶ added in v0.5.0
func (d *GatewayDeployer) Deploy(ctx context.Context, gateway *K8sGateway) error
func (*GatewayDeployer) Deployment ¶ added in v0.5.0
func (d *GatewayDeployer) Deployment(namespace string, config apigwv1alpha1.GatewayClassConfig, gateway *gwv1beta1.Gateway, currentReplicas *int32) *apps.Deployment
func (*GatewayDeployer) Service ¶ added in v0.5.0
func (d *GatewayDeployer) Service(config apigwv1alpha1.GatewayClassConfig, gateway *gwv1beta1.Gateway) *core.Service
type GatewayReconcileManager ¶
type GatewayReconcileManager struct {
// contains filtered or unexported fields
}
GatewayReconcileManager manages a GatewayReconciler for each Gateway and is the interface by which Consul operations should be invoked in a kubernetes controller.
func NewReconcileManager ¶
func NewReconcileManager(config ManagerConfig) *GatewayReconcileManager
func (*GatewayReconcileManager) DeleteGateway ¶
func (m *GatewayReconcileManager) DeleteGateway(ctx context.Context, name types.NamespacedName) error
func (*GatewayReconcileManager) DeleteGatewayClass ¶
func (m *GatewayReconcileManager) DeleteGatewayClass(ctx context.Context, name string) error
func (*GatewayReconcileManager) DeleteHTTPRoute ¶
func (m *GatewayReconcileManager) DeleteHTTPRoute(ctx context.Context, name types.NamespacedName) error
func (*GatewayReconcileManager) DeleteTCPRoute ¶
func (m *GatewayReconcileManager) DeleteTCPRoute(ctx context.Context, name types.NamespacedName) error
func (*GatewayReconcileManager) UpsertGateway ¶
func (*GatewayReconcileManager) UpsertGatewayClass ¶
func (m *GatewayReconcileManager) UpsertGatewayClass(ctx context.Context, gc *gwv1beta1.GatewayClass) error
func (*GatewayReconcileManager) UpsertHTTPRoute ¶
func (m *GatewayReconcileManager) UpsertHTTPRoute(ctx context.Context, r *gwv1alpha2.HTTPRoute) error
func (*GatewayReconcileManager) UpsertTCPRoute ¶
func (m *GatewayReconcileManager) UpsertTCPRoute(ctx context.Context, r *gwv1alpha2.TCPRoute) error
type K8sGateway ¶
type K8sGateway struct { *gwv1beta1.Gateway GatewayState *state.GatewayState Config apigwv1alpha1.GatewayClassConfig }
func (*K8sGateway) CanFetchSecrets ¶ added in v0.5.0
func (g *K8sGateway) CanFetchSecrets(secrets []string) (bool, error)
func (*K8sGateway) ID ¶
func (g *K8sGateway) ID() core.GatewayID
func (*K8sGateway) Resolve ¶ added in v0.5.0
func (g *K8sGateway) Resolve() core.ResolvedGateway
type K8sGatewayClass ¶
type K8sGatewayClass struct {
// contains filtered or unexported fields
}
func NewK8sGatewayClass ¶
func NewK8sGatewayClass(class *gwv1beta1.GatewayClass, config K8sGatewayClassConfig) *K8sGatewayClass
func (*K8sGatewayClass) IsValid ¶
func (c *K8sGatewayClass) IsValid() bool
func (*K8sGatewayClass) SyncStatus ¶
func (c *K8sGatewayClass) SyncStatus(ctx context.Context) error
type K8sGatewayClassConfig ¶
type K8sGatewayClassConfig struct { Logger hclog.Logger Client gatewayclient.Client }
type K8sGatewayClasses ¶
type K8sGatewayClasses struct {
// contains filtered or unexported fields
}
func NewK8sGatewayClasses ¶
func NewK8sGatewayClasses(logger hclog.Logger, client gatewayclient.Client) *K8sGatewayClasses
func (*K8sGatewayClasses) Delete ¶
func (g *K8sGatewayClasses) Delete(name string)
func (*K8sGatewayClasses) GetConfig ¶
func (g *K8sGatewayClasses) GetConfig(name string) (apigwv1alpha1.GatewayClassConfig, bool)
func (*K8sGatewayClasses) Upsert ¶
func (g *K8sGatewayClasses) Upsert(ctx context.Context, class *K8sGatewayClass) error
type K8sRoute ¶
type K8sRoute struct { Route RouteState *state.RouteState }
func (K8sRoute) MarshalJSON ¶ added in v0.5.0
func (*K8sRoute) UnmarshalJSON ¶ added in v0.5.0
type K8sRouteConfig ¶
type K8sRouteConfig struct { ControllerName string Client gatewayclient.Client State *state.RouteState }
type ManagerConfig ¶
type Marshaler ¶ added in v0.5.0
type Marshaler struct{}
func NewMarshaler ¶ added in v0.5.0
func NewMarshaler() *Marshaler
func (*Marshaler) MarshalGateway ¶ added in v0.5.0
func (*Marshaler) MarshalRoute ¶ added in v0.5.0
func (*Marshaler) UnmarshalGateway ¶ added in v0.5.0
type ReconcileManager ¶
type ReconcileManager interface { UpsertGatewayClass(ctx context.Context, gc *gwv1beta1.GatewayClass) error UpsertGateway(ctx context.Context, g *gwv1beta1.Gateway) error UpsertHTTPRoute(ctx context.Context, r *gwv1alpha2.HTTPRoute) error UpsertTCPRoute(ctx context.Context, r *gwv1alpha2.TCPRoute) error DeleteGatewayClass(ctx context.Context, name string) error DeleteGateway(ctx context.Context, name types.NamespacedName) error DeleteHTTPRoute(ctx context.Context, name types.NamespacedName) error DeleteTCPRoute(ctx context.Context, name types.NamespacedName) error }
type Route ¶
type Route interface { client.Object schema.ObjectKind }
Route represents any Kubernetes route type - currently v1alpha2.HTTPRoute and v1alpha2.TCPRoute - as both implement client.Object and schema.ObjectKind
type StatusUpdater ¶ added in v0.5.0
type StatusUpdater struct {
// contains filtered or unexported fields
}
func NewStatusUpdater ¶ added in v0.5.0
func NewStatusUpdater(logger hclog.Logger, client gatewayclient.Client, deployer *GatewayDeployer, controllerName string) *StatusUpdater
func (*StatusUpdater) UpdateGatewayStatusOnSync ¶ added in v0.5.0
func (*StatusUpdater) UpdateRouteStatus ¶ added in v0.5.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.