managedservices

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidLabels

func IsInvalidLabels(err error) bool

IsInvalidLabels asserts invalidLabelsError.

func IsInvalidReplicas

func IsInvalidReplicas(err error) bool

IsInvalidReplicas asserts invalidReplicasError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts NotFoundError.

Types

type ChartConfig

type ChartConfig struct {
	ChannelName     string
	ChartName       string
	ChartValues     string
	Namespace       string
	RunReleaseTests bool
}

ChartConfig is the chart to test.

func (ChartConfig) Validate

func (cc ChartConfig) Validate() error

type ChartResources

type ChartResources struct {
	DaemonSets  []DaemonSet
	Deployments []Deployment
}

ChartResources are the key resources deployed by the chart.

func (ChartResources) Validate

func (cr ChartResources) Validate() error

type Clients

type Clients interface {
	// K8sClient returns a properly configured control plane client for the
	// Kubernetes API.
	K8sClient() kubernetes.Interface
}

type Config

type Config struct {
	ApprClient *apprclient.Client
	Clients    Clients
	HelmClient *helmclient.Client
	Logger     micrologger.Logger

	ChartConfig    ChartConfig
	ChartResources ChartResources
}

type DaemonSet

type DaemonSet struct {
	Name        string
	Namespace   string
	Labels      map[string]string
	MatchLabels map[string]string
	Replicas    int
}

DaemonSet is a daemonset to be tested.

type Deployment

type Deployment struct {
	Name             string
	Namespace        string
	DeploymentLabels map[string]string
	MatchLabels      map[string]string
	PodLabels        map[string]string
	Replicas         int
}

Deployment is a deployment to be tested.

type Interface

type Interface interface {
	// Test executes the test of a managed services chart with basic
	// functionality that applies to all managed services charts.
	//
	// - Install chart.
	// - Check chart is deployed.
	// - Check key resources are correct.
	// - Run helm release tests if configured.
	//
	Test(ctx context.Context) error
}

type ManagedServices

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

func New

func New(config Config) (*ManagedServices, error)

func (*ManagedServices) Test

func (ms *ManagedServices) Test(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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