Documentation
¶
Index ¶
- Constants
- type BuildkitSettingsManager
- func (self *BuildkitSettingsManager) GetBuildkitConfig(ctx context.Context) (*corev1.ConfigMap, error)
- func (self *BuildkitSettingsManager) GetCurrentMaxParallelism(ctx context.Context) (int, error)
- func (self *BuildkitSettingsManager) GetCurrentReplicas(ctx context.Context) (int, error)
- func (self *BuildkitSettingsManager) RestartBuildkitdPods(ctx context.Context) error
- func (self *BuildkitSettingsManager) UpdateMaxParallelism(ctx context.Context, parallelism int) error
- func (self *BuildkitSettingsManager) UpdateReplicas(ctx context.Context, replicas int) error
Constants ¶
View Source
const ( // ConfigMap details BuildkitDeploymentName = "buildkitd" BuildkitConfigName = "buildkit-config" BuildkitConfigKey = "buildkitd.toml" // Default buildkitd.toml content DefaultBuildkitConfig = `` /* 176-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildkitSettingsManager ¶
type BuildkitSettingsManager struct { Repo repositories.RepositoriesInterface // contains filtered or unexported fields }
func NewBuildkitSettingsManager ¶
func NewBuildkitSettingsManager(cfg *config.Config, repo repositories.RepositoriesInterface, k8sClient *k8s.KubeClient) *BuildkitSettingsManager
func (*BuildkitSettingsManager) GetBuildkitConfig ¶
func (self *BuildkitSettingsManager) GetBuildkitConfig(ctx context.Context) (*corev1.ConfigMap, error)
GetOrCreateBuildkitConfig retrieves the existing buildkit ConfigMap, returns NotFound if it does not exist
func (*BuildkitSettingsManager) GetCurrentMaxParallelism ¶
func (self *BuildkitSettingsManager) GetCurrentMaxParallelism(ctx context.Context) (int, error)
GetCurrentMaxParallelism retrieves the current max-parallelism setting from the buildkitd.toml
func (*BuildkitSettingsManager) GetCurrentReplicas ¶
func (self *BuildkitSettingsManager) GetCurrentReplicas(ctx context.Context) (int, error)
GetCurrentReplicas retrieves the current number of replicas for the buildkitd deployment
func (*BuildkitSettingsManager) RestartBuildkitdPods ¶
func (self *BuildkitSettingsManager) RestartBuildkitdPods(ctx context.Context) error
RestartBuildkitdPods restarts the buildkitd pods by adding a restart annotation to the deployment
func (*BuildkitSettingsManager) UpdateMaxParallelism ¶
func (self *BuildkitSettingsManager) UpdateMaxParallelism(ctx context.Context, parallelism int) error
UpdateMaxParallelism updates the max-parallelism setting in the buildkitd.toml
func (*BuildkitSettingsManager) UpdateReplicas ¶
func (self *BuildkitSettingsManager) UpdateReplicas(ctx context.Context, replicas int) error
UpdateReplicas updates the number of replicas for the buildkitd deployment
Click to show internal directories.
Click to hide internal directories.