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 { // BrigadeID is a unique-within-the-cluster identifier for an instance of // Brigade. This helps the substrate constrain any operation it performs on // the cluster to only k8s resources that are created and managed by THIS // instance of Brigade. BrigadeID string // 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 Linux-based 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 Linux-based git initializer. GitInitializerImagePullPolicy api.ImagePullPolicy // GitInitializerWindowsImage is the name of the Windows-based OCI image that // will be used (when applicable) for the git initializer. The expected format // is [REGISTRY/][ORG/]IMAGE_NAME[:TAG]. GitInitializerWindowsImage string // GitInitializerWindowsImagePullPolicy is the ImagePullPolicy that will be // used (when applicable) for the Windows-based git initializer. GitInitializerWindowsImagePullPolicy 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 // NodeSelectorKey is the key to use for the optional nodeSelector // configuration for worker and jobs. NodeSelectorKey string // NodeSelectorValue is the value to use for the optional nodeSelector // configuration for worker and jobs. NodeSelectorValue string // TolerationKey is the key to use for the optional tolerations // configuration for worker and jobs. TolerationKey string // TolerationValue is the value to use for the optional tolerations // configuration for worker and jobs. TolerationValue string }
SubstrateConfig encapsulates several configuration options for the Kubernetes-based Substrate.