Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct { APIServer config.URL `yaml:"api_server,omitempty"` KubeConfig string `yaml:"kubeconfig_file,omitempty"` }
ClientConfig configures access to the Kubernetes API server.
type KubernetesSecretConfig ¶
type KubernetesSecretConfig struct { Namespace string `yaml:"namespace"` Name string `yaml:"name"` Key string `yaml:"key"` }
KubernetesSecretConfig is the configuration pointing to a specific Kubernetes Secret.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages the Kubernetes secret provider.
func NewManager ¶
func NewManager(ctx context.Context, reg prometheus.Registerer, opts ProviderOptions) Manager
NewManager creates a new secret manager with the provided options.
func (*Manager) ApplyConfig ¶
func (m *Manager) ApplyConfig(providerConfig *WatchSPConfig, configs []SecretConfig) error
ApplyConfig applies the new secrets, diffing each one with the last configuration to apply the relevant update.
func (*Manager) Close ¶
func (m *Manager) Close(reg prometheus.Registerer)
Close cancels the manager, stopping the Kubernetes secret provider.
type ProviderOptions ¶
ProviderOptions provides options for a Provider.
type Secret ¶
type Secret interface { // Fetch fetches the secret content. Fetch(ctx context.Context) (string, error) }
Secret represents a sensitive value.
type SecretConfig ¶
type SecretConfig struct { Name string `yaml:"name"` Config KubernetesSecretConfig `yaml:"config"` }
SecretConfig maps a secret name references to a Kubernetes secret.
type WatchSPConfig ¶
type WatchSPConfig struct {
ClientConfig
}
WatchSPConfig configures access to the Kubernetes API server. TODO(TheSpiritXIII): https://github.com/GoogleCloudPlatform/prometheus-engine/issues/867