Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
func Validate(cfg OperatorConfig) error
Validate validates the complete operator configuration
Types ¶
type ClusterConfig ¶
type ClusterConfig struct {
Name string
ArgoCDMode string // internal|external
ArgoCDEndpoint string
ArgoCDToken string
}
ClusterConfig contains per-cluster ArgoCD configuration (value type)
type GitHubConfig ¶
GitHubConfig contains GitHub API configuration (value type)
type Loader ¶
type Loader interface {
Load(ctx context.Context) (OperatorConfig, error)
}
Loader defines the interface for loading operator configuration
func NewCRDLoader ¶
NewCRDLoader creates a new CRD-based configuration loader
func NewEnvLoader ¶
func NewEnvLoader() Loader
NewEnvLoader creates a new environment variable-based configuration loader
type ObservabilityConfig ¶
type ObservabilityConfig struct {
MetricsEnabled bool
MetricsPort int
TracingEnabled bool
LogLevel string
}
ObservabilityConfig contains observability settings (value type)
type OperatorBehavior ¶
OperatorBehavior contains operator runtime behavior settings (value type)
type OperatorConfig ¶
type OperatorConfig struct {
GitHub GitHubConfig
Clusters []ClusterConfig
Operator OperatorBehavior
Observability ObservabilityConfig
Webhook WebhookConfig
}
OperatorConfig represents the complete operator configuration (value type)
type WebhookConfig ¶
type WebhookConfig struct {
// Enabled controls whether the webhook server is enabled
Enabled bool
// Addr is the address to listen on (e.g., ":8080", "0.0.0.0:8080")
Addr string
// Secret is the GitHub webhook secret for HMAC validation
Secret string
// TLSCertFile is the path to the TLS certificate file (optional)
TLSCertFile string
// TLSKeyFile is the path to the TLS key file (optional)
TLSKeyFile string
// DiscoveryMode determines how PRs are discovered: webhook|polling|hybrid
// - webhook: only process webhook events (fastest, but requires reliable delivery)
// - polling: only use periodic polling (slower, but more reliable)
// - hybrid: webhook primary with polling as safety net (recommended)
DiscoveryMode string
}
WebhookConfig contains webhook server configuration (value type)