cluster

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package cluster is used to configure a kubernetes cluster for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Transport *http.Transport
	// contains filtered or unexported fields
}

A Cluster is used to configure a kubernetes cluster.

func New

func New(workingDir string) *Cluster

New creates a new Cluster.

func (*Cluster) GetNodePortAddr added in v0.9.0

func (cluster *Cluster) GetNodePortAddr(ctx context.Context, namespace, svcName string) (hostport string, err error)

GetNodePortAddr returns the node:port address for a NodePort kubernetes service.

func (*Cluster) NewHTTPClient

func (cluster *Cluster) NewHTTPClient() *http.Client

NewHTTPClient calls NewHTTPClientWithTransport with the default cluster transport.

func (*Cluster) NewHTTPClientWithTransport added in v0.9.0

func (cluster *Cluster) NewHTTPClientWithTransport(transport http.RoundTripper) *http.Client

NewHTTPClientWithTransport creates a new *http.Client, with a cookie jar, and a LocalRoundTripper which routes traffic to the nginx ingress controller.

func (*Cluster) Setup

func (cluster *Cluster) Setup(ctx context.Context) error

Setup configures the test cluster so that it is ready for the integration tests.

type TLSCerts

type TLSCerts struct {
	CA     []byte
	Cert   []byte
	Key    []byte
	Client struct {
		Cert []byte
		Key  []byte
	}
}

TLSCerts holds the certificate authority, certificate and certificate key for a TLS connection.

type TLSCertsBundle added in v0.9.0

type TLSCertsBundle struct {
	Trusted      TLSCerts
	WronglyNamed TLSCerts
	Untrusted    TLSCerts
}

TLSCertsBundle holds various TLSCerts.

Jump to

Keyboard shortcuts

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