upgrades

package
v1.6.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

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

This section is empty.

Types

type DeploymentUpgradeTest

type DeploymentUpgradeTest struct {
	// contains filtered or unexported fields
}

DeploymentUpgradeTest tests that a deployment is using the same replica sets before and after a cluster upgrade.

func (*DeploymentUpgradeTest) Setup

Setup creates a deployment and makes sure it has a new and an old replica set running.

func (*DeploymentUpgradeTest) Teardown

func (t *DeploymentUpgradeTest) Teardown(f *framework.Framework)

Teardown cleans up any remaining resources.

func (*DeploymentUpgradeTest) Test

func (t *DeploymentUpgradeTest) Test(f *framework.Framework, done <-chan struct{}, upgrade UpgradeType)

Test checks whether the replica sets for a deployment are the same after an upgrade.

type SecretUpgradeTest

type SecretUpgradeTest struct {
	// contains filtered or unexported fields
}

SecretUpgradeTest test that a secret is available before and after a cluster upgrade.

func (*SecretUpgradeTest) Setup

func (t *SecretUpgradeTest) Setup(f *framework.Framework)

Setup creates a secret and then verifies that a pod can consume it.

func (*SecretUpgradeTest) Teardown

func (t *SecretUpgradeTest) Teardown(f *framework.Framework)

Teardown cleans up any remaining resources.

func (*SecretUpgradeTest) Test

func (t *SecretUpgradeTest) Test(f *framework.Framework, done <-chan struct{}, upgrade UpgradeType)

Test waits for the upgrade to complete, and then verifies that a pod can still consume the secret.

type ServiceUpgradeTest

type ServiceUpgradeTest struct {
	// contains filtered or unexported fields
}

ServiceUpgradeTest tests that a service is available before and after a cluster upgrade. During a master-only upgrade, it will test that a service remains available during the upgrade.

func (*ServiceUpgradeTest) Setup

func (t *ServiceUpgradeTest) Setup(f *framework.Framework)

Setup creates a service with a load balancer and makes sure it's reachable.

func (*ServiceUpgradeTest) Teardown

func (t *ServiceUpgradeTest) Teardown(f *framework.Framework)

Teardown cleans up any remaining resources.

func (*ServiceUpgradeTest) Test

func (t *ServiceUpgradeTest) Test(f *framework.Framework, done <-chan struct{}, upgrade UpgradeType)

Test runs a connectivity check to the service.

type Test

type Test interface {
	// 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.
	Teardown(f *framework.Framework)
}

Test is an interface for upgrade tests.

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL