kubernetessecrets

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSecretsClient

func NewSecretsClient() (typedv1.SecretInterface, error)

NewSecretsClient creates a SecretsClient for working with Secrets in the pod namespace. A SecretsClient uses an underlying Kubernetes API client initialised with in-cluster config.

func ProviderFactory

func ProviderFactory(options plugin_v1.ProviderOptions) (plugin_v1.Provider, error)

ProviderFactory constructs a Provider. The API client is configured from in-cluster environment variables and files.

Types

type Provider

type Provider struct {
	Name          string
	SecretsClient typedv1.SecretInterface
}

Provider provides data values from Kubernetes Secrets.

func (*Provider) GetName

func (p *Provider) GetName() string

GetName returns the name of the provider

func (*Provider) GetValue

func (p *Provider) GetValue(id string) ([]byte, error)

GetValue obtains a value by id. Any secret which is stored in Kubernetes Secrets is recognized. The data type returned by Kubernetes Secrets is map[string][]byte. Therefore this provider needs to know which field to return from the map. The field to be returned is specified by appending '#fieldName' to the id argument.

func (*Provider) GetValues added in v1.7.1

func (p *Provider) GetValues(ids ...string) (map[string]plugin_v1.ProviderResponse, error)

GetValues takes in variable ids and returns their resolved values. This method is needed to the Provider interface

Jump to

Keyboard shortcuts

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