Documentation
¶
Overview ¶
pkg/konfig/ork.go
Index ¶
- Constants
- func ApiVersions() []string
- func DefaultInternalTLSName() string
- func DefaultWorkloadSecretName() string
- func E2EKind() string
- func GetBoolEnv(key string, def bool) bool
- func GetDurEnvSeconds(key string, def int) time.Duration
- func GetIntEnv(key string, def int) int
- func GetStrEnv(key, def string) string
- func GetStrSliceEnv(key string, def []string) []string
- func IsE2EKind(kind string) bool
- func IsKatalogKind(kind string) bool
- func IsKomposerKind(kind string) bool
- func IsKonduktorKind(kind string) bool
- func IsMotifKind(kind string) bool
- func IsSimulateKind(kind string) bool
- func IsValidApiVersion(apiVersion string) bool
- func IsValidPatternKind(kind string) bool
- func KatalogKind() string
- func KomposerKind() string
- func KonduktorKind() string
- func MotifKind() string
- func SimulateKind() string
- func ValidKindsString() string
- func Validate() *validator.Validate
- type Instance
- type Konfig
- func (k *Konfig) AdmissionEnabled() bool
- func (k *Konfig) Cluster() *clusterKonfig
- func (k *Konfig) ConversionEnabled() bool
- func (k *Konfig) Finalizers() []string
- func (k *Konfig) GatewayEndpoint() string
- func (k *Konfig) GatewayServiceName() string
- func (k *Konfig) HTTPSPort() string
- func (k *Konfig) HTTPSPortInt32() int32
- func (k *Konfig) Health() *healthServer
- func (k *Konfig) IsDev() bool
- func (k *Konfig) IsGatewayInstance() bool
- func (c *Konfig) IsProduction() bool
- func (k *Konfig) IsRuntimeInstance() bool
- func (k *Konfig) IsStaging() bool
- func (k *Konfig) Katalog() *katalogKonfig
- func (c *Konfig) Konductor() *konductorElection
- func (k *Konfig) Notification() *NotificationConfig
- func (k *Konfig) Ork() *orkKonfig
- func (k *Konfig) RegistryConfig() *registryConfig
- func (k *Konfig) RunningInstance() string
- func (k *Konfig) RuntimeServiceName() string
- func (k *Konfig) Security() *SecurityConfig
- func (k *Konfig) SetInstance(instance Instance)
- type NotificationConfig
- type SecurityConfig
Constants ¶
const ( // Ork Orkestra = "OrKestra" Ork = "ork" OrkOperator = "orkestra-operator" // Environment DevShort = "dev" StagingShort = "uat" Live = "live" ProdShort = "prod" Development = "development" Staging = "staging" Production = "production" // Modes DynamicMode = "dynamic" TypedMode = "typed" )
Variables ¶
This section is empty.
Functions ¶
func ApiVersions ¶
func ApiVersions() []string
ApiVersions returns the list of supported apiVersions.
func DefaultInternalTLSName ¶ added in v0.3.7
func DefaultInternalTLSName() string
DefaultInternalTLSName returns the default name for Orkestra's internal TLS secret.
func DefaultWorkloadSecretName ¶ added in v0.3.7
func DefaultWorkloadSecretName() string
DefaultWorkloadSecretName returns the base name used for generated workload secrets. The caller appends the CR's name to form the final secret name.
func E2EKind ¶ added in v0.4.8
func E2EKind() string
E2EKind returns the kind string for an E2E document.
func GetBoolEnv ¶
GetBoolEnv returns the boolean value of an env
func GetDurEnvSeconds ¶
GetDurEnvSeconds returns the time.duration value of an env
func GetStrSliceEnv ¶
GetStrSliceEnv returns the slice value of an env
func IsKatalogKind ¶
IsKatalogKind returns true if the given kind is a Katalog.
func IsKomposerKind ¶
IsKomposerKind returns true if the given kind is a Komposer.
func IsKonduktorKind ¶ added in v0.3.9
IsKonduktorKind returns true if the given kind is a Konduktor.
func IsMotifKind ¶ added in v0.3.9
IsMotifKind returns true if the given kind is a Motif.
func IsSimulateKind ¶ added in v0.7.2
IsSimulateKind returns true if the given kind is a Simulate.
func IsValidApiVersion ¶
IsValidApiVersion returns true if the given apiVersion is a supported version.
func IsValidPatternKind ¶ added in v0.7.6
IsValidPatternKind reports whether the given kind is one of the supported Orkestra pattern kinds.
func KatalogKind ¶
func KatalogKind() string
KatalogKind returns the kind string for a Katalog document. Katalogs declare CRDs in spec.crds. No sources block.
func KomposerKind ¶
func KomposerKind() string
KomposerKind returns the kind string for a Komposer document. Komposers compose Katalogs from sources (files, helm).
func KonduktorKind ¶ added in v0.3.9
func KonduktorKind() string
KonduktorKind returns the kind string for a Konduktor document.
func MotifKind ¶ added in v0.3.9
func MotifKind() string
MotifKind returns the kind string for a Motif document.
func SimulateKind ¶ added in v0.7.2
func SimulateKind() string
SimulateKind returns the kind string for a Simulate document.
func ValidKindsString ¶ added in v0.4.2
func ValidKindsString() string
ValidKindsString returns a comma‑separated list of all supported document kinds. Useful for error messages and CLI diagnostics.
Types ¶
type Instance ¶ added in v0.4.9
type Instance string
Instance identifiers used by Orkestra to distinguish between the internal runtime service and gateway service.
func Gateway ¶ added in v0.4.9
func Gateway() Instance
Gateway returns the instance identifier for the gateway service, Used by pkg/orkestra and other packages to determine what is running.
type Konfig ¶
type Konfig struct {
// contains filtered or unexported fields
}
func NewDefaultKonfig ¶
func NewDefaultKonfig() *Konfig
NewDefaultKonfig returns a Konfig populated from environment variables with sensible defaults. Used by CLI commands that do not go through the full Init() path (e.g. ork validate, ork template, ork simulate). All fields follow the same GetStrEnv/GetIntEnv/GetDurEnvSeconds pattern as Init().
func (*Konfig) AdmissionEnabled ¶
AdmissionEnabled reports whether admission webhooks are enabled. Reads from SecurityConfig (populated from ENV at Init).
func (*Konfig) Cluster ¶
func (k *Konfig) Cluster() *clusterKonfig
Cluster returns cluster Konfigurations
func (*Konfig) ConversionEnabled ¶
ConversionEnabled reports whether the conversion webhook is enabled. Reads from SecurityConfig (populated from ENV at Init).
func (*Konfig) Finalizers ¶
Finalizers return a list of default finalizers
func (*Konfig) GatewayEndpoint ¶ added in v0.4.9
GatewayEndpoint returns the companion gateway URL advertised to the control center. Empty string when no gateway is configured (e.g. runtime-only deployment).
func (*Konfig) GatewayServiceName ¶ added in v0.4.9
Gateway service name
func (*Konfig) HTTPSPort ¶
HTTPSPort returns the HTTPS port string (e.g. ":8443") used by the webhook server.
func (*Konfig) HTTPSPortInt32 ¶
HTTPSPortInt32 returns the HTTPS port as int32 (8443) used in webhook client configs.
func (*Konfig) Health ¶
func (k *Konfig) Health() *healthServer
Health returns health konfigurations
func (*Konfig) IsGatewayInstance ¶ added in v0.4.9
IsGatewayInstance reports whether the active instance is the external Orkestra gateway service.
func (*Konfig) IsProduction ¶
IsDev returns true for production environment
func (*Konfig) IsRuntimeInstance ¶ added in v0.4.9
IsRuntimeInstance reports whether the active instance is the internal Orkestra runtime service.
func (*Konfig) Katalog ¶
func (k *Konfig) Katalog() *katalogKonfig
Katalog returns katalog Konfigurations
func (*Konfig) Konductor ¶
func (c *Konfig) Konductor() *konductorElection
Konductor returns konductor Konfigurations
func (*Konfig) Notification ¶
func (k *Konfig) Notification() *NotificationConfig
Notification returns the unified notification configuration. This is the primary accessor for all notification-related settings.
func (*Konfig) RegistryConfig ¶
func (k *Konfig) RegistryConfig() *registryConfig
RegistryConfig returns registry configuration.
func (*Konfig) RunningInstance ¶ added in v0.4.9
Running instance returns the current running orkestra instance
func (*Konfig) RuntimeServiceName ¶ added in v0.4.9
Runtime service name
func (*Konfig) Security ¶
func (k *Konfig) Security() *SecurityConfig
Security returns the unified security configuration. This is the primary accessor for all security-related settings.
func (*Konfig) SetInstance ¶ added in v0.4.9
SetInstance sets the active Orkestra instance name (runtime or gateway) on the Konfig. This controls which service name is used when resolving endpoints and wiring.
type NotificationConfig ¶
type NotificationConfig struct {
Email struct {
Enabled bool // true when SMTP_* env vars are present
SMTPHost string
SMTPPort int
SMTPUser string
SMTPPass string
From string // optional override for From: header
}
Slack struct {
Enabled bool // true when SLACK_WEBHOOK_URL is present
Webhook string // default webhook URL
}
// DefaultInterval is the fallback notification interval when neither the
// team nor the Katalog YAML defines one.
DefaultInterval time.Duration
}
NotificationConfig is the unified notification configuration populated from ENV vars at Init() time. Katalog YAML values are merged on top via the Katalog loader, so this represents the ENV-level defaults.
Precedence: Katalog YAML > NotificationConfig (ENV) > hard default.
This struct defines *capability* — whether Orkestra is able to send email or Slack notifications at all. Teams and conditions define *intent*.
type SecurityConfig ¶
type SecurityConfig struct {
ServiceName struct {
Runtime string
Gateway string
}
DeletionProtection struct {
Enabled bool
CleanupOnShutdown bool
ServiceName string
FailurePolicy string
}
Webhooks struct {
Admission struct {
Enabled bool
}
CleanupOnShutdown bool
FailurePolicy string
ServiceName string
// TLS paths — shared with deletion protection, admission, and conversion.
// Set by ensureSecurity() after cert generation/loading.
TLSCert string
TLSKey string
Housekeeper struct {
Enabled bool
SyncInterval time.Duration
}
}
// Conversion is separate from admission webhooks — conversion has its own
// /convert endpoint, window stats, and CRD patch logic.
Conversion struct {
Enabled bool
// ConversionWindow is the rolling window size for latency/throughput stats.
ConversionWindow int
CleanupOnShutdown bool // TODO
}
// NamespaceProtection controls the optional validating webhook that prevents
// Orkestra-managed CRs from being created or updated in forbidden namespaces.
//
// This is an admission-time safeguard only. If disabled, namespace rules are
// not enforced at apply time. If enabled, the webhook blocks CRs whose target
// namespace violates the CRD’s declared allowedNamespaces or restrictedNamespaces.
//
// The webhook is managed by the housekeeper and will be recreated if
// deleted, ensuring continuous enforcement when enabled.
//
// Precedence: Katalog YAML > SecurityConfig (ENV) > hard default.
NamespaceProtection struct {
Enabled bool
FailurePolicy string
ServiceName string
CleanupOnShutdown bool
}
// CertManager controls the lifecycle of Orkestra’s auto-generated TLS certificate.
// Only applies when certificates are auto-generated (TLS_CERT/TLS_KEY not set).
//
// Precedence: Katalog YAML > SecurityConfig (ENV) > hard default.
CertManager struct {
// AutoRotate enables pre-emptive certificate rotation before expiry.
// Default: true. Set TLS_AUTO_ROTATE=false to opt out.
AutoRotate bool
// RotationThreshold is how far before expiry Orkestra rotates.
// Parsed from TLS_ROTATION_THRESHOLD env (e.g. "30d"). Default: "30d".
RotationThreshold string
// ValidFor is the default certificate validity duration.
// Parsed from TLS_ROTATE_AFTER env (e.g. "30d"). Default: "1y".
ValidFor string
}
}
SecurityConfig is the unified security configuration populated from ENV vars at Init() time. Katalog YAML values are merged on top via the Katalog loader, so this represents the ENV-level defaults.
Precedence: Katalog YAML > SecurityConfig (ENV) > hard default.