k8s

package
v0.0.0-...-4355fa8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier interface {
	Apply(ctx context.Context, opts metav1.ApplyOptions) (runtime.Object, error)
}

type ApplyGetter

type ApplyGetter interface {
	Applier
	Getter
}

type BuildClientsetOption

type BuildClientsetOption interface {
	// contains filtered or unexported methods
}

func WithConfigBuilder

func WithConfigBuilder(configBuilder kubeConfigBuilder) BuildClientsetOption

func WithKubeClientBuilder

func WithKubeClientBuilder(kubeClientBuilder clientSetBuilder) BuildClientsetOption

type Clients

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

func NewClientset

func NewClientset(clusterURL, namespace string, opts ...BuildClientsetOption) (*Clients, error)

func (*Clients) Deployments

func (c *Clients) Deployments() resource.DeploymentInterface

func (*Clients) Namespaces

func (c *Clients) Namespaces() resource.NamespaceInterface

TODO: Optimise this so they are only called once

func (*Clients) PersistentVolumeClaims

func (c *Clients) PersistentVolumeClaims() resource.PersistentVolumeClaimInterface

func (*Clients) PersistentVolumes

func (c *Clients) PersistentVolumes() resource.PersistentVolumeInterface

func (*Clients) Services

func (c *Clients) Services() resource.ServiceInterface

type ConfigMapper

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

func NewConfigMapper

func NewConfigMapper(conf *config.Config) *ConfigMapper

func (*ConfigMapper) GetDeploymentConfig

func (cm *ConfigMapper) GetDeploymentConfig(key resource.Key) (*acappsv1.DeploymentApplyConfiguration, error)

func (*ConfigMapper) GetNamespaceConfig

func (cm *ConfigMapper) GetNamespaceConfig(key resource.Key) (*acapiv1.NamespaceApplyConfiguration, error)

func (*ConfigMapper) GetPersistentVolumeClaimConfig

func (cm *ConfigMapper) GetPersistentVolumeClaimConfig(key resource.Key) (*acapiv1.PersistentVolumeClaimApplyConfiguration, error)

func (*ConfigMapper) GetPersistentVolumeConfig

func (cm *ConfigMapper) GetPersistentVolumeConfig(key resource.Key) (*acapiv1.PersistentVolumeApplyConfiguration, error)

func (*ConfigMapper) GetServiceConfig

func (cm *ConfigMapper) GetServiceConfig(key resource.Key) (*acapiv1.ServiceApplyConfiguration, error)

type Deleter

type Deleter interface {
	Delete(ctx context.Context, opts metav1.DeleteOptions) error
}

type DeploymentExecutor

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

func NewDeploymentExecutor

func NewDeploymentExecutor(logger log.Logger) *DeploymentExecutor

func (*DeploymentExecutor) ApplyAndWait

func (d *DeploymentExecutor) ApplyAndWait(kubeResource identifiableWatchableApplyGetter, timeout time.Duration) error

func (*DeploymentExecutor) DestroyAndWait

func (d *DeploymentExecutor) DestroyAndWait(kubeResource identifiableWatchableDeleter, timeout time.Duration) error

type DeploymentManager

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

func NewDeploymentManager

func NewDeploymentManager(conf *config.Config, logger log.Logger, clients resource.Clientset) *DeploymentManager

func (*DeploymentManager) DeployGRPCServer

func (d *DeploymentManager) DeployGRPCServer() error

func (*DeploymentManager) DeployMessageBroker

func (d *DeploymentManager) DeployMessageBroker() error

func (*DeploymentManager) DeployNamespace

func (d *DeploymentManager) DeployNamespace() error

func (*DeploymentManager) DeployWorkerpools

func (d *DeploymentManager) DeployWorkerpools() error

func (*DeploymentManager) DestroyAll

func (d *DeploymentManager) DestroyAll() error

type Getter

type Getter interface {
	Get(ctx context.Context, opts metav1.GetOptions) (runtime.Object, error)
}

type KubeClientBuilder

type KubeClientBuilder struct{}

func (*KubeClientBuilder) NewForConfig

func (k *KubeClientBuilder) NewForConfig(config *rest.Config) (*kubernetes.Clientset, error)

type KubeConfigBuilder

type KubeConfigBuilder struct{}

func (*KubeConfigBuilder) BuildConfig

func (k *KubeConfigBuilder) BuildConfig(clusterURL, kubeConfPath string) (*rest.Config, error)

func (*KubeConfigBuilder) GetKubeConfigPath

func (k *KubeConfigBuilder) GetKubeConfigPath() (string, error)

type Operator

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

func NewOperator

func NewOperator() *Operator

func (*Operator) Apply

func (o *Operator) Apply(kubeResource ApplyGetter) (bool, error)

func (*Operator) Delete

func (o *Operator) Delete(kubeResource Deleter) (bool, error)

func (*Operator) WaitFor

func (o *Operator) WaitFor(kubeResource Watcher, eventTypes []watch.EventType, timeout time.Duration) error

type Watcher

type Watcher interface {
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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