webconfig

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 6 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 a prometheus 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, tlsConfig *monitoringv1.WebTLSConfig) (*Config, error)

New creates a new Config.

func (Config) GetMountParameters

func (c Config) GetMountParameters() (string, []v1.Volume, []v1.VolumeMount)

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.

func (*Config) MakeConfigFileSecret

func (c *Config) MakeConfigFileSecret(labels map[string]string, ownerReference metav1.OwnerReference) (*v1.Secret, error)

MakeConfigFileSecret returns 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

Jump to

Keyboard shortcuts

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