Documentation
¶
Overview ¶
pkg/konfig/katalog.go
Index ¶
- Constants
- func ApiVersions() []string
- func DefaultInternalTLSName() string
- func DefaultWorkloadSecretName() 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 IsKatalogKind(kind string) bool
- func IsKomposerKind(kind string) bool
- func IsKonduktorKind(kind string) bool
- func IsMotifKind(kind string) bool
- func IsValidApiVersion(apiVersion string) bool
- func IsValidDocumentKind(kind string) bool
- func KatalogKind() string
- func KomposerKind() string
- func KonduktorKind() string
- func MotifKind() string
- func Validate() *validator.Validate
- 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) HTTPSPort() string
- func (k *Konfig) HTTPSPortInt32() int32
- func (k *Konfig) Health() *healthServer
- func (k *Konfig) IsDev() bool
- func (c *Konfig) IsProduction() 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) OrkestraServiceName() string
- func (k *Konfig) RegistryConfig() *registryConfig
- func (k *Konfig) Security() *SecurityConfig
- 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 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 IsValidApiVersion ¶
IsValidApiVersion returns true if the given apiVersion is a supported version.
func IsValidDocumentKind ¶
IsValidDocumentKind returns true if the kind is either Katalog or Komposer. Used by parseKatalogDoc to accept both kinds before dispatching.
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.
Types ¶
type Konfig ¶
type Konfig struct {
// contains filtered or unexported fields
}
func NewDefaultKonfig ¶
func NewDefaultKonfig() *Konfig
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) 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) IsProduction ¶
IsDev returns true for production environment
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) OrkestraServiceName ¶ added in v0.2.5
Orkestra service name
func (*Konfig) RegistryConfig ¶
func (k *Konfig) RegistryConfig() *registryConfig
RegistryConfig returns registry configuration.
func (*Konfig) Security ¶
func (k *Konfig) Security() *SecurityConfig
Security returns the unified security configuration. This is the primary accessor for all security-related settings.
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 {
// One service name per orkestra instance
ServiceName 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
Controller 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 WebhookController 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
}
}
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.