k8sclient

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SDP_BINDINGS_FQDN = "simpledatabasebindings.simpledatabaseprovisioner.k8s.ecodia.de"
View Source
const SDP_INSTANCES_FQDN = "simpledatabaseinstances.simpledatabaseprovisioner.k8s.ecodia.de"

Variables

This section is empty.

Functions

func IsRunningInsideCluster

func IsRunningInsideCluster() bool

Types

type CustomResourceDefinitionManager

type CustomResourceDefinitionManager interface {

	// InstallCustomResourceDefinition installs a CustomResourceDefinition-yaml file
	// into the cluster, if it does not already exist.
	//
	// If a CustomResourceDefinition with the same name already exits the operation
	// does nothing. The existing definition is NOT updated.
	InstallCustomResourceDefinition(crdYamlFilePath string) error
}

CustomResourceDefinitionManager interface provides methods to manage CustomResourceDefinitions inside the cluster.

type EventHandler

type EventHandler interface {
	Handle()
}

type GoCustomResourceDefinitionManager

type GoCustomResourceDefinitionManager struct {
	// contains filtered or unexported fields
}

GoCustomResourceDefinitionManager implements CustomResourceDefinitionManager interface to manage the CRDs inside the cluster.

func NewGoCustomResourceDefinitionManager

func NewGoCustomResourceDefinitionManager(isRunningInsideCluster bool) *GoCustomResourceDefinitionManager

NewGoCustomResourceDefinitionManager creates a new GoCustomResourceDefinitionManager instance.

Set the isRunningInsideCluster parameter to true if running inside a kubernetes cluster pod. Set it to false if invoking from outside a cluster (e.g. during development).

func (*GoCustomResourceDefinitionManager) InstallCustomResourceDefinition

func (this *GoCustomResourceDefinitionManager) InstallCustomResourceDefinition(crdYamlFile string) error

InstallCustomResourceDefinition installs a CustomResourceDefinition-yaml file into the cluster, if it does not already exist.

If a CustomResourceDefinition with the same name already exits the operation does nothing. The existing definition is NOT updated.

type GoK8sClient

type GoK8sClient struct {
	// contains filtered or unexported fields
}

func NewGoK8sClient

func NewGoK8sClient(isRunningInsideCluster bool) *GoK8sClient

func (*GoK8sClient) CreateSecret

func (this *GoK8sClient) CreateSecret(namespace string, name string, data map[string][]byte) error

func (*GoK8sClient) DeleteSecret

func (this *GoK8sClient) DeleteSecret(namespace string, name string) error

func (*GoK8sClient) ReadSecret

func (this *GoK8sClient) ReadSecret(namespace string, name string) (map[string][]byte, error)

func (*GoK8sClient) WatchSimpleDatabaseProvisionerCustomResources

func (this *GoK8sClient) WatchSimpleDatabaseProvisionerCustomResources(eventHandler cache.ResourceEventHandler) error

type K8sClient

type K8sClient interface {
	WatchSimpleDatabaseProvisionerCustomResources(eventHandler cache.ResourceEventHandler) error

	ReadSecret(namespace string, name string) (map[string][]byte, error)

	CreateSecret(namespace string, name string, data map[string][]byte) error

	DeleteSecret(namespace string, name string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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