Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TokenLength is the length of generated webhook tokens in bytes (64 characters hex) TokenLength = 32 // ManagedByLabel indicates the secret is managed by this controller ManagedByLabel = "app.kubernetes.io/managed-by" // ControllerName is the name of this controller ControllerName = "flux-extension-controller" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles webhook token generation and secret management
func NewManager ¶
NewManager creates a new webhook manager
func (*Manager) ConstructWebhookURL ¶
ConstructWebhookURL constructs the full webhook URL from base URL and webhook path
func (*Manager) EnsureWebhookSecret ¶
func (m *Manager) EnsureWebhookSecret(ctx context.Context, namespace, secretName string, owner client.Object) (string, error)
EnsureWebhookSecret creates or retrieves the webhook secret for a receiver If the secret doesn't exist, it creates one with a new token If the secret exists and is managed by us, it reuses the existing token Returns the token value and any error
func (*Manager) GenerateToken ¶
GenerateToken generates a cryptographically secure random token
func (*Manager) IsWebhookConfigured ¶
IsWebhookConfigured returns true if webhook base URL is configured
Click to show internal directories.
Click to hide internal directories.