Documentation
¶
Index ¶
- Variables
- func ParseFeatureFlags(flags []string) (map[string]bool, error)
- type CentralConfig
- func (c *CentralConfig) ConfigureSpec(roxieConfig *RoxieConfig) error
- func (c *CentralConfig) CustomResource() (map[string]interface{}, error)
- func (c *CentralConfig) EarlyReadinessEnabled() bool
- func (c *CentralConfig) ExposureEnabled() bool
- func (c *CentralConfig) ExposureSet() bool
- func (c *CentralConfig) GetExposure() types.Exposure
- func (c *CentralConfig) GetWaitConfig() WaitConfig
- func (c *CentralConfig) PortForwardingEnabled() bool
- func (c *CentralConfig) PortForwardingSet() bool
- type Config
- type Deployer
- func (d *Deployer) Cleanup()
- func (d *Deployer) Deploy(ctx context.Context, components component.Component) error
- func (d *Deployer) GetCentralDeploymentInfo() types.CentralDeploymentInfo
- func (d *Deployer) PrintCentralDeploymentSummary()
- func (d *Deployer) PrintSecuredClusterDeploymentSummary()
- func (d *Deployer) SetConfig(config Config)
- func (d *Deployer) SetEnvrcFile(path string)
- func (d *Deployer) SetVerbose(verbose bool)
- func (d *Deployer) Teardown(ctx context.Context, components component.Component) error
- func (d *Deployer) WaitForCentral(timeout time.Duration) bool
- type OperatorConfig
- type OperatorDeploymentMode
- type ResourceToDelete
- type RoxctlOptions
- type RoxctlResult
- type RoxieConfig
- type SecuredClusterConfig
- func (s *SecuredClusterConfig) ConfigureSpec(roxieConfig *RoxieConfig, centralConfig *CentralConfig) error
- func (s *SecuredClusterConfig) CustomResource() (map[string]interface{}, error)
- func (s *SecuredClusterConfig) EarlyReadinessEnabled() bool
- func (s *SecuredClusterConfig) GetWaitConfig() WaitConfig
- type WaitConfig
Constants ¶
This section is empty.
Variables ¶
var ( DefaultCentralWaitTimeout = 20 * time.Minute DefaultSecuredClusterWaitTimeout = 20 * time.Minute // AdminUsername is the default admin username for StackRox Central AdminUsername = "admin" )
Functions ¶
Types ¶
type CentralConfig ¶
type CentralConfig struct {
Namespace string `yaml:"namespace,omitempty"`
ResourceProfile types.ResourceProfile `yaml:"resourceProfile,omitempty"`
PauseReconciliation bool `yaml:"pauseReconciliation,omitempty"`
Exposure *types.Exposure `yaml:"exposure,omitempty"`
DeployTimeout time.Duration `yaml:"deployTimeout,omitempty"`
PortForwarding *bool `yaml:"portForwarding,omitempty"`
EarlyReadiness *bool `yaml:"earlyReadiness,omitempty"`
Spec map[string]interface{} `yaml:"spec,omitempty"`
}
CentralConfig holds deployment settings for the Central component.
func DefaultCentralConfig ¶
func DefaultCentralConfig() CentralConfig
DefaultCentralConfig returns a CentralConfig with sensible defaults.
func (*CentralConfig) ConfigureSpec ¶
func (c *CentralConfig) ConfigureSpec(roxieConfig *RoxieConfig) error
ConfigureSpec applies feature flags and exposure settings to the Central spec.
func (*CentralConfig) CustomResource ¶
func (c *CentralConfig) CustomResource() (map[string]interface{}, error)
CustomResource builds an unstructured Central custom resource from this config.
func (*CentralConfig) EarlyReadinessEnabled ¶ added in v0.4.1
func (c *CentralConfig) EarlyReadinessEnabled() bool
func (*CentralConfig) ExposureEnabled ¶
func (c *CentralConfig) ExposureEnabled() bool
func (*CentralConfig) ExposureSet ¶
func (c *CentralConfig) ExposureSet() bool
func (*CentralConfig) GetExposure ¶
func (c *CentralConfig) GetExposure() types.Exposure
func (*CentralConfig) GetWaitConfig ¶
func (c *CentralConfig) GetWaitConfig() WaitConfig
func (*CentralConfig) PortForwardingEnabled ¶
func (c *CentralConfig) PortForwardingEnabled() bool
func (*CentralConfig) PortForwardingSet ¶
func (c *CentralConfig) PortForwardingSet() bool
type Config ¶
type Config struct {
Roxie RoxieConfig `yaml:"roxie,omitempty"`
Operator OperatorConfig `yaml:"operator,omitempty"`
Central CentralConfig `yaml:"central,omitempty"`
SecuredCluster SecuredClusterConfig `yaml:"securedCluster,omitempty"`
}
Config is the top-level deployment configuration, combining settings for roxie itself, the operator, Central, and SecuredCluster.
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
Deployer is the base deployer for ACS
func New ¶
New creates a new Deployer instance. It verifies that the current environment contains necessary tools. It creates a temporary directory for the deployer to use during deployment, and it is the caller's responsibility to clean it up using the Cleanup() method when not used anymore.
func (*Deployer) Cleanup ¶
func (d *Deployer) Cleanup()
Cleanup cleans up any temporary resources created by the deployer, such as temporary files.
func (*Deployer) GetCentralDeploymentInfo ¶
func (d *Deployer) GetCentralDeploymentInfo() types.CentralDeploymentInfo
func (*Deployer) PrintCentralDeploymentSummary ¶
func (d *Deployer) PrintCentralDeploymentSummary()
func (*Deployer) PrintSecuredClusterDeploymentSummary ¶
func (d *Deployer) PrintSecuredClusterDeploymentSummary()
TODO(#91): plenty of code in common with the central variant that should probably be extracted
func (*Deployer) SetEnvrcFile ¶
func (*Deployer) SetVerbose ¶
type OperatorConfig ¶
type OperatorConfig struct {
SkipDeployment bool `yaml:"skipDeployment,omitempty"`
DeployViaOlm bool `yaml:"deployViaOlm,omitempty"`
Version string `yaml:"version,omitempty"`
}
OperatorConfig controls how the ACS operator is deployed.
func (*OperatorConfig) Configure ¶
func (c *OperatorConfig) Configure(roxieConfig *RoxieConfig) error
Configure derives the operator version from the roxie configuration.
type OperatorDeploymentMode ¶
type OperatorDeploymentMode bool
OperatorDeploymentMode represents how the operator is deployed
const ( OperatorModeNonOLM OperatorDeploymentMode = false OperatorModeOLM OperatorDeploymentMode = true )
type ResourceToDelete ¶
type RoxctlOptions ¶
type RoxctlOptions struct {
Args []string // Command arguments (e.g., ["central", "crs", "generate", "cluster-name"])
Env map[string]string // Additional environment variables
UseAuthentication bool // Whether to set ROX_ADMIN_PASSWORD and ROX_CA_CERT_FILE
MaxAttempts int // Maximum number of retry attempts (default: 5)
RetryDelay int // Base retry delay in seconds (default: 10, multiplied by attempt number)
}
RoxctlOptions contains options for running roxctl commands
type RoxctlResult ¶
RoxctlResult contains the result of a roxctl command execution
type RoxieConfig ¶
type RoxieConfig struct {
Version string `yaml:"version,omitempty"`
KonfluxImages bool `yaml:"konfluxImages,omitempty"`
FeatureFlags map[string]bool `yaml:"featureFlags,omitempty"`
ClusterType types.ClusterType `yaml:"clusterType,omitempty"`
}
RoxieConfig holds roxie-level settings such as version and feature flags.
func NewRoxieConfig ¶
func NewRoxieConfig() RoxieConfig
NewRoxieConfig returns a RoxieConfig with initialized defaults.
type SecuredClusterConfig ¶
type SecuredClusterConfig struct {
Namespace string `yaml:"namespace,omitempty"`
ResourceProfile types.ResourceProfile `yaml:"resourceProfile,omitempty"`
PauseReconciliation bool `yaml:"pauseReconciliation,omitempty"`
DeployTimeout time.Duration `yaml:"deployTimeout,omitempty"`
EarlyReadiness *bool `yaml:"earlyReadiness,omitempty"`
Spec map[string]interface{} `yaml:"spec,omitempty"`
}
SecuredClusterConfig holds deployment settings for the SecuredCluster component.
func DefaultSecuredClusterConfig ¶
func DefaultSecuredClusterConfig() SecuredClusterConfig
DefaultSecuredClusterConfig returns a SecuredClusterConfig with sensible defaults.
func (*SecuredClusterConfig) ConfigureSpec ¶
func (s *SecuredClusterConfig) ConfigureSpec(roxieConfig *RoxieConfig, centralConfig *CentralConfig) error
ConfigureSpec applies feature flags and the central endpoint to the SecuredCluster spec.
func (*SecuredClusterConfig) CustomResource ¶
func (s *SecuredClusterConfig) CustomResource() (map[string]interface{}, error)
CustomResource builds an unstructured SecuredCluster custom resource from this config.
func (*SecuredClusterConfig) EarlyReadinessEnabled ¶ added in v0.4.1
func (s *SecuredClusterConfig) EarlyReadinessEnabled() bool
func (*SecuredClusterConfig) GetWaitConfig ¶
func (s *SecuredClusterConfig) GetWaitConfig() WaitConfig