kubesecret

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 18 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotOurResource = fmt.Errorf("not kube secret resource")
)

Functions

This section is empty.

Types

type ResourceClient

type ResourceClient struct {
	Kube kubernetes.Interface
	common.KubeCoreResourceClient
	// contains filtered or unexported fields
}

func NewResourceClient

func NewResourceClient(kube kubernetes.Interface, resourceType resources.Resource, plainSecrets bool, kubeCache cache.KubeCoreCache) (*ResourceClient, error)

func NewResourceClientWithSecretConverter

func NewResourceClientWithSecretConverter(kube kubernetes.Interface, resourceType resources.Resource, kubeCache cache.KubeCoreCache, sc SecretConverter) (*ResourceClient, error)

func (*ResourceClient) Delete

func (rc *ResourceClient) Delete(namespace, name string, opts clients.DeleteOpts) error

func (*ResourceClient) FromKubeSecret

func (rc *ResourceClient) FromKubeSecret(secret *v1.Secret) (resources.Resource, error)

func (*ResourceClient) List

func (rc *ResourceClient) List(namespace string, opts clients.ListOpts) (resources.ResourceList, error)

func (*ResourceClient) Read

func (rc *ResourceClient) Read(namespace, name string, opts clients.ReadOpts) (resources.Resource, error)

func (*ResourceClient) ToKubeSecret

func (rc *ResourceClient) ToKubeSecret(ctx context.Context, resource resources.Resource) (*v1.Secret, error)

func (*ResourceClient) Watch

func (rc *ResourceClient) Watch(namespace string, opts clients.WatchOpts) (<-chan resources.ResourceList, <-chan error, error)

func (*ResourceClient) Write

type SecretConverter

type SecretConverter interface {
	// If this method returns nil,nil the default conversion will be used.
	FromKubeSecret(ctx context.Context, rc *ResourceClient, secret *v1.Secret) (resources.Resource, error)
	// If this method returns nil,nil the default conversion will be used.
	ToKubeSecret(ctx context.Context, rc *ResourceClient, resource resources.Resource) (*v1.Secret, error)
}

Jump to

Keyboard shortcuts

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