Documentation ¶
Overview ¶
Package upgrades provides a framework for testing Kubernetes features before, during, and after different types of upgrades.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUpgradeFrameworks ¶ added in v1.21.3
func RunUpgradeSuite ¶ added in v1.21.0
func RunUpgradeSuite( upgCtx *UpgradeContext, tests []Test, testFrameworks map[string]*framework.Framework, testSuite *junit.TestSuite, upgradeType UpgradeType, upgradeFunc func(), )
RunUpgradeSuite runs the actual upgrade tests.
Types ¶
type Skippable ¶
type Skippable interface { // Skip should return true if test should be skipped. upgCtx // provides information about the upgrade that is going to // occur. Skip(upgCtx UpgradeContext) bool }
Skippable is an interface that an upgrade test can implement to be able to indicate that it should be skipped.
type Test ¶
type Test interface { // Name should return a test name sans spaces. Name() string // Setup should create and verify whatever objects need to // exist before the upgrade disruption starts. Setup(f *framework.Framework) // Test will run during the upgrade. When the upgrade is // complete, done will be closed and final validation can // begin. Test(f *framework.Framework, done <-chan struct{}, upgrade UpgradeType) // Teardown should clean up any objects that are created that // aren't already cleaned up by the framework. This will // always be called, even if Setup failed. Teardown(f *framework.Framework) }
Test is an interface for upgrade tests.
type UpgradeContext ¶
type UpgradeContext struct {
Versions []VersionContext
}
UpgradeContext contains information about all the stages of the upgrade that is going to occur.
type UpgradeType ¶
type UpgradeType int
UpgradeType represents different types of upgrades.
const ( // MasterUpgrade indicates that only the master is being upgraded. MasterUpgrade UpgradeType = iota // NodeUpgrade indicates that only the nodes are being upgraded. NodeUpgrade // ClusterUpgrade indicates that both master and nodes are // being upgraded. ClusterUpgrade // EtcdUpgrade indicates that only etcd is being upgraded (or migrated // between storage versions). EtcdUpgrade )
type VersionContext ¶
VersionContext represents a stage of the upgrade.
Click to show internal directories.
Click to hide internal directories.