Documentation ¶
Index ¶
- Constants
- func IsRunningInsideCluster() bool
- type CustomResourceDefinitionManager
- type EventHandler
- type GoCustomResourceDefinitionManager
- type GoK8sClient
- func (this *GoK8sClient) CreateSecret(namespace string, name string, data map[string][]byte) error
- func (this *GoK8sClient) DeleteSecret(namespace string, name string) error
- func (this *GoK8sClient) ReadSecret(namespace string, name string) (map[string][]byte, error)
- func (this *GoK8sClient) WatchSimpleDatabaseProvisionerCustomResources(eventHandler cache.ResourceEventHandler) error
- type K8sClient
Constants ¶
const SDP_BINDINGS_FQDN = "simpledatabasebindings.simpledatabaseprovisioner.k8s.ecodia.de"
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 (*GoK8sClient) DeleteSecret ¶
func (this *GoK8sClient) DeleteSecret(namespace string, name string) error
func (*GoK8sClient) ReadSecret ¶
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 }