store

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 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"`
	AcmeDNSProvider       string         `json:"acmeDNSProvider,omitempty"`
	AcmeDNSResolvers      string         `json:"acmeDNSResolvers,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"`
	PermissionEndpoint    string         `json:"permissionEndpoint,omitempty"`
	OCSPCheckInterval     caddy.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
	Ingresses          []*v1.Ingress
	ConfigMap          *ConfigMapOptions
	ConfigNamespace    string
	CurrentPod         *PodInfo
	DomainNamespaceMap map[string]string `json:"domainNamespaceMap,omitempty"`
}

Store contains resources used to generate Caddy config

func NewStore

func NewStore(opts Options, configNamespace string, 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