proxy

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SdsCAFilename   = "xds-trusted-ca.json"
	SdsCertFilename = "xds-certificate.json"
	// XdsTLSCertFilename is the fully qualified path of the file containing Envoy's
	// xDS server TLS certificate.
	XdsTLSCertFilename = "/certs/tls.crt"
	// XdsTLSKeyFilename is the fully qualified path of the file containing Envoy's
	// xDS server TLS key.
	XdsTLSKeyFilename = "/certs/tls.key"
	// XdsTLSCaFilename is the fully qualified path of the file containing Envoy's
	// trusted CA certificate.
	XdsTLSCaFilename = "/certs/ca.crt"
)

Variables

View Source
var (
	// xDS certificate rotation is supported by using SDS path-based resource files.
	SdsCAConfigMapData = fmt.Sprintf(`{"resources":[{"@type":"type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret",`+
		`"name":"xds_trusted_ca","validation_context":{"trusted_ca":{"filename":"%s"},`+
		`"match_typed_subject_alt_names":[{"san_type":"DNS","matcher":{"exact":"envoy-gateway"}}]}}]}`, XdsTLSCaFilename)
	SdsCertConfigMapData = fmt.Sprintf(`{"resources":[{"@type":"type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret",`+
		`"name":"xds_certificate","tls_certificate":{"certificate_chain":{"filename":"%s"},`+
		`"private_key":{"filename":"%s"}}}]}`, XdsTLSCertFilename, XdsTLSKeyFilename)
)

Functions

func EnvoyAppLabel

func EnvoyAppLabel() map[string]string

EnvoyAppLabel returns the labels used for all Envoy resources.

func EnvoyAppLabelSelector

func EnvoyAppLabelSelector() []string

EnvoyAppLabelSelector returns the labels used for all Envoy resources.

func ExpectedResourceHashedName

func ExpectedResourceHashedName(name string) string

ExpectedResourceHashedName returns expected resource hashed name.

Types

type ResourceRender

type ResourceRender struct {

	// Namespace is the Namespace used for managed infra.
	Namespace string
	// contains filtered or unexported fields
}

func NewResourceRender

func NewResourceRender(ns string, infra *ir.ProxyInfra) *ResourceRender

func (*ResourceRender) ConfigMap

func (r *ResourceRender) ConfigMap() (*corev1.ConfigMap, error)

ConfigMap returns the expected ConfigMap based on the provided infra.

func (*ResourceRender) Deployment

func (r *ResourceRender) Deployment() (*appsv1.Deployment, error)

Deployment returns the expected Deployment based on the provided infra.

func (*ResourceRender) Name

func (r *ResourceRender) Name() string

func (*ResourceRender) Service

func (r *ResourceRender) Service() (*corev1.Service, error)

Service returns the expected Service based on the provided infra.

func (*ResourceRender) ServiceAccount

func (r *ResourceRender) ServiceAccount() (*corev1.ServiceAccount, error)

ServiceAccount returns the expected proxy serviceAccount.

Jump to

Keyboard shortcuts

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