package upgrades
import "k8s.io/kubernetes/test/e2e/upgrades"
Package upgrades provides a framework for testing Kubernetes features before, during, and after different types of upgrades.
Index ¶
- func CreateUpgradeFrameworks(tests []Test) map[string]*framework.Framework
- func RunUpgradeSuite( ctx context.Context, upgCtx *UpgradeContext, tests []Test, testFrameworks map[string]*framework.Framework, testSuite *junit.TestSuite, upgradeType UpgradeType, upgradeFunc func(ctx context.Context), )
- type Skippable
- type Test
- type UpgradeContext
- type UpgradeType
- type VersionContext
Functions ¶
func CreateUpgradeFrameworks ¶
func RunUpgradeSuite ¶
func RunUpgradeSuite( ctx context.Context, upgCtx *UpgradeContext, tests []Test, testFrameworks map[string]*framework.Framework, testSuite *junit.TestSuite, upgradeType UpgradeType, upgradeFunc func(ctx context.Context), )
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(ctx context.Context, f *framework.Framework) // Test will run during the upgrade. When the upgrade is // complete, done will be closed and final validation can // begin. Test(ctx context.Context, 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(ctx context.Context, 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.
Source Files ¶
upgrade.go upgrade_suite.go
Directories ¶
Path | Synopsis |
---|---|
test/e2e/upgrades/apps | |
test/e2e/upgrades/auth | |
test/e2e/upgrades/autoscaling | |
test/e2e/upgrades/network | |
test/e2e/upgrades/node | |
test/e2e/upgrades/storage |
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 3 hours ago –
Tools for package owners.