config

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Certificate controller depends.

Index

Constants

View Source
const (

	// CertManagerConfigName is the name of the configmap containing all
	// configuration related to Cert-Manager.
	CertManagerConfigName = "config-certmanager"

	DefaultCommonNameTemplate = "k.{{.Domain}}"
)

Variables

This section is empty.

Functions

func ToContext

func ToContext(ctx context.Context, c *Config) context.Context

ToContext adds config to given context.

Types

type CertManagerConfig

type CertManagerConfig struct {
	IssuerRef *cmeta.ObjectReference

	//CommonNameTemplate is the gloang text template to use to generate the
	//CommonName for a Route's Certificate
	//Optional
	CommonNameTemplate string
}

CertManagerConfig contains Cert-Manager related configuration defined in the `config-certmanager` config map.

func NewCertManagerConfigFromConfigMap

func NewCertManagerConfigFromConfigMap(configMap *corev1.ConfigMap) (*CertManagerConfig, error)

NewCertManagerConfigFromConfigMap creates an CertManagerConfig from the supplied ConfigMap

func (*CertManagerConfig) DeepCopy

func (in *CertManagerConfig) DeepCopy() *CertManagerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertManagerConfig.

func (*CertManagerConfig) DeepCopyInto

func (in *CertManagerConfig) DeepCopyInto(out *CertManagerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CertManagerConfig) GetCommonNameTemplate added in v0.36.0

func (c *CertManagerConfig) GetCommonNameTemplate() *template.Template

GetDomainTemplate returns the golang Template from the config map or panics (the value is validated during CM validation and at this point guaranteed to be parseable).

type CommonNameTemplateValues added in v0.36.0

type CommonNameTemplateValues struct {
	Domain      string
	Annotations map[string]string
	Labels      map[string]string
}

CommonNametemplateValues are the available properties people can choose from in their Route's "CommonNameTemplate" golang template sting.

type Config

type Config struct {
	CertManager *CertManagerConfig
}

Config of CertManager. +k8s:deepcopy-gen=false

func FromContext

func FromContext(ctx context.Context) *Config

FromContext fetch config from context.

type Store

type Store struct {
	*configmap.UntypedStore
}

Store is configmap.UntypedStore based config store. +k8s:deepcopy-gen=false

func NewStore

func NewStore(logger configmap.Logger, onAfterStore ...func(name string, value interface{})) *Store

NewStore creates a configmap.UntypedStore based config store.

logger must be non-nil implementation of configmap.Logger (commonly used loggers conform)

onAfterStore is a variadic list of callbacks to run after the ConfigMap has been processed and stored.

See also: configmap.NewUntypedStore().

func (*Store) Load

func (s *Store) Load() *Config

Load fetches config from Store.

func (*Store) ToContext

func (s *Store) ToContext(ctx context.Context) context.Context

ToContext adds Store contents to given context.

Jump to

Keyboard shortcuts

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