webconfig

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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 credentials.

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 credentials. In addition, GetMountParameters returns a web.config.file command line option pointing to the file in the volume mount.

Jump to

Keyboard shortcuts

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