k8secret

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package k8secret implements a SecretsProvider backend that uses Kubernetes secrets for the data store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	common.SecretsProvider
	// contains filtered or unexported fields
}

Provider implements a SecretsProvider that matches secret names to keys in a single configured secret.

func New

func New() *Provider

New returns a new Provider.

func (*Provider) Close

func (k *Provider) Close() error

Close just returns nil because no cleanup is necessary.

func (*Provider) ReadSecret

func (k *Provider) ReadSecret(name string) ([]byte, error)

ReadSecret returns the data in the key specified by the given name.

func (*Provider) ReadSecretMap

func (k *Provider) ReadSecretMap(name string) (map[string][]byte, error)

ReadSecretMap implements SecretsProvider and returns a stored map secret.

func (*Provider) Setup

func (k *Provider) Setup(client client.Client, cluster *appv1.VDICluster) error

Setup will set the client inteface and secret name, and then ensure the presence of the secret in the cluster.

func (*Provider) WriteSecret

func (k *Provider) WriteSecret(name string, content []byte) error

WriteSecret will write the given data to the key of the given name and then update the secret.

func (*Provider) WriteSecretMap

func (k *Provider) WriteSecretMap(name string, content map[string][]byte) error

WriteSecretMap implements SecretsProvider and will write the key-value pair to the secrets backend. The secret can be read back in the same fashion. This will be the preferred function going forward.

Jump to

Keyboard shortcuts

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