Documentation
¶
Index ¶
- type DeploymentService
- func (self *DeploymentService) AttachInstanceDataToCurrent(ctx context.Context, deployments []*models.DeploymentResponse, ...) (*models.DeploymentResponse, error)
- func (self *DeploymentService) AttachInstanceDataToDeploymentResponses(deployments []*models.DeploymentResponse, instanceData *ServiceInstanceData, ...)
- func (self *DeploymentService) AttachInstanceDataToServiceResponse(service *models.ServiceResponse, ...) *ServiceInstanceData
- func (self *DeploymentService) AttachInstanceDataToServiceResponses(services []*models.ServiceResponse, ...)
- func (self *DeploymentService) AttachInstanceDataToServices(ctx context.Context, services []*ent.Service, namespace string) (map[uuid.UUID]*ServiceInstanceData, error)
- func (self *DeploymentService) AttachInstanceDataToServicesWithKubernetesEvents(ctx context.Context, services []*ent.Service, namespace string) (map[uuid.UUID]*ServiceInstanceData, error)
- func (self *DeploymentService) CreateCRDFromService(service *ent.Service) *ubv1.Service
- func (self *DeploymentService) CreateManualDeployment(ctx context.Context, requesterUserId uuid.UUID, ...) (*models.DeploymentResponse, error)
- func (self *DeploymentService) CreateRedeployment(ctx context.Context, requesterUserId uuid.UUID, ...) (*models.DeploymentResponse, error)
- func (self *DeploymentService) GetDeploymentByID(ctx context.Context, requesterUserId uuid.UUID, ...) (*models.DeploymentResponse, error)
- func (self *DeploymentService) GetDeploymentsForService(ctx context.Context, requesterUserId uuid.UUID, ...) ([]*models.DeploymentResponse, *models.DeploymentResponse, ...)
- type ServiceInstanceData
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 ¶
func (self *DeploymentService) GetDeploymentsForService(ctx context.Context, requesterUserId uuid.UUID, input *models.GetDeploymentsInput) ([]*models.DeploymentResponse, *models.DeploymentResponse, *models.PaginationResponseMetadata, error)
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