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 ¶
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