kubernetes

package
v2.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogsStore

func NewLogsStore(kubeClient kubernetes.Interface) api.LogsStore

NewLogsStore returns a Kubernetes-based implementation of the api.LogsStore interface. It can stream logs directly from a Worker or Job's underlying pod. In practice, this is useful for very near-term retrieval of Worker and Job logs without incurring the latency inherent in other implementations that rely on a log aggregator having forwarded and stored log entries. This implementation will error, however, once the relevant pod has been deleted. Callers should be prepared to fall back on another implementation of the api.LogsStore interface, with the assumption that by the time a Worker's or Job's pod has been deleted, all of its logs have been aggregated and stored.

func NewSecretsStore

func NewSecretsStore(kubeClient kubernetes.Interface) api.SecretsStore

NewSecretsStore returns a Kubernetes-based implementation of the api.SecretsStore interface.

func NewSubstrate

func NewSubstrate(
	kubeClient kubernetes.Interface,
	queueWriterFactory queue.WriterFactory,
	config SubstrateConfig,
) api.Substrate

NewSubstrate returns a Kubernetes-based implementation of the api.Substrate interface.

Types

type SubstrateConfig

type SubstrateConfig struct {
	// APIAddress is the address of the Brigade API server. The substrate will use
	// this information whenever it needs to tell another component where to find
	// the API server.
	APIAddress string
	// GitInitializerImage is the name of the OCI image that will be used (when
	// applicable) for the git initializer. The expected format is
	// [REGISTRY/][ORG/]IMAGE_NAME[:TAG].
	GitInitializerImage string
	// GitInitializerImagePullPolicy is the ImagePullPolicy that will be used
	// (when applicable) for the git initializer.
	GitInitializerImagePullPolicy api.ImagePullPolicy
	// DefaultWorkerImage is the name of the OCI image that will be used for the
	// Worker pod's container[0] if none is specified in a Project's
	// configuration. The expected format is [REGISTRY/][ORG/]IMAGE_NAME[:TAG].
	DefaultWorkerImage string
	// DefaultWorkerImagePullPolicy is the ImagePullPolicy that will be used for
	// the Worker pod's container[0] if none is specified in a Project's
	// configuration.
	DefaultWorkerImagePullPolicy api.ImagePullPolicy
	// WorkspaceStorageClass is the Kubernetes StorageClass that should be used
	// for a Worker's shared storage.
	WorkspaceStorageClass string
}

SubstrateConfig encapsulates several configuration options for the Kubernetes-based Substrate.

Jump to

Keyboard shortcuts

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