deployments_service

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentService

type DeploymentService struct {
	// contains filtered or unexported fields
}

Integrate builds management with internal permissions and kubernetes RBAC

func NewDeploymentService

func NewDeploymentService(repo repositories.RepositoriesInterface, k8s *k8s.KubeClient, deploymentController *deployctl.DeploymentController, githubClient *github.GithubClient, lokiQuerier *loki.LokiLogQuerier, registryTester *registry.RegistryTester, variableService *variables_service.VariablesService) *DeploymentService

func (*DeploymentService) AttachInstanceDataToCurrent

func (self *DeploymentService) AttachInstanceDataToCurrent(ctx context.Context, deployments []*models.DeploymentResponse, service *ent.Service) (*models.DeploymentResponse, error)

Attach instance data

func (*DeploymentService) AttachInstanceDataToDeploymentResponses

func (self *DeploymentService) AttachInstanceDataToDeploymentResponses(deployments []*models.DeploymentResponse, instanceData *ServiceInstanceData, currentDeploymentID uuid.UUID)

AttachInstanceDataToDeploymentResponses attaches instance data to deployment responses

func (*DeploymentService) AttachInstanceDataToServiceResponse

func (self *DeploymentService) AttachInstanceDataToServiceResponse(service *models.ServiceResponse, instanceDataMap map[uuid.UUID]*ServiceInstanceData) *ServiceInstanceData

AttachInstanceDataToServiceResponse attaches instance data to a single service response Returns the instance data that was attached, or nil if no data was available

func (*DeploymentService) AttachInstanceDataToServiceResponses

func (self *DeploymentService) AttachInstanceDataToServiceResponses(services []*models.ServiceResponse, instanceDataMap map[uuid.UUID]*ServiceInstanceData)

AttachInstanceDataToServiceResponses attaches instance data to multiple service responses This is a convenience function that calls AttachInstanceDataToServiceResponse for each service

func (*DeploymentService) AttachInstanceDataToServices

func (self *DeploymentService) AttachInstanceDataToServices(ctx context.Context, services []*ent.Service, namespace string) (map[uuid.UUID]*ServiceInstanceData, error)

AttachInstanceDataToServices efficiently attaches instance data to multiple services in an environment This makes a single Kubernetes call per environment instead of per service Always includes inferred events from container state (lightweight and reliable)

func (*DeploymentService) AttachInstanceDataToServicesWithKubernetesEvents

func (self *DeploymentService) AttachInstanceDataToServicesWithKubernetesEvents(ctx context.Context, services []*ent.Service, namespace string) (map[uuid.UUID]*ServiceInstanceData, error)

AttachInstanceDataToServicesWithKubernetesEvents efficiently attaches instance data with full Kubernetes Events API This version includes both inferred events and Kubernetes Events API data for detailed views

func (*DeploymentService) CreateCRDFromService

func (self *DeploymentService) CreateCRDFromService(service *ent.Service) *ubv1.Service

CreateCRDFromService creates a CRD from the service configuration

func (*DeploymentService) CreateManualDeployment

func (self *DeploymentService) CreateManualDeployment(ctx context.Context, requesterUserId uuid.UUID, input *models.CreateDeploymentInput) (*models.DeploymentResponse, error)

func (*DeploymentService) CreateRedeployment

func (self *DeploymentService) CreateRedeployment(ctx context.Context, requesterUserId uuid.UUID, input *models.RedeployExistingDeploymentInput) (*models.DeploymentResponse, error)

func (*DeploymentService) GetDeploymentByID

func (self *DeploymentService) GetDeploymentByID(ctx context.Context, requesterUserId uuid.UUID, input *models.GetDeploymentByIDInput) (*models.DeploymentResponse, error)

func (*DeploymentService) GetDeploymentsForService

type ServiceInstanceData

type ServiceInstanceData struct {
	ServiceID       uuid.UUID
	Status          schema.DeploymentStatus
	InstanceEvents  []models.EventRecord
	Restarts        int32
	CrashingReasons []string
}

ServiceInstanceData holds instance data for a service

Jump to

Keyboard shortcuts

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