manager

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinClusterSize         = 3
	IstioEnabledKey        = "istio.enabled"
	RotatePasswordKey      = "auth.rotatePassword" //nolint:gosec // Its is not password.
	ClusterEnabledKey      = "cluster.enabled"
	ClusterSizeKey         = "cluster.replicas"
	FileStorageClassKey    = "nats.jetstream.fileStorage.storageClassName"
	FileStorageSizeKey     = "global.jetstream.fileStorage.size"
	MemStorageEnabledKey   = "nats.jetstream.memStorage.enabled"
	MemStorageSizeKey      = "nats.jetstream.memStorage.size"
	DebugEnabledKey        = "nats.logging.debug"
	TraceEnabledKey        = "nats.logging.trace"
	CommonLabelsKey        = "commonLabels"
	CommonAnnotationsKey   = "commonAnnotations"
	ResourceRequestsCPUKey = "nats.resources.requests.cpu"
	ResourceRequestsMemKey = "nats.resources.requests.memory"
	ResourceLimitsCPUKey   = "nats.resources.limits.cpu"
	ResourceLimitsMemKey   = "nats.resources.limits.memory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	GenerateNATSResources(*chart.ReleaseInstance, ...Option) (*chart.ManifestResources, error)
	DeployInstance(context.Context, *chart.ReleaseInstance) error
	DeleteInstance(context.Context, *chart.ReleaseInstance) error
	IsNATSStatefulSetReady(context.Context, *chart.ReleaseInstance) (bool, error)
	GenerateOverrides(*natsv1alpha1.NATSSpec, bool, bool) map[string]interface{}
}

func NewNATSManger

func NewNATSManger(kubeClient k8s.Client, chartRenderer chart.Renderer, logger *zap.SugaredLogger) Manager

type NATSManager

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

func (NATSManager) DeleteInstance

func (m NATSManager) DeleteInstance(ctx context.Context, instance *chart.ReleaseInstance) error

func (NATSManager) DeployInstance

func (m NATSManager) DeployInstance(ctx context.Context, instance *chart.ReleaseInstance) error

func (NATSManager) GenerateNATSResources

func (m NATSManager) GenerateNATSResources(instance *chart.ReleaseInstance,
	opts ...Option) (*chart.ManifestResources, error)

func (NATSManager) GenerateOverrides

func (m NATSManager) GenerateOverrides(spec *natsv1alpha1.NATSSpec, istioEnabled bool,
	rotatePassword bool) map[string]interface{}

func (NATSManager) IsNATSStatefulSetReady

func (m NATSManager) IsNATSStatefulSetReady(ctx context.Context, instance *chart.ReleaseInstance) (bool, error)

type NatsConfig

type NatsConfig struct {
	ClusterSize int
}

type Option

type Option func(*unstructured.Unstructured) error

func WithLabel

func WithLabel(key, value string) Option

WithLabel sets label on the k8s Object.

func WithOwnerReference

func WithOwnerReference(nats v1alpha1.NATS) Option

WithOwnerReference sets the OwnerReferences of a k8s Object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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