Documentation ¶
Index ¶
- func AssignImageData(imageUrl string, matchData map[string]string) (map[string]interface{}, error)
- func ChartDeployed(render *templatemodels.ServiceRender, strategyMap map[string]string) bool
- func CheckDefineResourceParam(req setting.Request, reqSpec setting.RequestSpec) error
- func ClipVariableYaml(variableYaml string, validKeys []string) (string, error)
- func ClipVariableYamlNoErr(variableYaml string, validKeys []string) string
- func CopyAndUploadService(projectName, serviceName, currentChartPath string, copies []string, ...) error
- func CreateEnvServiceVersion(env *models.Product, prodSvc *models.ProductService, createBy string, ...) error
- func DeployStrategyChanged(serviceName string, strategyMapOld map[string]string, ...) bool
- func DownloadProductionServiceManifests(base, productName, serviceName string) error
- func DownloadServiceManifests(base, projectName, serviceName string, production bool) error
- func ExtractImageName(imageURI string) string
- func FilterKV(varKV *commonmodels.VariableKV, keySet sets.String) bool
- func GeneHelmMergedValues(productSvc *commonmodels.ProductService, defaultValues string, ...) (string, error)
- func GeneHelmRepo(chartRepo *commonmodels.HelmRepo) *repo.Entry
- func GeneImageURI(pathData map[string]string, flatMap map[string]interface{}) (string, error)
- func GenerateEnvServiceNextRevision(projectName, envName, serviceName string, isHelmChart bool) (int64, error)
- func GenerateServiceNextRevision(isProductionService bool, serviceName, projectName string) (int64, error)
- func GetPresetRules() []*templatemodels.ImageSearchingRule
- func GetProductUsedTemplateSvcs(prod *models.Product) ([]*models.Service, error)
- func GetReleaseDeployStrategy(releaseName string, strategyMap map[string]string) string
- func GetReleaseDeployStrategyKey(releaseName string) string
- func GetReleaseNameToChartNameMap(prod *models.Product) (map[string]string, error)
- func GetReleaseNameToServiceNameMap(prod *models.Product) (map[string]string, error)
- func GetServiceDeployStrategy(serviceName string, strategyMap map[string]string) string
- func GetServiceNameToReleaseNameMap(prod *models.Product) (map[string]string, error)
- func GetValidMatchData(spec *commonmodels.ImagePathSpec) map[string]string
- func ImproveTemplateExecuteErrReadability(err error) error
- func IsServiceVarsWildcard(serviceVars []string) bool
- func KVs2Set(kvs []*commonmodels.ServiceKeyVal) sets.String
- func MergeServiceVariableKVsAndKVInput(serviceKVs []*commontypes.ServiceVariableKV, kvinput util.KVInput) (string, []*commontypes.ServiceVariableKV, error)
- 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 PreLoadProductionServiceManifests(base string, svc *commonmodels.Service) error
- func PreLoadServiceManifests(base string, svc *commonmodels.Service, production bool) error
- func PreloadProductionServiceManifestsByRevision(base string, svc *commonmodels.Service) error
- func PreloadServiceManifestsByRevision(base string, svc *commonmodels.Service, production bool) error
- func ReleaseDeployed(releaseName string, strategyMap map[string]string) bool
- func RenderK8sSvcYaml(originYaml, productName, serviceName string, variableYamls ...string) (string, error)
- func RenderK8sSvcYamlStrict(originYaml, productName, serviceName string, variableYamls ...string) (string, error)
- func ReplaceImage(sourceYaml string, imageValuesMap ...map[string]interface{}) (string, error)
- func SaveAndUploadService(projectName, serviceName string, copies []string, fileTree fs.FS, ...) error
- func ServiceDeployed(serviceName string, strategyMap map[string]string) bool
- func SetChartDeployed(render *templatemodels.ServiceRender, strategyMap map[string]string)
- func SetChartServiceDeployStrategyDepoly(strategyMap map[string]string, releaseName string) map[string]string
- func SetChartServiceDeployStrategyImport(strategyMap map[string]string, releaseName string) map[string]string
- func SetCurrentContainerImages(args *commonmodels.Service) error
- func SetServiceDeployStrategyDepoly(strategyMap map[string]string, serviceName string) map[string]string
- func SetServiceDeployStrategyImport(strategyMap map[string]string, serviceName string) map[string]string
- func UpdateProductImage(envName, productName, serviceName string, targets map[string]string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignImageData ¶ added in v1.9.9
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 ChartDeployed ¶ added in v1.9.9
func ChartDeployed(render *templatemodels.ServiceRender, strategyMap map[string]string) bool
func CheckDefineResourceParam ¶
func CheckDefineResourceParam(req setting.Request, reqSpec setting.RequestSpec) error
func ClipVariableYaml ¶ added in v1.9.9
func ClipVariableYamlNoErr ¶ added in v1.9.9
func CopyAndUploadService ¶ added in v1.9.9
func CreateEnvServiceVersion ¶ added in v1.9.9
func CreateEnvServiceVersion(env *models.Product, prodSvc *models.ProductService, createBy string, log *zap.SugaredLogger) error
func DeployStrategyChanged ¶ added in v1.9.9
func DownloadProductionServiceManifests ¶ added in v1.9.9
func DownloadServiceManifests ¶ added in v1.9.9
func ExtractImageName ¶ added in v1.9.9
ExtractImageName extract image name from total image uri
func FilterKV ¶ added in v1.9.9
func FilterKV(varKV *commonmodels.VariableKV, keySet sets.String) bool
func GeneHelmMergedValues ¶ added in v1.9.9
func GeneHelmMergedValues(productSvc *commonmodels.ProductService, defaultValues string, renderChart *templatemodels.ServiceRender) (string, error)
@note can be deprecated or not? may duplicate with kube.GeneMergedValues
func GeneHelmRepo ¶ added in v1.9.9
func GeneHelmRepo(chartRepo *commonmodels.HelmRepo) *repo.Entry
func GeneImageURI ¶ added in v1.9.9
GeneImageURI generate valid image uri, legal formats: {repo} {repo}/ {namespace}/{image} {repo}/{image} {repo}/{image}:{tag} {repo}:{tag} {image}:{tag} {image}
func GenerateEnvServiceNextRevision ¶ added in v1.9.9
func GenerateServiceNextRevision ¶ added in v1.9.9
func GenerateServiceNextRevision(isProductionService bool, serviceName, projectName string) (int64, error)
GenerateServiceNextRevision is used to generate the next revision of the service
func GetPresetRules ¶ added in v1.9.9
func GetPresetRules() []*templatemodels.ImageSearchingRule
func GetProductUsedTemplateSvcs ¶ added in v1.9.9
func GetReleaseDeployStrategy ¶ added in v1.9.9
func GetReleaseDeployStrategyKey ¶ added in v1.9.9
func GetReleaseNameToChartNameMap ¶ added in v1.9.9
func GetReleaseNameToServiceNameMap ¶ added in v1.9.9
GetReleaseNameToServiceNameMap generates mapping relationship: releaseName=>serviceName
func GetServiceDeployStrategy ¶ added in v1.9.9
func GetServiceNameToReleaseNameMap ¶ added in v1.9.9
GetServiceNameToReleaseNameMap generates mapping relationship: serviceName=>releaseName
func GetValidMatchData ¶ added in v1.9.9
func GetValidMatchData(spec *commonmodels.ImagePathSpec) map[string]string
func ImproveTemplateExecuteErrReadability ¶ added in v1.9.9
func IsServiceVarsWildcard ¶ added in v1.9.9
func KVs2Set ¶ added in v1.9.9
func KVs2Set(kvs []*commonmodels.ServiceKeyVal) sets.String
func MergeServiceVariableKVsAndKVInput ¶ added in v1.9.9
func MergeServiceVariableKVsAndKVInput(serviceKVs []*commontypes.ServiceVariableKV, kvinput util.KVInput) (string, []*commontypes.ServiceVariableKV, error)
func ParseImagesByPresetRules ¶ added in v1.9.9
ParseImagesByPresetRules parse images from flat yaml map with preset rules
func ParseImagesByRules ¶ added in v1.9.9
func ParseImagesByRules(nested map[string]interface{}, matchRules []*templatemodels.ImageSearchingRule) ([]*commonmodels.Container, error)
func ParseImagesForProductService ¶ added in v1.9.9
func ParseImagesForProductService(nested map[string]interface{}, serviceName, productName string) ([]*commonmodels.Container, error)
ParseImagesForProductService for product service
func PreLoadProductionServiceManifests ¶ added in v1.9.9
func PreLoadProductionServiceManifests(base string, svc *commonmodels.Service) error
func PreLoadServiceManifests ¶ added in v1.9.9
func PreLoadServiceManifests(base string, svc *commonmodels.Service, production bool) error
func PreloadProductionServiceManifestsByRevision ¶ added in v1.9.9
func PreloadProductionServiceManifestsByRevision(base string, svc *commonmodels.Service) error
func PreloadServiceManifestsByRevision ¶ added in v1.9.9
func PreloadServiceManifestsByRevision(base string, svc *commonmodels.Service, production bool) error
func ReleaseDeployed ¶ added in v1.9.9
func RenderK8sSvcYaml ¶ added in v1.9.9
func RenderK8sSvcYaml(originYaml, productName, serviceName string, variableYamls ...string) (string, error)
@fixme MAY NOT support multi variableYamls, need to check won't return error if template key is missing values
func RenderK8sSvcYamlStrict ¶ added in v1.9.9
func RenderK8sSvcYamlStrict(originYaml, productName, serviceName string, variableYamls ...string) (string, error)
@fixme MAY NOT support multi variableYamls, need to check will return error if template key is missing values
func ReplaceImage ¶ added in v1.9.9
ReplaceImage replace image defines in yaml by new version
func SaveAndUploadService ¶ added in v1.9.9
func ServiceDeployed ¶ added in v1.9.9
func SetChartDeployed ¶ added in v1.9.9
func SetChartDeployed(render *templatemodels.ServiceRender, strategyMap map[string]string)
func SetChartServiceDeployStrategyDepoly ¶ added in v1.9.9
func SetChartServiceDeployStrategyImport ¶ added in v1.9.9
func SetCurrentContainerImages ¶ added in v1.9.9
func SetCurrentContainerImages(args *commonmodels.Service) error
func SetServiceDeployStrategyDepoly ¶ added in v1.9.9
func SetServiceDeployStrategyImport ¶ added in v1.9.9
func UpdateProductImage ¶ added in v1.9.9
func UpdateProductImage(envName, productName, serviceName string, targets map[string]string, userName string, logger *zap.SugaredLogger) error
update product image info
Types ¶
This section is empty.