webconfig

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config is the web configuration for prometheus and alertmanager instance.

Config can make a secret which holds the web config contents, as well as volumes and volume mounts for referencing the secret and the necessary TLS files.

func New

func New(mountingDir string, secretName string, configFileFields monitoringv1.WebConfigFileFields) (*Config, error)

New creates a new Config.

func (Config) CreateOrUpdateWebConfigSecret added in v0.58.0

func (c Config) CreateOrUpdateWebConfigSecret(ctx context.Context, secretClient clientv1.SecretInterface, s *v1.Secret) error

CreateOrUpdateWebConfigSecret create or update a Kubernetes secret with the data for the web config file. The format of the web config file is available in the official prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/https/#https-and-authentication

func (Config) GetMountParameters

func (c Config) GetMountParameters() (monitoringv1.Argument, []v1.Volume, []v1.VolumeMount, error)

GetMountParameters returns volumes and volume mounts referencing the config file and the associated TLS files. In addition, GetMountParameters returns a web.config.file command line option pointing to the file in the volume mount.

type TLSReferences added in v0.81.0

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

TLSReferences represent TLS material referenced from secrets/configmaps.

func NewTLSReferences added in v0.81.0

func NewTLSReferences(mountPath string, keySecret corev1.SecretKeySelector, cert, clientCA monitoringv1.SecretOrConfigMap) *TLSReferences

func (*TLSReferences) GetCAFilename added in v0.81.0

func (tr *TLSReferences) GetCAFilename() string

GetCAFilename retruns the filename (key) of the client CA certificate.

func (*TLSReferences) GetCAMountPath added in v0.81.0

func (tr *TLSReferences) GetCAMountPath() string

GetCAMountPath is the mount path of the client CA certificate inside a prometheus container.

func (*TLSReferences) GetCertFilename added in v0.81.0

func (tr *TLSReferences) GetCertFilename() string

GetCertFilename returns the filename (key) of the certificate.

func (*TLSReferences) GetCertMountPath added in v0.81.0

func (tr *TLSReferences) GetCertMountPath() string

GetCertMountPath is the mount path of the TLS certificate inside a prometheus container,.

func (*TLSReferences) GetKeyFilename added in v0.81.0

func (tr *TLSReferences) GetKeyFilename() string

GetKeyFilename returns the filename of the private key.

func (*TLSReferences) GetKeyMountPath added in v0.81.0

func (tr *TLSReferences) GetKeyMountPath() string

GetKeyMountPath is the mount path of the TLS key inside a prometheus container.

func (*TLSReferences) GetMountParameters added in v0.81.0

func (tr *TLSReferences) GetMountParameters(volumePrefix string) ([]corev1.Volume, []corev1.VolumeMount, error)

GetMountParameters creates volumes and volume mounts referencing the TLS credentials.

Jump to

Keyboard shortcuts

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