types

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CategoriesKey = "categories"
)

Pre-defined environment keys. Environment settings can be added w/o being defined in this section.

Variables

View Source
var ErrNotFound = fmt.Errorf("environment key not found")

ErrNotFound is returned by Get() for missing keys

Functions

This section is empty.

Types

type ApiCredentials

type ApiCredentials struct {
	// Username for basic authentication
	Username string `json:"username,omitempty"`
	// Password for basic authentication
	Password string `json:"password,omitempty"`
	// KeyPair is JSON-encoded key pair for TLS client authentication
	KeyPair string `json:"keyPair,omitempty"`
}

ApiCredentials is set of identifiers and secrets used to authenticate with the underlying infrastructure.

type Environment

type Environment interface {
	// GetManagementEndpoint retrieves management endpoint
	GetManagementEndpoint(topology Topology) (*ManagementEndpoint, error)
	// Get retrieves settings applicable to the environment like project
	// or category to which resources created on behalf of Kubernetes cluster are
	// assigned to.
	// These settings might have to be explicitly propagated to resources.
	// Return whether lookup was successful to distinguish from nil as value.
	Get(topology Topology, key string) (interface{}, error)
}

Environment in which a Kubernetes has been deployed.

type ManagementEndpoint

type ManagementEndpoint struct {
	// ApiCredentials embedded into endpoint
	ApiCredentials
	// Address is URL of management endpoint
	Address *url.URL `json:"address,omitempty"`
	// Whether to authenticate TLS endpoint in case of HTTPS as transport.
	// HTTPS is used for encryption independent of this setting. An
	// unauthenticated TLS endpoint is prone to man-in-the-middle attacks.
	Insecure bool `json:"insecure,omitempty"`
	// AdditionalTrustBundle is a PEM-encoded certificate bundle to be used
	// in addition to system trust store
	AdditionalTrustBundle string `json:"additionalTrustBundle,omitempty"`
}

ManagementEndpoint specifies API endpoint used for interacting with underlying infrastructure.

type Provider

type Provider interface {
	Environment
}

Provider of an environment

type Topology

type Topology map[string]string

Topology is a map of topological domains to topological segments. A topological domain is a sub-division of a cluster, like "region", "zone", "rack", etc

Jump to

Keyboard shortcuts

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