store

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapOptions

type ConfigMapOptions struct {
	Debug                     bool             `json:"debug,omitempty"`
	AcmeCA                    string           `json:"acmeCA,omitempty"`
	AcmeEABKeyId              string           `json:"acmeEABKeyId,omitempty"`
	AcmeEABMacKey             string           `json:"acmeEABMacKey,omitempty"`
	Email                     string           `json:"email,omitempty"`
	ExperimentalSmartSort     bool             `json:"experimentalSmartSort,omitempty"`
	ProxyProtocol             bool             `json:"proxyProtocol,omitempty"`
	Metrics                   bool             `json:"metrics,omitempty"`
	OnDemandTLS               bool             `json:"onDemandTLS,omitempty"`
	OnDemandRateLimitInterval kengine.Duration `json:"onDemandRateLimitInterval,omitempty"`
	OnDemandRateLimitBurst    int              `json:"onDemandRateLimitBurst,omitempty"`
	OnDemandAsk               string           `json:"onDemandAsk,omitempty"`
	OCSPCheckInterval         kengine.Duration `json:"ocspCheckInterval,omitempty"`
}

ConfigMapOptions represents global options set through a configmap

func ParseConfigMap

func ParseConfigMap(cm *apiv1.ConfigMap) (*ConfigMapOptions, error)

type Options

type Options struct {
	WatchNamespace    string
	ConfigMapName     string
	ClassName         string
	ClassNameRequired bool
	Verbose           bool
	LeaseId           string
	PluginsOrder      []string
}

Options represents ingress controller config received through cli arguments.

type PodInfo

type PodInfo struct {
	Name      string
	Namespace string
	// Labels selectors of the running pod
	// This is used to search for other Ingress controller pods
	Labels map[string]string
}

PodInfo contains runtime information about the pod running the Ingress controller

type Store

type Store struct {
	Options    *Options
	ConfigMap  *ConfigMapOptions
	Ingresses  []*v1.Ingress
	CurrentPod *PodInfo
}

Store contains resources used to generate Kengine config

func NewStore

func NewStore(opts Options, podInfo *PodInfo) *Store

NewStore returns a new store that keeps track of K8S resources needed by the controller.

func (*Store) AddIngress

func (s *Store) AddIngress(ing *v1.Ingress)

AddIngress adds an ingress to the store. It updates the element at the given index if it is unique.

func (*Store) HasManagedTLS

func (s *Store) HasManagedTLS() bool

func (*Store) PluckIngress

func (s *Store) PluckIngress(ing *v1.Ingress)

PluckIngress removes the ingress passed in as an argument from the stores list of ingresses.

Jump to

Keyboard shortcuts

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