deployer

package
v1.17.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetGatewayParametersError = eris.New("could not retrieve GatewayParameters")

	NilDeployerInputsErr = eris.New("nil inputs to NewDeployer")
)
View Source
var (
	ComponentLogLevelEmptyError = func(key string, value string) error {
		return eris.Errorf("an empty key or value was provided in componentLogLevels: key=%s, value=%s", key, value)
	}
)

Functions

func ComponentLogLevelsToString

func ComponentLogLevelsToString(vals map[string]string) (string, error)

ComponentLogLevelsToString converts the key-value pairs in the map into a string of the format: key1:value1,key2:value2,key3:value3, where the keys are sorted alphabetically. If an empty map is passed in, then an empty string is returned. Map keys and values may not be empty. No other validation is currently done on the keys/values.

func ConvertYAMLToObjects

func ConvertYAMLToObjects(scheme *runtime.Scheme, yamlData []byte) ([]client.Object, error)

Types

type Deployer

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

A Deployer is responsible for deploying proxies

func NewDeployer

func NewDeployer(cli client.Client, inputs *Inputs) (*Deployer, error)

NewDeployer creates a new gateway deployer

func (*Deployer) DeployObjs

func (d *Deployer) DeployObjs(ctx context.Context, objs []client.Object) error

func (*Deployer) GetGvksToWatch

func (d *Deployer) GetGvksToWatch(ctx context.Context) ([]schema.GroupVersionKind, error)

GetGvksToWatch returns the list of GVKs that the deployer will watch for

func (*Deployer) GetObjsToDeploy

func (d *Deployer) GetObjsToDeploy(ctx context.Context, gw *api.Gateway) ([]client.Object, error)

GetObjsToDeploy does the following:

* performs GatewayParameters lookup/merging etc to get a final set of helm values

* use those helm values to render the internal `gloo-gateway` helm chart into k8s objects

* sets ownerRefs on all generated objects

* returns the objects to be deployed by the caller

func (*Deployer) Render

func (d *Deployer) Render(name, ns string, vals map[string]any) ([]client.Object, error)

Render relies on a `helm install` to render the Chart with the injected values It returns the list of Objects that are rendered, and an optional error if rendering failed, or converting the rendered manifests to objects failed.

type Inputs

type Inputs struct {
	ControllerName string
	Dev            bool
	IstioValues    bootstrap.IstioValues
	ControlPlane   bootstrap.ControlPlane
}

Inputs is the set of options used to configure the gateway deployer deployment

Jump to

Keyboard shortcuts

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