generateManifest

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

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"`
}

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)
}

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 (DeploymentTemplateServiceImpl) GetDeploymentTemplate

func (DeploymentTemplateServiceImpl) GetRestartWorkloadData added in v0.7.0

func (impl DeploymentTemplateServiceImpl) GetRestartWorkloadData(ctx context.Context, appIds []int, envId int) (*RestartPodResponse, error)

type Kind added in v0.7.0

type Kind string
const (
	Deployment  Kind = "Deployment"
	StatefulSet Kind = "StatefulSet"
	DemonSet    Kind = "DemonSet"
	Rollout     Kind = "Rollout"
)

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)

Jump to

Keyboard shortcuts

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