Documentation
¶
Index ¶
- Constants
- Variables
- type DeploymentTemplateRequest
- type DeploymentTemplateResponse
- type DeploymentTemplateService
- type DeploymentTemplateServiceImpl
- func (impl DeploymentTemplateServiceImpl) FetchDeploymentsWithChartRefs(appId int, envId int) ([]*repository.DeploymentTemplateComparisonMetadata, error)
- func (impl DeploymentTemplateServiceImpl) GenerateManifest(ctx context.Context, request *DeploymentTemplateRequest, valuesYaml string) (*openapi2.TemplateChartResponse, error)
- func (impl DeploymentTemplateServiceImpl) GetDeploymentTemplate(ctx context.Context, request DeploymentTemplateRequest) (DeploymentTemplateResponse, error)
- func (impl DeploymentTemplateServiceImpl) GetDeploymentTemplateWithResolvedData(ctx context.Context, request DeploymentTemplateRequest) (DeploymentTemplateResponse, error)
- func (impl DeploymentTemplateServiceImpl) GetRestartWorkloadData(ctx context.Context, appIds []int, envId int) (*RestartPodResponse, error)
- func (impl DeploymentTemplateServiceImpl) ResolveTemplateVariables(ctx context.Context, values string, request DeploymentTemplateRequest) (string, map[string]string, error)
- type Kind
- type RequestDataMode
- type ResourceIdentifierResponse
- type ResourceMetadata
- type RestartPodResponse
- type RestartWorkloadConfig
Constants ¶
View Source
const LabelReleaseKey = "release"
Variables ¶
View Source
var ChartRepository = &gRPC.ChartRepository{
Name: "repo",
Url: "http://localhost:8080/",
Username: "admin",
Password: "password",
}
View Source
var ReleaseIdentifier = &gRPC.ReleaseIdentifier{
ReleaseNamespace: "devtron-demo",
ReleaseName: "release-name",
}
Functions ¶
This section is empty.
Types ¶
type DeploymentTemplateRequest ¶
type DeploymentTemplateRequest struct {
AppId int `json:"appId"`
EnvId int `json:"envId,omitempty"`
AppName string `json:"-"`
EnvName string `json:"-"`
Namespace string `json:"-"`
PipelineName string `json:"-"`
ChartRefId int `json:"chartRefId"`
RequestDataMode RequestDataMode `json:"valuesAndManifestFlag"`
Values string `json:"values"`
Type repository.DeploymentTemplateType `json:"type"`
DeploymentTemplateHistoryId int `json:"deploymentTemplateHistoryId,omitempty"`
ResourceName string `json:"resourceName"`
PipelineId int `json:"pipelineId"`
}
type DeploymentTemplateResponse ¶
type DeploymentTemplateResponse struct {
Data string `json:"data"`
ResolvedData string `json:"resolvedData"`
VariableSnapshot map[string]string `json:"variableSnapshot"`
TemplateVersion string `json:"-"`
IsAppMetricsEnabled bool `json:"-"`
}
func ConvertPointerDeploymentTemplateResponseToNonPointer ¶ added in v1.0.0
func ConvertPointerDeploymentTemplateResponseToNonPointer(r *DeploymentTemplateResponse) DeploymentTemplateResponse
type DeploymentTemplateService ¶
type DeploymentTemplateService interface {
FetchDeploymentsWithChartRefs(appId int, envId int) ([]*repository.DeploymentTemplateComparisonMetadata, error)
GetDeploymentTemplate(ctx context.Context, request DeploymentTemplateRequest) (DeploymentTemplateResponse, error)
GenerateManifest(ctx context.Context, request *DeploymentTemplateRequest, valuesYaml string) (*openapi2.TemplateChartResponse, error)
GetRestartWorkloadData(ctx context.Context, appIds []int, envId int) (*RestartPodResponse, error)
GetDeploymentTemplateWithResolvedData(ctx context.Context, request DeploymentTemplateRequest) (DeploymentTemplateResponse, error)
ResolveTemplateVariables(ctx context.Context, values string, request DeploymentTemplateRequest) (string, map[string]string, error)
}
type DeploymentTemplateServiceImpl ¶
type DeploymentTemplateServiceImpl struct {
Logger *zap.SugaredLogger
K8sUtil *k8s.K8sServiceImpl
// contains filtered or unexported fields
}
func NewDeploymentTemplateServiceImpl ¶
func NewDeploymentTemplateServiceImpl(Logger *zap.SugaredLogger, chartService chart.ChartService, appListingService app.AppListingService, deploymentTemplateRepository repository.DeploymentTemplateRepository, helmAppService client.HelmAppService, chartTemplateServiceImpl util.ChartTemplateService, helmAppClient gRPC.HelmAppClient, K8sUtil *k8s.K8sServiceImpl, propertiesConfigService pipeline.PropertiesConfigService, deploymentTemplateHistoryService history.DeploymentTemplateHistoryService, environmentRepository repository3.EnvironmentRepository, appRepository appRepository.AppRepository, scopedVariableManager variables.ScopedVariableManager, chartRefService chartRef.ChartRefService, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, chartRepository chartRepoRepository.ChartRepository, pipelineRepository pipelineConfig.PipelineRepository, mergeUtil *util.MergeUtil, ) (*DeploymentTemplateServiceImpl, error)
func (DeploymentTemplateServiceImpl) FetchDeploymentsWithChartRefs ¶
func (impl DeploymentTemplateServiceImpl) FetchDeploymentsWithChartRefs(appId int, envId int) ([]*repository.DeploymentTemplateComparisonMetadata, error)
func (DeploymentTemplateServiceImpl) GenerateManifest ¶
func (impl DeploymentTemplateServiceImpl) GenerateManifest(ctx context.Context, request *DeploymentTemplateRequest, valuesYaml string) (*openapi2.TemplateChartResponse, error)
func (DeploymentTemplateServiceImpl) GetDeploymentTemplate ¶
func (impl DeploymentTemplateServiceImpl) GetDeploymentTemplate(ctx context.Context, request DeploymentTemplateRequest) (DeploymentTemplateResponse, error)
func (DeploymentTemplateServiceImpl) GetDeploymentTemplateWithResolvedData ¶ added in v1.0.0
func (impl DeploymentTemplateServiceImpl) GetDeploymentTemplateWithResolvedData(ctx context.Context, request DeploymentTemplateRequest) (DeploymentTemplateResponse, error)
func (DeploymentTemplateServiceImpl) GetRestartWorkloadData ¶ added in v0.7.0
func (impl DeploymentTemplateServiceImpl) GetRestartWorkloadData(ctx context.Context, appIds []int, envId int) (*RestartPodResponse, error)
func (DeploymentTemplateServiceImpl) ResolveTemplateVariables ¶ added in v1.0.0
func (impl DeploymentTemplateServiceImpl) ResolveTemplateVariables(ctx context.Context, values string, request DeploymentTemplateRequest) (string, map[string]string, error)
type RequestDataMode ¶
type RequestDataMode int
const ( Values RequestDataMode = 1 Manifest RequestDataMode = 2 )
type ResourceIdentifierResponse ¶ added in v0.7.0
type ResourceIdentifierResponse struct {
ResourceMetaData []*ResourceMetadata `json:"resourceMetaData"`
AppName string `json:"appName"`
}
type ResourceMetadata ¶ added in v0.7.0
type ResourceMetadata struct {
Name string `json:"name"`
GroupVersionKind schema.GroupVersionKind `json:"groupVersionKind"`
}
type RestartPodResponse ¶ added in v0.7.0
type RestartPodResponse struct {
EnvironmentId int `json:"environmentId" `
Namespace string `json:"namespace"`
RestartPodMap map[int]*ResourceIdentifierResponse `json:"restartPodMap"`
}
type RestartWorkloadConfig ¶ added in v0.7.0
type RestartWorkloadConfig struct {
WorkerPoolSize int `env:"FEATURE_RESTART_WORKLOAD_WORKER_POOL_SIZE" envDefault:"5"`
RequestBatchSize int `env:"FEATURE_RESTART_WORKLOAD_BATCH_SIZE" envDefault:"1"`
}
func GetRestartWorkloadConfig ¶ added in v0.7.0
func GetRestartWorkloadConfig() (*RestartWorkloadConfig, error)
Click to show internal directories.
Click to hide internal directories.