controllers

package
v1.13.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 44 Imported by: 0

Documentation

Overview

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	APIFinalizer = "gateway.kusk.io/apifinalizer"
)
View Source
const (
	StaticRouteFinalizer = "gateway.kusk.io/srfinalizer"
)

Variables

This section is empty.

Functions

func UpdateConfigFromAPIOpts

func UpdateConfigFromAPIOpts(
	envoyConfiguration *config.EnvoyConfiguration,
	proxy validation.ValidationUpdater,
	opts *options.Options,
	spec *openapi3.T,
	httpConnectionManagerBuilder *config.HCMBuilder,
	clBuilder *cloudentity.Builder,
	name string,
	kubernetesClient client.Client,
) error

UpdateConfigFromAPIOpts updates Envoy configuration from OpenAPI spec and x-kusk options

func UpdateConfigFromOpts

func UpdateConfigFromOpts(envoyConfiguration *config.EnvoyConfiguration, opts *options.StaticOptions) error

UpdateConfigFromOpts updates Envoy configuration from Options only

Types

type APIReconciler

type APIReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	ConfigManager *KubeEnvoyConfigManager
}

APIReconciler reconciles a API object

func (*APIReconciler) Reconcile

func (r *APIReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*APIReconciler) SetupWithManager

func (r *APIReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type EnvoyFleetReconciler

type EnvoyFleetReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	ConfigManager *KubeEnvoyConfigManager
}

EnvoyFleetReconciler reconciles a EnvoyFleet object

func (*EnvoyFleetReconciler) Reconcile

func (r *EnvoyFleetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*EnvoyFleetReconciler) SetupWithManager

func (r *EnvoyFleetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type EnvoyFleetResources

type EnvoyFleetResources struct {
	// contains filtered or unexported fields
}

EnvoyFleetResources is a collection of related Envoy Fleet K8s resources

func NewEnvoyFleetResources

func NewEnvoyFleetResources(ctx context.Context, client client.Client, ef *gateway.EnvoyFleet) (*EnvoyFleetResources, error)

func (*EnvoyFleetResources) CreateOrUpdate

func (e *EnvoyFleetResources) CreateOrUpdate(ctx context.Context) error

type HostPortPair added in v1.2.4

type HostPortPair struct {
	Host string
	Port uint32
}

type KubeEnvoyConfigManager

type KubeEnvoyConfigManager struct {
	client.Client
	Scheme       *runtime.Scheme
	EnvoyManager *manager.EnvoyConfigManager
	Validator    validation.ValidationUpdater

	WatchedSecretsChan chan *v1.Secret
	SecretToEnvoyFleet map[string]gateway.EnvoyFleetID
	OpenApiParser      spec.Parser
	// contains filtered or unexported fields
}

KubeEnvoyConfigManager manages all Envoy configurations parsing from CRDs

func (*KubeEnvoyConfigManager) UpdateConfiguration

func (c *KubeEnvoyConfigManager) UpdateConfiguration(ctx context.Context, fleetID gateway.EnvoyFleetID) error

UpdateConfiguration is the main method to gather all routing configs and to create and apply Envoy config

func (*KubeEnvoyConfigManager) WatchSecrets

func (c *KubeEnvoyConfigManager) WatchSecrets(stopCh <-chan struct{})

type StaticRouteReconciler

type StaticRouteReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	ConfigManager *KubeEnvoyConfigManager
}

StaticRouteReconciler reconciles a StaticRoute object

func (*StaticRouteReconciler) Reconcile

func (r *StaticRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile

func (*StaticRouteReconciler) SetupWithManager

func (r *StaticRouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL