assets

package
v0.37.1 Latest Latest
Warning

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

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

Documentation

Overview

Package assets contains helper types used for loading in static assets when configuring the Grafana Agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key string

Key is a path-like identifier representing a Secret or ConfigMap value. It is used for looking up values during config generation that cannot be loaded directly from a file (e.g., BasicAuth Username).

The naming convention is either:

/secrets/<namespace>/<name>/<key>

or:

/configMaps/<namespace>/<name>/<key>

Resources associated with a key should be watched for changes and trigger a reconcile when modified.

func KeyForConfigMap

func KeyForConfigMap(namespace string, sel *v1.ConfigMapKeySelector) Key

KeyForConfigMap returns the key for a given namespace and a config map key selector.

func KeyForSecret

func KeyForSecret(namespace string, sel *v1.SecretKeySelector) Key

KeyForSecret returns the key for a given namespace and a secret key selector.

func KeyForSelector

func KeyForSelector(namespace string, sel *prom_v1.SecretOrConfigMap) Key

KeyForSelector retrieves the key for a SecretOrConfigMap.

type SecretStore

type SecretStore map[Key]string

SecretStore is an in-memory cache for secrets, intended to be used for static secrets in generated configuration files.

Jump to

Keyboard shortcuts

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