httpbin

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AddonName is the unique name of the HttpBin cluster.Addon
	AddonName clusters.AddonName = "httpbin"

	// DefaultNamespace is the namespace that the Addon components will be deployed
	DefaultNamespace = "httpbin"

	// Image is the container image that will be used by default.
	Image = "kennethreitz/httpbin"

	// DefaultPort is the port that will be used for the HttpBin endpoint
	// on pods and services unless otherwise specified.
	DefaultPort = 80
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Addon

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

Addon is a Kong Proxy addon which can be deployed on a clusters.Cluster.

func New

func New() *Addon

New produces a new clusters.Addon for Kong but uses a very opionated set of default configurations (see the defaults() function for more details). If you need to customize your Kong deployment, use the kong.Builder instead.

func (*Addon) Delete

func (a *Addon) Delete(ctx context.Context, cluster clusters.Cluster) error

func (*Addon) Dependencies added in v0.11.0

func (a *Addon) Dependencies(_ context.Context, _ clusters.Cluster) []clusters.AddonName

func (*Addon) Deploy

func (a *Addon) Deploy(ctx context.Context, cluster clusters.Cluster) error

func (*Addon) DumpDiagnostics added in v0.17.0

func (a *Addon) DumpDiagnostics(ctx context.Context, cluster clusters.Cluster) (map[string][]byte, error)

func (*Addon) Name

func (a *Addon) Name() clusters.AddonName

func (*Addon) Namespace

func (a *Addon) Namespace() string

Namespace indicates the namespace where the HttpBin addon components are to be deployed and managed.

func (*Addon) Path

func (a *Addon) Path() string

Path provides the URL path which the addon can be reached via Ingress.

func (*Addon) Ready

func (a *Addon) Ready(ctx context.Context, cluster clusters.Cluster) (waitForObjects []runtime.Object, ready bool, err error)

type Builder

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

Builder is a configuration tool to generate HttpBin cluster addons.

func NewBuilder

func NewBuilder() *Builder

NewBuilder provides a new Builder object for configuring HttpBin cluster addons.

func (*Builder) Build

func (b *Builder) Build() *Addon

Build generates a new kong cluster.Addon which can be loaded and deployed into a test Environment's cluster.Cluster.

func (*Builder) WithGeneratedNamespace

func (b *Builder) WithGeneratedNamespace() *Builder

WithGeneratedNamespace indicates that a uniquely named namespace should be used. Helpful when deploying multiple copies of HttpBin to the cluster.

func (*Builder) WithIngressAnnotations

func (b *Builder) WithIngressAnnotations(anns map[string]string) *Builder

WithIngressAnnotations allows injecting the annotations that will be placed on the HttpBin Ingress resource for things like deciding the ingress.class. This will override values for new keys provided, but will combine with any other previously existing keys.

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName indicates the name of the Addon which is useful if the caller intends to deploy multiple copies of the addon into a single namespace.

func (*Builder) WithNamespace

func (b *Builder) WithNamespace(namespace string) *Builder

WithNamespace allows the namespace where the addon should be deployed to be overridden from the default.

Jump to

Keyboard shortcuts

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