Documentation ¶
Index ¶
- func AddDeliveryVersion(taskID int, productName, workflowName string, pipelineTask *taskmodels.Task, ...) error
- func AssignImageData(imageUrl string, matchData map[string]string) (map[string]interface{}, error)
- func CancelTask(userName, pipelineName string, taskID int64, typeString config.PipelineType, ...) error
- func CancelTaskV2(userName, pipelineName string, taskID int64, typeString config.PipelineType, ...) error
- func CancelWorkflowTaskV3(userName, pipelineName string, taskID int64, typeString config.PipelineType, ...) error
- func CopyAndUploadService(projectName, serviceName, currentChartPath string, copies []string) error
- func CreateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
- func CreateHelmRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func CreateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func Delete(name, productName string, log *zap.SugaredLogger) error
- func DeleteClusterResource(selector labels.Selector, clusterID string, log *zap.SugaredLogger) error
- func DeleteDeliveryInfos(productName string, log *zap.SugaredLogger) error
- func DeleteNamespaceIfMatch(namespace string, selector labels.Selector, clusterID string, ...) error
- func DeleteNamespacedResource(namespace string, selector labels.Selector, clusterID string, ...) error
- func DeletePipeline(pipelineName, requestID string, isDeletingProductTmpl bool, ...) error
- func DeletePipelines(productName, requestID string, log *zap.SugaredLogger) error
- func DeleteRenderSet(productName string, log *zap.SugaredLogger) error
- func DeleteServiceWebhookByName(serviceName, productName string, logger *zap.SugaredLogger)
- func DeleteTestModule(name, productName, requestID string, log *zap.SugaredLogger) error
- func DeleteWorkflow(workflowName, requestID string, isDeletingProductTmpl bool, ...) error
- func DeleteWorkflowV3(workflowID, workflowName, requestID string, log *zap.SugaredLogger) error
- func DeleteWorkflowV3s(productName, requestID string, log *zap.SugaredLogger) error
- func DeleteWorkflows(productName, requestID string, log *zap.SugaredLogger) error
- func DisableCronjobForWorkflow(workflow *models.Workflow) error
- func DownloadServiceManifests(base, projectName, serviceName string) error
- func EnsureDefaultRegistrySecret(namespace string, registryId string, kubeClient client.Client, ...) error
- func EnsureResp(build *commonmodels.Build)
- func EnsureSecretEnvs(existedKVs []*commonmodels.KeyVal, newKVs []*commonmodels.KeyVal)
- func ExtractImageName(imageURI string) string
- func ExtractImageRegistry(imageURI string) (string, error)
- func ExtractImageTag(imageURI string) string
- func ExtractRegistryNamespace(imageURI string) string
- func FillProductTemplateValuesYamls(tmpl *templatemodels.Product, log *zap.SugaredLogger) error
- func FillProductTemplateVars(productTemplates []*template.Product, log *zap.SugaredLogger) error
- func FilterWorkloadsByEnv(exist []commonmodels.Workload, env string) []commonmodels.Workload
- func FindDefaultRegistry(getRealCredential bool, log *zap.SugaredLogger) (reg *models.RegistryNamespace, isSystemDefault bool, err error)
- func FindRegistryById(registryId string, getRealCredential bool, log *zap.SugaredLogger) (reg *models.RegistryNamespace, isSystemDefault bool, err error)
- func GeneHelmRepo(chartRepo *commonmodels.HelmRepo) *repo.Entry
- func GeneImageURI(pathData map[string]string, flatMap map[string]interface{}) (string, error)
- func GetConfigPayload(codeHostID int) *models.ConfigPayload
- func GetDeliveryVersion(args *commonrepo.DeliveryVersionArgs, log *zap.SugaredLogger) (*commonmodels.DeliveryVersion, error)
- func GetDockerfileTemplateContent(id string) (string, error)
- func GetGitlabAddress(URL string) (string, error)
- func GetHelmServiceName(prod *models.Product, resType, resName string, kubeClient client.Client) (string, error)
- func GetLocalTestSuite(pipelineName, serviceName, testType string, taskID int64, testName string, ...) (*commonmodels.TestReport, error)
- func GetOwnerRepoBranchPath(URL string) (string, string, string, string, string, string, error)
- func GetPipelineInfo(pipelineName string, log *zap.SugaredLogger) (*commonmodels.Pipeline, error)
- func GetPresetRules() []*templatemodels.ImageSearchingRule
- func GetProductEnvNamespace(envName, productName, namespace string) string
- func GetProductTemplate(productName string, log *zap.SugaredLogger) (*template.Product, error)
- func GetProductUsedTemplateSvcs(prod *models.Product) ([]*models.Service, error)
- func GetRSAKey() ([]byte, []byte, error)
- func GetReleaseNameToServiceNameMap(prod *models.Product) (map[string]string, error)
- func GetRenderSet(renderName string, revision int64, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
- func GetRenderSetInfo(renderName string, revision int64) (*commonmodels.RenderSet, error)
- func GetServiceInvolvedProjects(services []*commonmodels.Service, skipProject string) (map[string][]string, error)
- func GetServiceTasks(log *zap.SugaredLogger) (map[string][]string, error)
- func GetServiceTemplate(serviceName, serviceType, productName, excludeStatus string, revision int64, ...) (*commonmodels.Service, error)
- func GetSubTaskContent(deliveryVersion *commonmodels.DeliveryVersion, pipelineTask *taskmodels.Task, ...)
- func GetWorkflowTaskCallback(taskID int64, pipelineName string) (*commonmodels.CallbackRequest, error)
- func HandleCallback(req *commonmodels.CallbackRequest) error
- func InsertDeliveryTest(args *commonmodels.DeliveryTest, log *zap.SugaredLogger) error
- func InsertDeliveryVersion(args *commonmodels.DeliveryVersion, log *zap.SugaredLogger) error
- func IsAllKeyCovered(arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func IsAllKeyCoveredService(productName, serviceName string, arg *commonmodels.RenderSet, ...) error
- func List(log *zap.SugaredLogger) []*models.Queue
- func ListHelmRepos(encryptedKey string, log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
- func ListRegistryNamespaces(encryptedKey string, getRealCredential bool, log *zap.SugaredLogger) ([]*models.RegistryNamespace, error)
- func ListServicesRenderKeys(services []*templatemodels.ServiceInfo, log *zap.SugaredLogger) ([]*templatemodels.RenderKV, error)
- func LogProductStats(user, event, prodName, requestID string, startTime int64, ...)
- func ParseImagesByPresetRules(flatMap map[string]interface{}) ([]map[string]string, error)
- func ParseImagesByRules(nested map[string]interface{}, matchRules []*templatemodels.ImageSearchingRule) ([]*commonmodels.Container, error)
- func ParseImagesForProductService(nested map[string]interface{}, serviceName, productName string) ([]*commonmodels.Container, error)
- func PreLoadServiceManifests(base string, svc *commonmodels.Service) error
- func PreloadServiceManifestsByRevision(base string, svc *commonmodels.Service) error
- func ProcessServiceWebhook(updated, current *commonmodels.Service, serviceName string, ...)
- func ProcessWebhook(updatedHooks, currentHooks interface{}, name string, logger *zap.SugaredLogger) error
- func Remove(task *models.Queue, log *zap.SugaredLogger) error
- func RenderValueForString(origin string, rs *commonmodels.RenderSet) string
- func ReplaceImage(sourceYaml string, imageValuesMap map[string]interface{}) (string, error)
- func ReplaceRuleVariable(rule string, replaceValue *Variable) string
- func SaveAndUploadService(projectName, serviceName string, copies []string, fileTree fs.FS) error
- func SendErrorMessage(sender, title, requestID string, err error, log *zap.SugaredLogger)
- func SendFailedTaskMessage(username, productName, name, requestID string, ...)
- func SendMessage(sender, title, content, requestID string, log *zap.SugaredLogger)
- func SetRenderDataStatus(rs *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func UpdateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
- func UpdatePmServiceTemplate(username string, args *ServiceTmplBuildObject, log *zap.SugaredLogger) error
- func UpdateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
- func UpdateSubRenderSet(name string, kvs []*templatemodels.RenderKV, log *zap.SugaredLogger) error
- func ValidateKVs(kvs []*templatemodels.RenderKV, services []*templatemodels.ServiceInfo, ...) error
- func ValidateRenderSet(productName, renderName string, serviceInfo *templatemodels.ServiceInfo, ...) (*commonmodels.RenderSet, error)
- type CronjobPayload
- type Empty
- type Features
- type FilterFunc
- type GetAesKeyFromEncryptedKeyResp
- type GetRSAPublicKeyRes
- type HookSet
- type IngressInfo
- type KVPair
- type PipelineResource
- type RenderChartArg
- type RepoConfig
- type ServiceProductMap
- type ServiceResp
- type ServiceTmplBuildObject
- type ServiceTmplObject
- type ServiceTmplResp
- type ValuesDataArgs
- type Variable
- type Workload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDeliveryVersion ¶
func AddDeliveryVersion(taskID int, productName, workflowName string, pipelineTask *taskmodels.Task, logger *zap.SugaredLogger) error
func AssignImageData ¶ added in v1.8.0
AssignImageData assign image url data into match data matchData: image=>absolute-path repo=>absolute-path tag=>absolute-path return: absolute-image-path=>image-value absolute-repo-path=>repo-value absolute-tag-path=>tag-value
func CancelTask ¶
func CancelTask(userName, pipelineName string, taskID int64, typeString config.PipelineType, reqID string, log *zap.SugaredLogger) error
func CancelTaskV2 ¶
func CancelTaskV2(userName, pipelineName string, taskID int64, typeString config.PipelineType, requestID string, log *zap.SugaredLogger) error
func CancelWorkflowTaskV3 ¶ added in v1.8.0
func CancelWorkflowTaskV3(userName, pipelineName string, taskID int64, typeString config.PipelineType, requestID string, log *zap.SugaredLogger) error
func CopyAndUploadService ¶ added in v1.9.9
func CreateBuild ¶
func CreateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
func CreateHelmRenderSet ¶ added in v1.2.0
func CreateHelmRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
CreateHelmRenderSet 添加renderSet
func CreateRenderSet ¶
func CreateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
func DeleteClusterResource ¶ added in v1.9.9
func DeleteDeliveryInfos ¶
func DeleteDeliveryInfos(productName string, log *zap.SugaredLogger) error
func DeleteNamespaceIfMatch ¶ added in v1.9.9
func DeleteNamespacedResource ¶ added in v1.9.9
func DeleteNamespacedResource(namespace string, selector labels.Selector, clusterID string, log *zap.SugaredLogger) error
DeleteNamespacedResource deletes the namespaced resources by labels.
func DeletePipeline ¶
func DeletePipeline(pipelineName, requestID string, isDeletingProductTmpl bool, log *zap.SugaredLogger) error
func DeletePipelines ¶
func DeletePipelines(productName, requestID string, log *zap.SugaredLogger) error
func DeleteRenderSet ¶
func DeleteRenderSet(productName string, log *zap.SugaredLogger) error
func DeleteServiceWebhookByName ¶ added in v1.3.0
func DeleteServiceWebhookByName(serviceName, productName string, logger *zap.SugaredLogger)
func DeleteTestModule ¶
func DeleteTestModule(name, productName, requestID string, log *zap.SugaredLogger) error
func DeleteWorkflow ¶
func DeleteWorkflow(workflowName, requestID string, isDeletingProductTmpl bool, log *zap.SugaredLogger) error
func DeleteWorkflowV3 ¶ added in v1.8.0
func DeleteWorkflowV3(workflowID, workflowName, requestID string, log *zap.SugaredLogger) error
func DeleteWorkflowV3s ¶ added in v1.8.0
func DeleteWorkflowV3s(productName, requestID string, log *zap.SugaredLogger) error
func DeleteWorkflows ¶
func DeleteWorkflows(productName, requestID string, log *zap.SugaredLogger) error
func DisableCronjobForWorkflow ¶ added in v1.9.9
func DownloadServiceManifests ¶ added in v1.4.0
func EnsureResp ¶
func EnsureResp(build *commonmodels.Build)
func EnsureSecretEnvs ¶
func EnsureSecretEnvs(existedKVs []*commonmodels.KeyVal, newKVs []*commonmodels.KeyVal)
EnsureSecretEnvs 转换敏感信息前端传入的Mask内容为真实内容
func ExtractImageName ¶ added in v1.5.0
ExtractImageName extract image name from total image uri
func ExtractImageRegistry ¶ added in v1.8.0
ExtractImageRegistry extract registry url from total image uri
func ExtractImageTag ¶ added in v1.8.0
ExtractImageTag extract image tag from total image uri
func ExtractRegistryNamespace ¶ added in v1.8.0
ExtractRegistryNamespace extract registry namespace from image uri
func FillProductTemplateValuesYamls ¶
func FillProductTemplateValuesYamls(tmpl *templatemodels.Product, log *zap.SugaredLogger) error
FillProductTemplateValuesYamls 返回renderSet中的renderChart信息
func FillProductTemplateVars ¶
func FillProductTemplateVars(productTemplates []*template.Product, log *zap.SugaredLogger) error
func FilterWorkloadsByEnv ¶ added in v1.9.9
func FilterWorkloadsByEnv(exist []commonmodels.Workload, env string) []commonmodels.Workload
func FindDefaultRegistry ¶
func FindDefaultRegistry(getRealCredential bool, log *zap.SugaredLogger) (reg *models.RegistryNamespace, isSystemDefault bool, err error)
func FindRegistryById ¶ added in v1.8.0
func FindRegistryById(registryId string, getRealCredential bool, log *zap.SugaredLogger) (reg *models.RegistryNamespace, isSystemDefault bool, err error)
func GeneHelmRepo ¶ added in v1.11.0
func GeneHelmRepo(chartRepo *commonmodels.HelmRepo) *repo.Entry
func GeneImageURI ¶ added in v1.5.0
GeneImageURI generate valid image uri, legal formats: {repo} {repo}/{image} {repo}/{image}:{tag} {repo}:{tag} {image}:{tag} {image}
func GetConfigPayload ¶
func GetConfigPayload(codeHostID int) *models.ConfigPayload
func GetDeliveryVersion ¶
func GetDeliveryVersion(args *commonrepo.DeliveryVersionArgs, log *zap.SugaredLogger) (*commonmodels.DeliveryVersion, error)
func GetDockerfileTemplateContent ¶ added in v1.7.0
func GetGitlabAddress ¶
func GetHelmServiceName ¶ added in v1.7.1
func GetHelmServiceName(prod *models.Product, resType, resName string, kubeClient client.Client) (string, error)
GetHelmServiceName get service name from annotations of resources deployed by helm resType currently only support Deployment and StatefulSet this function needs to be optimized
func GetLocalTestSuite ¶
func GetLocalTestSuite(pipelineName, serviceName, testType string, taskID int64, testName string, typeString config.PipelineType, log *zap.SugaredLogger) (*commonmodels.TestReport, error)
func GetOwnerRepoBranchPath ¶
GetOwnerRepoBranchPath 获取gitlab路径中的owner、repo、branch和path
func GetPipelineInfo ¶
func GetPipelineInfo(pipelineName string, log *zap.SugaredLogger) (*commonmodels.Pipeline, error)
func GetPresetRules ¶ added in v1.5.0
func GetPresetRules() []*templatemodels.ImageSearchingRule
func GetProductEnvNamespace ¶
func GetProductTemplate ¶
func GetProductUsedTemplateSvcs ¶ added in v1.11.0
func GetReleaseNameToServiceNameMap ¶ added in v1.11.0
GetReleaseNameToServiceNameMap generates mapping relationship: releaseName=>serviceName
func GetRenderSet ¶
func GetRenderSet(renderName string, revision int64, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
func GetRenderSetInfo ¶
func GetRenderSetInfo(renderName string, revision int64) (*commonmodels.RenderSet, error)
func GetServiceInvolvedProjects ¶ added in v1.3.1
func GetServiceInvolvedProjects(services []*commonmodels.Service, skipProject string) (map[string][]string, error)
GetServiceInvolvedProjects returns a map, key is a service name, value is a list of all projects which are using this service. The given services must come from same project to make sure all service names are unique.
func GetServiceTasks ¶
func GetServiceTasks(log *zap.SugaredLogger) (map[string][]string, error)
func GetServiceTemplate ¶
func GetServiceTemplate(serviceName, serviceType, productName, excludeStatus string, revision int64, log *zap.SugaredLogger) (*commonmodels.Service, error)
func GetSubTaskContent ¶
func GetSubTaskContent(deliveryVersion *commonmodels.DeliveryVersion, pipelineTask *taskmodels.Task, log *zap.SugaredLogger)
TODO: LOU rewrite it
func GetWorkflowTaskCallback ¶ added in v1.9.9
func GetWorkflowTaskCallback(taskID int64, pipelineName string) (*commonmodels.CallbackRequest, error)
func HandleCallback ¶ added in v1.8.0
func HandleCallback(req *commonmodels.CallbackRequest) error
func InsertDeliveryTest ¶
func InsertDeliveryTest(args *commonmodels.DeliveryTest, log *zap.SugaredLogger) error
func InsertDeliveryVersion ¶
func InsertDeliveryVersion(args *commonmodels.DeliveryVersion, log *zap.SugaredLogger) error
func IsAllKeyCovered ¶
func IsAllKeyCovered(arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
IsAllKeyCovered 检查是否覆盖所有产品key
func IsAllKeyCoveredService ¶
func IsAllKeyCoveredService(productName, serviceName string, arg *commonmodels.RenderSet, log *zap.SugaredLogger) error
IsAllKeyCoveredService 检查是否覆盖所有服务key
func ListHelmRepos ¶
func ListHelmRepos(encryptedKey string, log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
func ListRegistryNamespaces ¶
func ListRegistryNamespaces(encryptedKey string, getRealCredential bool, log *zap.SugaredLogger) ([]*models.RegistryNamespace, error)
func ListServicesRenderKeys ¶
func ListServicesRenderKeys(services []*templatemodels.ServiceInfo, log *zap.SugaredLogger) ([]*templatemodels.RenderKV, error)
func LogProductStats ¶
func LogProductStats(user, event, prodName, requestID string, startTime int64, log *zap.SugaredLogger)
func ParseImagesByPresetRules ¶ added in v1.5.0
ParseImagesByPresetRules parse images from flat yaml map with preset rules
func ParseImagesByRules ¶ added in v1.5.0
func ParseImagesByRules(nested map[string]interface{}, matchRules []*templatemodels.ImageSearchingRule) ([]*commonmodels.Container, error)
func ParseImagesForProductService ¶ added in v1.5.0
func ParseImagesForProductService(nested map[string]interface{}, serviceName, productName string) ([]*commonmodels.Container, error)
ParseImagesForProductService for product service
func PreLoadServiceManifests ¶ added in v1.4.0
func PreLoadServiceManifests(base string, svc *commonmodels.Service) error
func PreloadServiceManifestsByRevision ¶ added in v1.7.1
func PreloadServiceManifestsByRevision(base string, svc *commonmodels.Service) error
func ProcessServiceWebhook ¶ added in v1.3.0
func ProcessServiceWebhook(updated, current *commonmodels.Service, serviceName string, logger *zap.SugaredLogger)
func ProcessWebhook ¶ added in v1.3.0
func ProcessWebhook(updatedHooks, currentHooks interface{}, name string, logger *zap.SugaredLogger) error
func RenderValueForString ¶
func RenderValueForString(origin string, rs *commonmodels.RenderSet) string
func ReplaceImage ¶ added in v1.8.0
ReplaceImage replace image defines in yaml by new version
func ReplaceRuleVariable ¶ added in v1.6.0
func SaveAndUploadService ¶ added in v1.4.0
func SendErrorMessage ¶
func SendErrorMessage(sender, title, requestID string, err error, log *zap.SugaredLogger)
func SendFailedTaskMessage ¶
func SendFailedTaskMessage(username, productName, name, requestID string, workflowType config.PipelineType, err error, log *zap.SugaredLogger)
func SendMessage ¶
func SendMessage(sender, title, content, requestID string, log *zap.SugaredLogger)
func SetRenderDataStatus ¶
func SetRenderDataStatus(rs *commonmodels.RenderSet, log *zap.SugaredLogger) error
func UpdateBuild ¶
func UpdateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error
func UpdatePmServiceTemplate ¶ added in v1.2.0
func UpdatePmServiceTemplate(username string, args *ServiceTmplBuildObject, log *zap.SugaredLogger) error
func UpdateRenderSet ¶
func UpdateRenderSet(args *commonmodels.RenderSet, log *zap.SugaredLogger) error
func UpdateSubRenderSet ¶
func UpdateSubRenderSet(name string, kvs []*templatemodels.RenderKV, log *zap.SugaredLogger) error
func ValidateKVs ¶
func ValidateKVs(kvs []*templatemodels.RenderKV, services []*templatemodels.ServiceInfo, log *zap.SugaredLogger) error
func ValidateRenderSet ¶
func ValidateRenderSet(productName, renderName string, serviceInfo *templatemodels.ServiceInfo, log *zap.SugaredLogger) (*commonmodels.RenderSet, error)
ValidateRenderSet 检查指定renderSet是否能覆盖产品所有需要渲染的值
Types ¶
type CronjobPayload ¶
type FilterFunc ¶ added in v1.5.0
type GetAesKeyFromEncryptedKeyResp ¶ added in v1.9.9
type GetAesKeyFromEncryptedKeyResp struct {
PlainText string `json:"plain_text"`
}
func GetAesKeyFromEncryptedKey ¶ added in v1.9.9
func GetAesKeyFromEncryptedKey(encryptedKey string, log *zap.SugaredLogger) (*GetAesKeyFromEncryptedKeyResp, error)
type GetRSAPublicKeyRes ¶ added in v1.9.9
type GetRSAPublicKeyRes struct {
PublicKey string `json:"publicKey"`
}
func GetRSAPublicKey ¶ added in v1.9.9
func GetRSAPublicKey() (*GetRSAPublicKeyRes, error)
type HookSet ¶ added in v1.3.0
type HookSet map[hookUniqueID]hookItem
func NewHookSet ¶ added in v1.3.0
func NewHookSet(items ...hookItem) HookSet
NewHookSet creates a HookSet from a list of values.
func (HookSet) Difference ¶ added in v1.3.0
Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}
type IngressInfo ¶
type KVPair ¶ added in v1.5.0
type KVPair struct { Key string `json:"key"` Value interface{} `json:"value"` }
type PipelineResource ¶
type RenderChartArg ¶ added in v1.5.0
type RenderChartArg struct { EnvName string `json:"envName,omitempty"` ServiceName string `json:"serviceName,omitempty"` ChartVersion string `json:"chartVersion,omitempty"` OverrideValues []*KVPair `json:"overrideValues,omitempty"` OverrideYaml string `json:"overrideYaml,omitempty"` ValuesData *ValuesDataArgs `json:"valuesData,omitempty"` YamlData *templatemodels.CustomYaml `json:"yaml_data,omitempty"` }
func GetRenderCharts ¶ added in v1.10.0
func GetRenderCharts(productName, envName, serviceName string, log *zap.SugaredLogger) ([]*RenderChartArg, error)
func (*RenderChartArg) FillRenderChartModel ¶ added in v1.5.0
func (args *RenderChartArg) FillRenderChartModel(chart *templatemodels.RenderChart, version string)
FillRenderChartModel fill render chart model
func (*RenderChartArg) LoadFromRenderChartModel ¶ added in v1.5.0
func (args *RenderChartArg) LoadFromRenderChartModel(chart *templatemodels.RenderChart)
LoadFromRenderChartModel load from render chart model
func (*RenderChartArg) ToOverrideValueString ¶ added in v1.6.0
func (args *RenderChartArg) ToOverrideValueString() string
type RepoConfig ¶ added in v1.5.0
type ServiceProductMap ¶
type ServiceProductMap struct { Service string `json:"service_name"` Source string `json:"source"` Type string `json:"type"` Product []string `json:"product"` ProductName string `json:"product_name"` Containers []*commonmodels.Container `json:"containers,omitempty"` Visibility string `json:"visibility,omitempty"` CodehostID int `json:"codehost_id"` RepoOwner string `json:"repo_owner"` RepoName string `json:"repo_name"` RepoUUID string `json:"repo_uuid"` BranchName string `json:"branch_name"` LoadPath string `json:"load_path"` LoadFromDir bool `json:"is_dir"` GerritRemoteName string `json:"gerrit_remote_name,omitempty"` }
type ServiceResp ¶
type ServiceResp struct { ServiceName string `json:"service_name"` ServiceDisplayName string `json:"service_display_name"` Type string `json:"type"` Status string `json:"status"` Images []string `json:"images,omitempty"` ProductName string `json:"product_name"` EnvName string `json:"env_name"` Ingress *IngressInfo `json:"ingress"` Ready string `json:"ready"` EnvStatuses []*models.EnvStatus `json:"env_statuses,omitempty"` WorkLoadType string `json:"workLoadType"` Revision int64 `json:"revision"` EnvConfigs []*models.EnvConfig `json:"env_configs"` }
产品列表页服务Response
func ListWorkloads ¶ added in v1.5.0
func ListWorkloads(envName, clusterID, namespace, productName string, perPage, page int, log *zap.SugaredLogger, filter ...FilterFunc) (int, []*ServiceResp, error)
func ListWorkloadsInEnv ¶ added in v1.5.0
func ListWorkloadsInEnv(envName, productName, filter string, perPage, page int, log *zap.SugaredLogger) (int, []*ServiceResp, error)
ListWorkloadsInEnv returns all workloads in the given env which meat the filter. A filter is in this format: a=b,c=d, and it is a fuzzy matching. Which means it will return all records with a field called a and the value contain character b.
type ServiceTmplBuildObject ¶
type ServiceTmplBuildObject struct { ServiceTmplObject *ServiceTmplObject `json:"pm_service_tmpl"` Build *commonmodels.Build `json:"build"` }
type ServiceTmplObject ¶
type ServiceTmplObject struct { ProductName string `json:"product_name"` ServiceName string `json:"service_name"` Visibility string `json:"visibility"` Revision int64 `json:"revision"` Type string `json:"type"` Username string `json:"username"` EnvConfigs []*commonmodels.EnvConfig `json:"env_configs"` EnvStatuses []*commonmodels.EnvStatus `json:"env_statuses,omitempty"` From string `json:"from,omitempty"` HealthChecks []*commonmodels.PmHealthCheck `json:"health_checks"` EnvName string `json:"env_name"` }
type ServiceTmplResp ¶
type ServiceTmplResp struct { Data []*ServiceProductMap `json:"data"` Total int `json:"total"` }
func ListServiceTemplate ¶
func ListServiceTemplate(productName string, log *zap.SugaredLogger) (*ServiceTmplResp, error)
ListServiceTemplate 列出服务模板
func ListWorkloadTemplate ¶ added in v1.5.0
func ListWorkloadTemplate(productName, envName string, log *zap.SugaredLogger) (*ServiceTmplResp, error)
ListWorkloadTemplate 列出实例模板
type ValuesDataArgs ¶ added in v1.9.9
type ValuesDataArgs struct { YamlSource string `json:"yamlSource,omitempty"` AutoSync bool `json:"autoSync,omitempty"` GitRepoConfig *RepoConfig `json:"gitRepoConfig,omitempty"` }
type Workload ¶ added in v1.5.0
type Workload struct { EnvName string `json:"env_name"` Name string `json:"name"` Type string `json:"type"` ProductName string `json:"product_name"` Spec corev1.PodTemplateSpec `json:"-"` Images []string `json:"-"` Ready bool `json:"ready"` ServiceName string `json:"service_name"` Annotation map[string]string `json:"-"` }