helper

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

type Helper struct {
	KubeClient kubernetes.Interface
	// contains filtered or unexported fields
}

Helper provides methods for common operations needed during tests.

func NewHelper

func NewHelper(cfg *config.Config) *Helper

func (*Helper) DeleteFakeAPIServer added in v0.3.0

func (h *Helper) DeleteFakeAPIServer(ns string) error

func (*Helper) DeleteIssuer

func (h *Helper) DeleteIssuer(ns string) error

func (*Helper) DeleteProxy

func (h *Helper) DeleteProxy(ns string) error

func (*Helper) DeployAuditWebhook added in v0.3.0

func (h *Helper) DeployAuditWebhook(ns, logPath string) (corev1.Volume, *url.URL, error)

func (*Helper) DeployFakeAPIServer added in v0.3.0

func (h *Helper) DeployFakeAPIServer(ns string) ([]corev1.Volume, *url.URL, error)

func (*Helper) DeployIssuer

func (h *Helper) DeployIssuer(ns string) (*util.KeyBundle, *url.URL, error)

func (*Helper) DeployProxy

func (h *Helper) DeployProxy(ns *corev1.Namespace, issuerURL *url.URL, clientID string,
	oidcKeyBundle *util.KeyBundle, extraVolumes []corev1.Volume, extraArgs ...string) (*util.KeyBundle, *url.URL, error)

func (*Helper) GetServiceAccountSecret

func (h *Helper) GetServiceAccountSecret(ns, name string) (*corev1.Secret, error)

func (*Helper) Kubectl

func (h *Helper) Kubectl(ns string) *Kubectl

func (*Helper) NewRequester

func (h *Helper) NewRequester(transport http.RoundTripper, token string) *Requester

func (*Helper) NewTokenPayload

func (h *Helper) NewTokenPayload(issuerURL *url.URL, clientID string, exp time.Time) []byte

func (*Helper) NewValidRestConfig

func (h *Helper) NewValidRestConfig(issuerBundle, proxyBundle *util.KeyBundle,
	issuerURL, proxyURL *url.URL, clientID string) (*rest.Config, error)

func (*Helper) SignToken

func (h *Helper) SignToken(issuerBundle *util.KeyBundle, tokenPayload []byte) (string, error)

func (*Helper) WaitForDeploymentReady added in v0.3.0

func (h *Helper) WaitForDeploymentReady(namespace, name string, timeout time.Duration) error

func (*Helper) WaitForDeploymentToDelete added in v0.3.0

func (h *Helper) WaitForDeploymentToDelete(namespace, name string, timeout time.Duration) error

func (*Helper) WaitForPodReady

func (h *Helper) WaitForPodReady(namespace, name string, timeout time.Duration) error

type Kubectl

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

func (*Kubectl) Describe

func (k *Kubectl) Describe(resources ...string) error

func (*Kubectl) DescribeResource

func (k *Kubectl) DescribeResource(resource, name string) error

func (*Kubectl) Run

func (k *Kubectl) Run(args ...string) error

func (*Kubectl) RunWithStdout added in v0.3.0

func (k *Kubectl) RunWithStdout(stdout io.Writer, args ...string) error

type Requester

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

func (*Requester) Get

func (r *Requester) Get(target string) ([]byte, *http.Response, error)

func (*Requester) RoundTrip

func (r *Requester) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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