idler

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	SkipBuildCheck   bool            `json:"skipbuildcheck"`
	SkipCronCheck    bool            `json:"skipcroncheck"`
	SkipProcessCheck bool            `json:"skipprocesscheck"`
	Namespace        []idlerSelector `json:"namespace"`
	Builds           []idlerSelector `json:"builds"`
	Deployments      []idlerSelector `json:"deployments"`
	Pods             []idlerSelector `json:"pods"`
}

CLI .

type Data

type Data struct {
	NamespaceSelectorsLabels NamespaceSelectorsLabels `json:"namespaceselectorslabels"`
	ServiceName              string                   `json:"servicename"`
	CLI                      CLI                      `json:"cli"`
	Service                  Service                  `json:"service"`
}

Data .

type Idler

type Idler struct {
	Client                  client.Client
	PodCheckInterval        time.Duration
	Log                     logr.Logger
	Scheme                  *runtime.Scheme
	DryRun                  bool
	Debug                   bool
	Selectors               *Data
	PrometheusClient        prometheusapi.Client
	PrometheusCheckInterval time.Duration
}

Idler handles idling of cli and services.

func (*Idler) CLIIdler

func (h *Idler) CLIIdler()

CLIIdler will run the CLI idler process.

func (*Idler) KubernetesServiceIdler

func (h *Idler) KubernetesServiceIdler(ctx context.Context, opLog logr.Logger, namespace corev1.Namespace, lagoonProject string, forceIdle, forceScale bool)

KubernetesServiceIdler handles scaling deployments in kubernetes.

func (*Idler) ServiceIdler

func (h *Idler) ServiceIdler()

ServiceIdler will run the Service idler process.

type NamespaceSelectorsLabels

type NamespaceSelectorsLabels struct {
	ProjectName       string `json:"projectmame"`
	EnvironmentName   string `json:"environmentmame"`
	ProjectIdling     string `json:"projectidling"`
	EnvironmentIdling string `json:"environmentidling"`
	EnvironmentType   string `json:"environmenttype"`
}

NamespaceSelectorsLabels .

type Service

type Service struct {
	SkipBuildCheck   bool            `json:"skipbuildcheck"`
	SkipHitCheck     bool            `json:"skipcroncheck"`
	SkipIngressPatch bool            `json:"skipingresspatch"`
	Namespace        []idlerSelector `json:"namespace"`
	Builds           []idlerSelector `json:"builds"`
	Deployments      []idlerSelector `json:"deployments"`
	Pods             []idlerSelector `json:"pods"`
	Ingress          []idlerSelector `json:"ingress"`
}

Service .

Jump to

Keyboard shortcuts

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