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 CheckZadigEnterpriseLicense() error
- func CheckZadigProfessionalLicense() 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 DecodeRegistry(resp *models.RegistryNamespace) (*models.RegistryNamespace, 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 EnsureIstioGrayConfig(ctx context.Context, baseEnv *commonmodels.Product) error
- func ExtractImageName(imageURI string) string
- func FetchGrayEnvs(ctx context.Context, productName, clusterID, baseEnvName string) ([]*commonmodels.Product, error)
- func FilterKV(varKV *commonmodels.VariableKV, keySet sets.String) bool
- func GenIstioGatewayName(serviceName string) string
- 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 GetAWSRegistryCredential(id, ak, sk, region string) (realAK string, realSK string, err 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
- func ValidateZadigEnterpriseLicense(licenseStatus *plutusvendor.ZadigXLicenseStatus) bool
- func ValidateZadigProfessionalLicense(licenseStatus *plutusvendor.ZadigXLicenseStatus) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignImageData ¶
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 ¶
func ChartDeployed(render *templatemodels.ServiceRender, strategyMap map[string]string) bool
func CheckDefineResourceParam ¶
func CheckDefineResourceParam(req setting.Request, reqSpec setting.RequestSpec) error
func CheckZadigEnterpriseLicense ¶ added in v2.3.0
func CheckZadigEnterpriseLicense() error
func CheckZadigProfessionalLicense ¶ added in v2.3.0
func CheckZadigProfessionalLicense() error
func ClipVariableYaml ¶
func ClipVariableYamlNoErr ¶
func CopyAndUploadService ¶
func CreateEnvServiceVersion ¶
func CreateEnvServiceVersion(env *models.Product, prodSvc *models.ProductService, createBy string, session mongo.Session, log *zap.SugaredLogger) error
func DecodeRegistry ¶
func DecodeRegistry(resp *models.RegistryNamespace) (*models.RegistryNamespace, error)
func DeployStrategyChanged ¶
func EnsureIstioGrayConfig ¶
func EnsureIstioGrayConfig(ctx context.Context, baseEnv *commonmodels.Product) error
func ExtractImageName ¶
ExtractImageName extract image name from total image uri
func FetchGrayEnvs ¶
func FilterKV ¶
func FilterKV(varKV *commonmodels.VariableKV, keySet sets.String) bool
func GenIstioGatewayName ¶
func GeneHelmMergedValues ¶
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 ¶
func GeneHelmRepo(chartRepo *commonmodels.HelmRepo) *repo.Entry
func GeneImageURI ¶
GeneImageURI generate valid image uri, legal formats: {repo} {repo}/ {namespace}/{image} {repo}/{image} {repo}/{image}:{tag} {repo}:{tag} {image}:{tag} {image}
func GenerateServiceNextRevision ¶
func GenerateServiceNextRevision(isProductionService bool, serviceName, projectName string) (int64, error)
GenerateServiceNextRevision is used to generate the next revision of the service
func GetPresetRules ¶
func GetPresetRules() []*templatemodels.ImageSearchingRule
func GetReleaseNameToServiceNameMap ¶
GetReleaseNameToServiceNameMap generates mapping relationship: releaseName=>serviceName
func GetServiceNameToReleaseNameMap ¶
GetServiceNameToReleaseNameMap generates mapping relationship: serviceName=>releaseName
func GetValidMatchData ¶
func GetValidMatchData(spec *commonmodels.ImagePathSpec) map[string]string
func IsServiceVarsWildcard ¶
func KVs2Set ¶
func KVs2Set(kvs []*commonmodels.ServiceKeyVal) sets.String
func MergeServiceVariableKVsAndKVInput ¶
func MergeServiceVariableKVsAndKVInput(serviceKVs []*commontypes.ServiceVariableKV, kvinput util.KVInput) (string, []*commontypes.ServiceVariableKV, error)
func ParseImagesByPresetRules ¶
ParseImagesByPresetRules parse images from flat yaml map with preset rules
func ParseImagesByRules ¶
func ParseImagesByRules(nested map[string]interface{}, matchRules []*templatemodels.ImageSearchingRule) ([]*commonmodels.Container, error)
func ParseImagesForProductService ¶
func ParseImagesForProductService(nested map[string]interface{}, serviceName, productName string) ([]*commonmodels.Container, error)
ParseImagesForProductService for product service
func PreLoadProductionServiceManifests ¶
func PreLoadProductionServiceManifests(base string, svc *commonmodels.Service) error
func PreLoadServiceManifests ¶
func PreLoadServiceManifests(base string, svc *commonmodels.Service, production bool) error
func PreloadProductionServiceManifestsByRevision ¶
func PreloadProductionServiceManifestsByRevision(base string, svc *commonmodels.Service) error
func PreloadServiceManifestsByRevision ¶
func PreloadServiceManifestsByRevision(base string, svc *commonmodels.Service, production bool) error
func RenderK8sSvcYaml ¶
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 ¶
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 ¶
ReplaceImage replace image defines in yaml by new version
func SaveAndUploadService ¶
func SetChartDeployed ¶
func SetChartDeployed(render *templatemodels.ServiceRender, strategyMap map[string]string)
func SetCurrentContainerImages ¶
func SetCurrentContainerImages(args *commonmodels.Service) error
func UpdateProductImage ¶
func UpdateProductImage(envName, productName, serviceName string, targets map[string]string, userName string, logger *zap.SugaredLogger) error
update product image info
func ValidateZadigEnterpriseLicense ¶ added in v2.3.0
func ValidateZadigEnterpriseLicense(licenseStatus *plutusvendor.ZadigXLicenseStatus) bool
func ValidateZadigProfessionalLicense ¶ added in v2.3.0
func ValidateZadigProfessionalLicense(licenseStatus *plutusvendor.ZadigXLicenseStatus) bool
Types ¶
This section is empty.