settings

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvHubBaseURL = "HUB_BASE_URL"
	EnvHubToken   = "TOKEN"
	EnvTask       = "TASK"
)
View Source
const (
	EnvAuthRequired          = "AUTH_REQUIRED"
	EnvKeycloakHost          = "KEYCLOAK_HOST"
	EnvKeycloakRealm         = "KEYCLOAK_REALM"
	EnvKeycloakClientID      = "KEYCLOAK_CLIENT_ID"
	EnvKeycloakClientSecret  = "KEYCLOAK_CLIENT_SECRET"
	EnvKeycloakAdminUser     = "KEYCLOAK_ADMIN_USER"
	EnvKeycloakAdminPass     = "KEYCLOAK_ADMIN_PASS"
	EnvKeycloakAdminRealm    = "KEYCLOAK_ADMIN_REALM"
	EnvKeycloakReqPassUpdate = "KEYCLOAK_REQ_PASS_UPDATE"
	EnvBuiltinTokenKey       = "ADDON_TOKEN"
	EnvRolePath              = "ROLE_PATH"
	EnvUserPath              = "USER_PATH"
)

Environment variables

View Source
const (
	EnvNamespace               = "NAMESPACE"
	EnvDbPath                  = "DB_PATH"
	EnvDbSeedPath              = "DB_SEED_PATH"
	EnvBucketPath              = "BUCKET_PATH"
	EnvRwxSupported            = "RWX_SUPPORTED"
	EnvCachePath               = "CACHE_PATH"
	EnvCachePvc                = "CACHE_PVC"
	EnvSharedPath              = "SHARED_PATH"
	EnvPassphrase              = "ENCRYPTION_PASSPHRASE"
	EnvTaskReapCreated         = "TASK_REAP_CREATED"
	EnvTaskReapSucceeded       = "TASK_REAP_SUCCEEDED"
	EnvTaskReapFailed          = "TASK_REAP_FAILED"
	EnvTaskSA                  = "TASK_SA"
	EnvTaskRetries             = "TASK_RETRIES"
	EnvTaskPreemptEnabled      = "TASK_PREEMPT_ENABLED"
	EnvTaskPreemptDelayed      = "TASK_PREEMPT_DELAYED"
	EnvTaskPreemptPostponed    = "TASK_PREEMPT_POSTPONED"
	EnvTaskPreemptRate         = "TASK_PREEMPT_RATE"
	EnvFrequencyTask           = "FREQUENCY_TASK"
	EnvFrequencyReaper         = "FREQUENCY_REAPER"
	EnvDevelopment             = "DEVELOPMENT"
	EnvBucketTTL               = "BUCKET_TTL"
	EnvFileTTL                 = "FILE_TTL"
	EnvAppName                 = "APP_NAME"
	EnvDisconnected            = "DISCONNECTED"
	EnvAnalysisReportPath      = "ANALYSIS_REPORT_PATH"
	EnvAnalysisArchiverEnabled = "ANALYSIS_ARCHIVER_ENABLED"
	EnvDiscoveryEnabled        = "DISCOVERY_ENABLED"
	EnvDiscoveryLabel          = "DISCOVERY_LABEL"
)
View Source
const (
	MetricsEnabled = "METRICS_ENABLED"
	MetricsPort    = "METRICS_PORT"
)

Environment variables.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addon

type Addon struct {
	// Hub settings.
	Hub struct {
		// URL for the hub API.
		URL string
		// Token for the hub API.
		Token string
	}
	//
	Task int
}

Addon settings.

func (*Addon) Load

func (r *Addon) Load() (err error)

type Auth

type Auth struct {
	// Auth required
	Required bool
	// Keycloak client config
	Keycloak struct {
		Host         string
		Realm        string
		ClientID     string
		ClientSecret string
		Admin        struct {
			User  string
			Pass  string
			Realm string
		}
		RequirePasswordUpdate bool
	}
	// Path to role yaml
	RolePath string
	// Path to user yaml
	UserPath string
	// Token settings for builtin provider.
	Token struct {
		Key string
	}
}

func (*Auth) Load

func (r *Auth) Load() (err error)

type Hub

type Hub struct {
	// k8s namespace.
	Namespace string
	// DB settings.
	DB struct {
		Path     string
		SeedPath string
	}
	// Bucket settings.
	Bucket struct {
		Path string
		TTL  int
	}
	// File settings.
	File struct {
		TTL int
	}
	// Cache settings.
	Cache struct {
		RWX  bool
		Path string
		PVC  string
	}
	// Shared mount settings.
	Shared struct {
		Path string
	}
	// Encryption settings.
	Encryption struct {
		Passphrase string
	}
	// Task
	Task struct {
		SA      string
		Retries int
		Reaper  struct {
			Created   int
			Succeeded int
			Failed    int
		}
		Preemption struct {
			Enabled   bool
			Delayed   time.Duration
			Postponed time.Duration
			Rate      int
		}
	}
	// Frequency
	Frequency struct {
		Task   int
		Reaper int
		Volume int
	}
	// Development environment
	Development bool
	// Product - deployed as product.
	Product bool
	// Disconnected indicates no cluster.
	Disconnected bool
	// Analysis settings.
	Analysis struct {
		ReportPath      string
		ArchiverEnabled bool
	}
	// Discovery settings.
	Discovery struct {
		Enabled bool
		Label   string
	}
}

func (*Hub) Load

func (r *Hub) Load() (err error)

type Metrics

type Metrics struct {
	// Metrics port.
	Port int
	// Metrics enabled.
	Enabled bool
}

Metrics settings

func (*Metrics) Address

func (r *Metrics) Address() string

Address on which to serve metrics.

func (*Metrics) Load

func (r *Metrics) Load() error

Load settings.

type TackleSettings

type TackleSettings struct {
	Hub
	Metrics
	Addon
	Auth
}
var Settings TackleSettings

func (*TackleSettings) Load

func (r *TackleSettings) Load() (err error)

Jump to

Keyboard shortcuts

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