k8s

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ReplicateKey string = "replicator.v1.mittwald.de/replicate-from"

Variables

View Source
var (
	PodsResource            = core_api.SchemeGroupVersion.WithResource("pods")
	PodsKind                = core_api.SchemeGroupVersion.WithKind("Pod")
	NamespacesResource      = core_api.SchemeGroupVersion.WithResource("namespaces")
	NamespacesKind          = core_api.SchemeGroupVersion.WithKind("Namespace")
	ServiceaccountsResource = core_api.SchemeGroupVersion.WithResource("serviceaccounts")
	ServiceaccountsKind     = core_api.SchemeGroupVersion.WithKind("Serviceaccount")
)
View Source
var (
	SecretsResource = core_api.SchemeGroupVersion.WithResource("secrets")
)

Functions

This section is empty.

Types

type Interface

type Interface struct {
	dynamic.Interface
	DefaultMeta *meta_api.ObjectMeta
	ConcreteRef interface{}
}

Interface for interacting with kube resources

func NewInterface

func NewInterface(base dynamic.Interface) (*Interface, error)

func (*Interface) GetNamespace

func (k8s *Interface) GetNamespace(name string) (*core_api.Namespace, error)

func (*Interface) GetServiceAccount

func (k8s *Interface) GetServiceAccount(name string, namespace string) (*core_api.ServiceAccount, error)

func (*Interface) MergeAnnotation

func (k8s *Interface) MergeAnnotation(key string, metas ...*meta_api.ObjectMeta) []string

func (*Interface) NewReplicator

func (k8s *Interface) NewReplicator() *Replicator

func (*Interface) SetConcreteRef

func (k8s *Interface) SetConcreteRef(ref interface{})

type Replicator

type Replicator struct {
	dynamic.Interface
}

func (*Replicator) CreateReplicatedSecret

func (f *Replicator) CreateReplicatedSecret(secret *core_api.Secret, namespace string, name string) (*core_api.Secret, error)

func (*Replicator) UpdateReplicatedSecret

func (f *Replicator) UpdateReplicatedSecret(secret *core_api.Secret, namespace string, name string) (*core_api.Secret, error)

Jump to

Keyboard shortcuts

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