unleash

package
v0.0.0-...-ac33db7 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnleashTeamsEnvVar = "TEAMS_ALLOWED_TEAMS"
	// @TODO this should be moved to config
	ManagementClusterNamespace = "devteam"
	ManagementClusterChangeme  = "dev"

	UnleashCustomImageRepo    = "europe-north1-docker.pkg.dev/nais-io/nais/images/"
	UnleashCustomImageName    = "unleash-v4"
	UnleashRequestCPU         = "100m"
	UnleashRequestMemory      = "128Mi"
	UnleashLimitMemory        = "256Mi"
	SqlProxyImage             = "gcr.io/cloudsql-docker/gce-proxy:1.19.1"
	SqlProxyRequestCPU        = "10m"
	SqlProxyRequestMemory     = "100Mi"
	SqlProxyLimitMemory       = "100Mi"
	DatabasePoolMax           = "3"
	DatabasePoolIdleTimeoutMs = "1000"
	LogLevel                  = "warn"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(tenant, namespace string, clusters []string, opts ...Opt) (*Manager, error)

func (*Manager) CreateUnleash

func (m *Manager) CreateUnleash(ctx context.Context, team slug.Slug) (*model.Unleash, error)

@TODO check if unleash already exists @TODO create fqdnnetpolicy for unleash @TODO create sql database, sql user and database secret @TODO create remote unleash in team namespace

func (*Manager) PromQuery

func (m *Manager) PromQuery(ctx context.Context, q string) (model.SampleValue, error)

func (Manager) Start

func (m Manager) Start(ctx context.Context, log logrus.FieldLogger) error

func (*Manager) Unleash

func (m *Manager) Unleash(team string) (*model.Unleash, error)

type Opt

type Opt func(*settings)

func WithBifrostEnabled

func WithBifrostEnabled() Opt

func WithClientsCreator

func WithClientsCreator(f func(cluster string) (kubernetes.Interface, dynamic.Interface, error)) Opt

Jump to

Keyboard shortcuts

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