Documentation
¶
Index ¶
- type Client
- func (c *Client) ApprovePromotion(ctx context.Context, prNumber int) error
- func (c *Client) GetClient() client.Client
- func (c *Client) GetClientset() *kubernetes.Clientset
- func (c *Client) GetConfig() *rest.Config
- func (c *Client) GetDrift(ctx context.Context, appName, cluster string) (*v1alpha1.DriftMonitor, error)
- func (c *Client) GetEvents(ctx context.Context, resource string, opts EventOptions) ([]string, error)
- func (c *Client) GetMetrics(ctx context.Context, filter string) (string, error)
- func (c *Client) GetNamespace() string
- func (c *Client) GetOperatorConfig(ctx context.Context) (*ConfigData, error)
- func (c *Client) GetOperatorLogs(ctx context.Context, opts LogOptions) ([]string, error)
- func (c *Client) GetOperatorStatus(ctx context.Context) (*OperatorStatus, error)
- func (c *Client) GetPR(ctx context.Context, prNumber int, repo string) (*v1alpha1.PullRequestTracker, error)
- func (c *Client) GetPRLogs(ctx context.Context, prNumber int, opts LogOptions) ([]string, error)
- func (c *Client) GetPromotion(ctx context.Context, prNumber int) (*v1alpha1.PullRequestTracker, error)
- func (c *Client) GetPromotionLogs(ctx context.Context, prNumber int, opts LogOptions) ([]string, error)
- func (c *Client) ListClusters(ctx context.Context, checkHealth bool) ([]ClusterInfo, error)
- func (c *Client) ListDrifts(ctx context.Context, filters DriftListFilters, allNamespaces bool) ([]v1alpha1.DriftMonitor, error)
- func (c *Client) ListPRs(ctx context.Context, filters PRListFilters, allNamespaces bool) ([]v1alpha1.PullRequestTracker, error)
- func (c *Client) ListPromotions(ctx context.Context, filters PromotionListFilters, allNamespaces bool) ([]v1alpha1.PullRequestTracker, error)
- func (c *Client) ResolveDrift(ctx context.Context, appName, cluster string) error
- func (c *Client) RetryPR(ctx context.Context, prNumber int) error
- func (c *Client) ValidateConfig(ctx context.Context) (*ValidationResult, error)
- type ClusterInfo
- type ConfigData
- type DriftListFilters
- type EventOptions
- type LogOptions
- type OperatorStatus
- type PRListFilters
- type PromotionListFilters
- type ValidationResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps Kubernetes clients for CRD and core resource access
func (*Client) ApprovePromotion ¶
ApprovePromotion approves a promotion for a PR
func (*Client) GetClientset ¶
func (c *Client) GetClientset() *kubernetes.Clientset
GetClientset returns the standard Kubernetes clientset
func (*Client) GetDrift ¶
func (c *Client) GetDrift(ctx context.Context, appName, cluster string) (*v1alpha1.DriftMonitor, error)
GetDrift gets a specific DriftMonitor by app name and optional cluster
func (*Client) GetEvents ¶
func (c *Client) GetEvents(ctx context.Context, resource string, opts EventOptions) ([]string, error)
GetEvents retrieves Kubernetes events for a resource
func (*Client) GetMetrics ¶
GetMetrics fetches Prometheus metrics from the operator
func (*Client) GetNamespace ¶
GetNamespace returns the default namespace
func (*Client) GetOperatorConfig ¶
func (c *Client) GetOperatorConfig(ctx context.Context) (*ConfigData, error)
GetOperatorConfig retrieves the operator configuration
func (*Client) GetOperatorLogs ¶
GetOperatorLogs retrieves operator pod logs
func (*Client) GetOperatorStatus ¶
func (c *Client) GetOperatorStatus(ctx context.Context) (*OperatorStatus, error)
GetOperatorStatus fetches the operator's current status
func (*Client) GetPR ¶
func (c *Client) GetPR(ctx context.Context, prNumber int, repo string) (*v1alpha1.PullRequestTracker, error)
GetPR gets a specific PullRequestTracker by PR number and optional repo
func (*Client) GetPromotion ¶
func (c *Client) GetPromotion(ctx context.Context, prNumber int) (*v1alpha1.PullRequestTracker, error)
GetPromotion gets promotion details for a specific PR
func (*Client) GetPromotionLogs ¶
func (c *Client) GetPromotionLogs(ctx context.Context, prNumber int, opts LogOptions) ([]string, error)
GetPromotionLogs retrieves logs related to promotions
func (*Client) ListClusters ¶
ListClusters lists all configured clusters
func (*Client) ListDrifts ¶
func (c *Client) ListDrifts(ctx context.Context, filters DriftListFilters, allNamespaces bool) ([]v1alpha1.DriftMonitor, error)
ListDrifts lists all DriftMonitor resources with optional filtering
func (*Client) ListPRs ¶
func (c *Client) ListPRs(ctx context.Context, filters PRListFilters, allNamespaces bool) ([]v1alpha1.PullRequestTracker, error)
ListPRs lists all PullRequestTracker resources with optional filtering
func (*Client) ListPromotions ¶
func (c *Client) ListPromotions(ctx context.Context, filters PromotionListFilters, allNamespaces bool) ([]v1alpha1.PullRequestTracker, error)
ListPromotions lists PRs with pending promotions
func (*Client) ResolveDrift ¶
ResolveDrift marks drift as resolved
func (*Client) ValidateConfig ¶
func (c *Client) ValidateConfig(ctx context.Context) (*ValidationResult, error)
ValidateConfig validates the operator configuration
type ClusterInfo ¶
ClusterInfo represents cluster configuration information
type ConfigData ¶
type ConfigData struct {
GitHubOrg string
GitHubRepos []string
Clusters []ClusterInfo
}
ConfigData represents operator configuration
type DriftListFilters ¶
DriftListFilters defines filters for listing drift monitors
type EventOptions ¶
EventOptions defines options for fetching events
type LogOptions ¶
LogOptions defines options for fetching logs
type OperatorStatus ¶
type OperatorStatus struct {
Healthy bool
PRPipelineRunning bool
DriftPipelineRunning bool
GitHubHealthy bool
TrackedPRs int
ActiveDrifts int
RecentErrors []string
}
OperatorStatus represents the operator's health and status
type PRListFilters ¶
PRListFilters defines filters for listing pull request trackers
type PromotionListFilters ¶
PromotionListFilters defines filters for listing promotions
type ValidationResult ¶
ValidationResult represents configuration validation results