Documentation
¶
Overview ¶
Package upgrade tests published operator releases through OLM Classic. It does not import the current controller: expectations describe the selected releases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component struct {
Name string `json:"name"`
Deployment string `json:"deployment"`
Container string `json:"container"`
RelatedImage string `json:"relatedImage"`
MigrationContainer string `json:"migrationContainer,omitempty"`
// HashChange is required on To for components present in both releases.
HashChange *bool `json:"hashChange,omitempty"`
HashInputs *HashInputs `json:"hashInputs,omitempty"`
}
Component maps a workload to the related image in its release's CSV.
type Config ¶
type Config struct {
Kubeconfig, Catalog, FromBundle, ToBundle, Channel, Namespace, ArtifactDir, OPM string
Podman string
Timeout, PollInterval time.Duration
Scenario Scenario
}
Config identifies immutable artifacts and an explicitly selected cluster.
func LoadConfig ¶
LoadConfig fails closed on missing inputs. No default kubeconfig, image tags, release pair or component inventory is inferred from the developer's machine.
type HashConfigMap ¶
type HashContract ¶
HashContract binds a test-only hash scheme to one immutable target bundle. The scheme is qualified against that release's source, not this checkout.
type HashInputs ¶
type HashInputs struct {
ConfigMaps []HashConfigMap `json:"configMaps"`
Secrets []HashSecret `json:"secrets"`
}
HashInputs names the applied configuration and Secret metadata that a target component's release hashes. ConfigMaps are ordered; Secret roles are sorted by the v1 algorithm before hashing.
type HashSecret ¶
type ProbeConfig ¶
type ProbeConfig struct {
Service string `json:"service"`
Port int `json:"port"`
Collection string `json:"collection"`
Body map[string]any `json:"body"`
TokenFile string `json:"tokenFile,omitempty"`
CAFile string `json:"caFile,omitempty"`
ServerName string `json:"serverName,omitempty"`
}
ProbeConfig describes a non-sensitive API record used to prove data survives. A fresh port-forward is opened for each phase, so an old pod cannot mask failure.
type ReleaseExpectations ¶
type ReleaseExpectations struct {
ComponentStatus bool `json:"componentStatus"`
Components []Component `json:"components"`
HashContract *HashContract `json:"hashContract,omitempty"`
}
ReleaseExpectations enumerates components shipped by one release. Older releases without status.components can explicitly set ComponentStatus=false.
type Scenario ¶
type Scenario struct {
Fixtures string `json:"fixtures"`
HyperFleetConfig map[string]any `json:"hyperFleetConfig"`
From ReleaseExpectations `json:"from"`
To ReleaseExpectations `json:"to"`
// MaxUnavailable bounds aggregate unavailability caused by added components.
// Existing components must remain available regardless of this bound.
DataProbe ProbeConfig `json:"dataProbe"`
SettleDuration string `json:"settleDuration"`
}
Scenario is a release-pair contract, not a new public operator API. Paths are relative to the scenario file. Fixtures are created in the run namespace.