builder

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package builder provides a Pulumi component for deploying a builder service to Kubernetes.

Index

Constants

View Source
const (
	// Port defaults
	DefaultBuilderPort = 8080
	MetricsPort        = 9000

	// Deployment defaults
	DefaultReplicas = 1

	// Resource allocation defaults
	DefaultCPULimit      = "2"
	DefaultMemoryLimit   = "2Gi"
	DefaultCPURequest    = "1"
	DefaultMemoryRequest = "1Gi"

	// Component kind
	ComponentKind = "signet:index:Builder"
)

Resource defaults

View Source
const (
	ServiceSuffix        = "-service"
	DeploymentSuffix     = "-deployment"
	ServiceAccountSuffix = "-sa"
	ConfigMapSuffix      = "-env"
	PodMonitorSuffix     = "-pod-monitor"
	ServiceMonitorSuffix = "-svcmon"
)

Resource name suffixes

View Source
const (
	HealthCheckPath = "/healthcheck"
	MetricsPath     = "/metrics"
)

Health check paths

View Source
const (
	ProbeInitialDelaySeconds = 5
	ProbePeriodSeconds       = 10
	LivenessProbePeriod      = 1
	ProbeTimeoutSeconds      = 1
	ProbeFailureThreshold    = 3
)

Probe settings

View Source
const (
	PrometheusScrapeAnnotation = "prometheus.io/scrape"
	PrometheusPortAnnotation   = "prometheus.io/port"
	PrometheusPathAnnotation   = "prometheus.io/path"
)

Prometheus annotations

Variables

This section is empty.

Functions

This section is empty.

Types

type AppLabels

type AppLabels struct {
	Labels pulumi.StringMap
}

AppLabels represents the Kubernetes labels to be applied to the builder resources.

func NewAppLabels

func NewAppLabels(app, name, partOf string, additionalLabels pulumi.StringMap) AppLabels

NewAppLabels creates a new AppLabels instance with consistent Kubernetes labels

type Builder

type Builder interface {
	GetServiceURL() pulumi.StringOutput
	GetMetricsURL() pulumi.StringOutput
}

type BuilderComponent

type BuilderComponent struct {
	pulumi.ResourceState
	BuilderComponentArgs BuilderComponentArgs
	Deployment           *appsv1.Deployment
	Service              *corev1.Service
	ServiceAccount       *corev1.ServiceAccount
	ConfigMap            *corev1.ConfigMap
}

BuilderComponent represents a Pulumi component that deploys a builder service.

func NewBuilder

NewBuilder creates a new builder component with the given configuration.

func (*BuilderComponent) GetMetricsURL

func (c *BuilderComponent) GetMetricsURL() pulumi.StringOutput

GetMetricsURL returns the URL of the builder metrics endpoint

func (*BuilderComponent) GetServiceURL

func (c *BuilderComponent) GetServiceURL() pulumi.StringOutput

GetServiceURL returns the URL of the builder service

type BuilderComponentArgs

type BuilderComponentArgs struct {
	Namespace  string     // k8s namespace to deploy the builder to
	AppLabels  AppLabels  // Labels to apply to the builder pod
	Name       string     // Builder name identifier
	Image      string     // Builder docker image
	BuilderEnv BuilderEnv // Builder environment variables
}

func (*BuilderComponentArgs) Validate

func (args *BuilderComponentArgs) Validate() error

Validate validates the BuilderComponentArgs

type BuilderEnv

type BuilderEnv struct {
	AuthTokenRefreshInterval string
	AwsAccountId             string
	AwsAccessKeyId           string
	AwsRegion                string
	AwsSecretAccessKey       string
	BlockConfirmationBuffer  int
	BlockQueryCutoff         int
	BlockQueryStart          int
	BuilderHelperAddress     string
	BuilderKey               string
	BuilderPort              int
	BuilderRewardsAddress    string
	ChainOffset              int
	ConcurrentLimit          int
	HostChainId              int
	HostRpcUrl               string
	OauthAudience            string
	OauthAuthenticateUrl     string
	OAuthClientId            string
	OauthClientSecret        string
	OauthIssuer              string
	OauthTokenUrl            string
	OtelExporterOtlpEndpoint string
	QuinceyUrl               string
	RollupBlockGasLimit      int
	RollupChainId            int
	RollupRpcUrl             string
	RustLog                  string
	SlotOffset               int
	StartTimestamp           int
	SubmitViaCallData        string
	TargetSlotTime           int
	TxBroadcastUrls          string
	TxPoolCacheDuration      int
	TxPoolUrl                string
	ZenithAddress            string
}

func (BuilderEnv) GetEnvMap

func (e BuilderEnv) GetEnvMap() pulumi.StringMap

GetEnvMap returns the environment variables as a pulumi.StringMap for the public BuilderEnv

func (*BuilderEnv) Validate

func (env *BuilderEnv) Validate() error

Validate validates the BuilderEnv

Jump to

Keyboard shortcuts

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