provisioner

package
v2.0.0-...-aa1bc06 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Overview

Package provisioner contains the functions for deploying an instance of nginx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentLabelCollector

type AgentLabelCollector interface {
	Collect(ctx context.Context) (map[string]string, error)
}

type Config

type Config struct {
	DeploymentStore                agent.DeploymentStorer
	EventRecorder                  record.EventRecorder
	PlusUsageConfig                *config.UsageReportConfig
	StatusQueue                    *status.Queue
	GatewayPodConfig               *config.GatewayPodConfig
	AgentLabels                    map[string]string
	Logger                         logr.Logger
	NGINXSCCName                   string
	GCName                         string
	AgentTLSSecretName             string
	NginxDockerSecretNames         []string
	NginxOneConsoleTelemetryConfig config.NginxOneConsoleTelemetryConfig
	Plus                           bool
}

Config is the configuration for the Provisioner.

type NginxProvisioner

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

NginxProvisioner handles provisioning nginx kubernetes resources.

func NewNginxProvisioner

func NewNginxProvisioner(
	ctx context.Context,
	mgr manager.Manager,
	cfg Config,
) (*NginxProvisioner, *events.EventLoop, error)

NewNginxProvisioner returns a new instance of a Provisioner that will deploy nginx resources.

func (*NginxProvisioner) Enable

func (p *NginxProvisioner) Enable(ctx context.Context)

Enable is called when the Pod becomes leader and allows the provisioner to manage resources.

func (*NginxProvisioner) RegisterGateway

func (p *NginxProvisioner) RegisterGateway(
	ctx context.Context,
	gateway *graph.Gateway,
	resourceName string,
) error

RegisterGateway is called by the main event handler when a Gateway API resource event occurs and the graph is built. The provisioner updates the Gateway config in the store and then: - If it's a valid Gateway, create or update nginx resources associated with the Gateway, if necessary. - If it's an invalid Gateway, delete the associated nginx resources.

type NginxResources

type NginxResources struct {
	Gateway             *graph.Gateway
	Deployment          metav1.ObjectMeta
	HPA                 metav1.ObjectMeta
	DaemonSet           metav1.ObjectMeta
	Service             metav1.ObjectMeta
	ServiceAccount      metav1.ObjectMeta
	Role                metav1.ObjectMeta
	RoleBinding         metav1.ObjectMeta
	BootstrapConfigMap  metav1.ObjectMeta
	AgentConfigMap      metav1.ObjectMeta
	AgentTLSSecret      metav1.ObjectMeta
	PlusJWTSecret       metav1.ObjectMeta
	PlusClientSSLSecret metav1.ObjectMeta
	PlusCASecret        metav1.ObjectMeta
	DataplaneKeySecret  metav1.ObjectMeta
	DockerSecrets       []metav1.ObjectMeta
}

NginxResources are all of the NGINX resources deployed in relation to a Gateway.

type Provisioner

type Provisioner interface {
	RegisterGateway(ctx context.Context, gateway *graph.Gateway, resourceName string) error
}

Provisioner is an interface for triggering NGINX resources to be created/updated/deleted.

Directories

Path Synopsis
openshiftfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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