tlsproxy

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package tlsproxy provides a reverse proxy that wraps an HTTP service with HTTPS. It uses Square's Ghostunnel (https://github.com/ghostunnel/ghostunnel) for the proxy.

Certificate generation is currently hardcoded; custom certificates cannot be supplied. Certificates are valid for a short time making this package mostly suitable for testing. A certificate authority is generated and provided.

Index

Constants

View Source
const Image = "squareup/ghostunnel:v1.5.2"

Image is the Docker image for Ghostunnel to use.

Variables

This section is empty.

Functions

This section is empty.

Types

type TLSProxy

type TLSProxy struct {
	Key client.ObjectKey

	OwnerConfigMap *corev1obj.ConfigMap
	Service        *corev1obj.Service
	Secret         *corev1obj.TLSSecret
	Deployment     *appsv1obj.Deployment
}

TLSProxy is the service and deployment information for an instance of a reverse proxy.

func Apply

func Apply(ctx context.Context, cl client.Client, key client.ObjectKey, addr string) (*TLSProxy, error)

Apply loads, configures, and persists any changes to a TLS proxy using the given client.

func Configure

func Configure(tp *TLSProxy, addr string) (*TLSProxy, error)

Configure sets up the TLS proxy to connect to the given upstream address.

func New

func New(key client.ObjectKey) *TLSProxy

New creates a new, unconfigured TLS proxy with the given namespace and name.

func (*TLSProxy) CertificateAuthorityPEM

func (tp *TLSProxy) CertificateAuthorityPEM() ([]byte, error)

CertificateAuthorityPEM returns the PEM-encoded CA to use for validating connections to the service.

func (*TLSProxy) Delete

func (tp *TLSProxy) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)

func (*TLSProxy) Load

func (tp *TLSProxy) Load(ctx context.Context, cl client.Client) (bool, error)

func (*TLSProxy) Owned

func (tp *TLSProxy) Owned(ctx context.Context, owner lifecycle.TypedObject) error

func (*TLSProxy) Persist

func (tp *TLSProxy) Persist(ctx context.Context, cl client.Client) error

func (*TLSProxy) URL

func (tp *TLSProxy) URL() string

URL returns the HTTPS URL to the wrapped service.

Jump to

Keyboard shortcuts

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