Documentation ¶
Index ¶
- type Auth
- type Basic
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) error
- func (c *Client) GetResource(version, url string) (string, error)
- func (c *Client) Init()
- func (c *Client) Login(user, pass string, biz bool) (*Auth, error)
- func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)
- type Data
- type DockerRegistry
- type InstallDefinition
- func (i *InstallDefinition) CheckReleaseDomain(values []c7nclient.ChartValue) error
- func (i *InstallDefinition) CreatePersistence(r *Release, client *c7nclient.K8sClient, namespace string)
- func (i *InstallDefinition) EncryptGitlabAccessToken() string
- func (i *InstallDefinition) GetDatabaseUrl(rls string) string
- func (i *InstallDefinition) GetEurekaUrl() string
- func (i *InstallDefinition) GetImageRepository() string
- func (i *InstallDefinition) GetPersistence(rls string, index int) *Persistence
- func (i *InstallDefinition) GetReleaseName(rlsName string) string
- func (i *InstallDefinition) GetReleaseValue(rls, value string) string
- func (i *InstallDefinition) GetResource(rls string) *c7ncfg.Resource
- func (i *InstallDefinition) GetResourceDomainUrl(rls string) string
- func (i *InstallDefinition) GetRunnerPersistence(index int) *Persistence
- func (i *InstallDefinition) GetRunnerValues(values string) string
- func (i *InstallDefinition) GetStorageClass() string
- func (i *InstallDefinition) IsApplication(name string) bool
- func (i *InstallDefinition) IsName(name string) bool
- func (i *InstallDefinition) IsReleases(name string) bool
- func (i *InstallDefinition) IsThinMode() bool
- func (i *InstallDefinition) MergerConfig(uc *c7ncfg.C7nConfig)
- func (i *InstallDefinition) PrintRelease(name string)
- func (i *InstallDefinition) RenderHelmValues(r *Release, fileVals string) (map[string]interface{}, error)
- func (i *InstallDefinition) RenderReleases(name string, client *c7nclient.K8sClient, namespace string) error
- func (i *InstallDefinition) SetChartRepository(chartRepo string)
- func (i *InstallDefinition) SetDatasourceTpl(dsTpl string)
- func (i *InstallDefinition) SetImageRepository(imageRepo string)
- func (i *InstallDefinition) SetPrefix(prefix string)
- func (i *InstallDefinition) SetStorageClass(sc string)
- func (i *InstallDefinition) SetThinMode(thinMode bool)
- func (i *InstallDefinition) WithPrefix() string
- type Metadata
- type Persistence
- type Release
- type ReleaseJob
- type Request
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basic ¶
type Basic struct { CommonLabels map[string]string DefaultAccessModes []v1.PersistentVolumeAccessMode StorageClass string DockerRegistry []DockerRegistry Prefix string // 默认为空 ImageRepository string ChartRepository string DatasourceTpl string ThinMode bool SkipInput bool Timeout int Slaver c7nslaver.Slaver }
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string Business bool Username string Password string // contains filtered or unexported fields }
type DockerRegistry ¶
type InstallDefinition ¶
type InstallDefinition struct { // api 版本 Version string // Choerodon 平台版本 PaaSVersion string Metadata Metadata Spec Spec }
func (*InstallDefinition) CheckReleaseDomain ¶
func (i *InstallDefinition) CheckReleaseDomain(values []c7nclient.ChartValue) error
func (*InstallDefinition) CreatePersistence ¶
func (i *InstallDefinition) CreatePersistence(r *Release, client *c7nclient.K8sClient, namespace string)
func (*InstallDefinition) EncryptGitlabAccessToken ¶
func (i *InstallDefinition) EncryptGitlabAccessToken() string
func (*InstallDefinition) GetDatabaseUrl ¶
func (i *InstallDefinition) GetDatabaseUrl(rls string) string
func (*InstallDefinition) GetEurekaUrl ¶
func (i *InstallDefinition) GetEurekaUrl() string
func (*InstallDefinition) GetImageRepository ¶
func (i *InstallDefinition) GetImageRepository() string
func (*InstallDefinition) GetPersistence ¶
func (i *InstallDefinition) GetPersistence(rls string, index int) *Persistence
func (*InstallDefinition) GetReleaseName ¶
func (i *InstallDefinition) GetReleaseName(rlsName string) string
func (*InstallDefinition) GetReleaseValue ¶
func (i *InstallDefinition) GetReleaseValue(rls, value string) string
func (*InstallDefinition) GetResource ¶
func (i *InstallDefinition) GetResource(rls string) *c7ncfg.Resource
func (*InstallDefinition) GetResourceDomainUrl ¶
func (i *InstallDefinition) GetResourceDomainUrl(rls string) string
func (*InstallDefinition) GetRunnerPersistence ¶
func (i *InstallDefinition) GetRunnerPersistence(index int) *Persistence
func (*InstallDefinition) GetRunnerValues ¶
func (i *InstallDefinition) GetRunnerValues(values string) string
func (*InstallDefinition) GetStorageClass ¶
func (i *InstallDefinition) GetStorageClass() string
TODO add storageClassName()
func (*InstallDefinition) IsApplication ¶
func (i *InstallDefinition) IsApplication(name string) bool
func (*InstallDefinition) IsName ¶
func (i *InstallDefinition) IsName(name string) bool
func (*InstallDefinition) IsReleases ¶
func (i *InstallDefinition) IsReleases(name string) bool
func (*InstallDefinition) IsThinMode ¶
func (i *InstallDefinition) IsThinMode() bool
func (*InstallDefinition) MergerConfig ¶
func (i *InstallDefinition) MergerConfig(uc *c7ncfg.C7nConfig)
将 config.yml 中的值合并到 Release.Resource
func (*InstallDefinition) PrintRelease ¶
func (i *InstallDefinition) PrintRelease(name string)
func (*InstallDefinition) RenderHelmValues ¶
func (i *InstallDefinition) RenderHelmValues(r *Release, fileVals string) (map[string]interface{}, error)
必须基于 InstallDefinition 渲染 value.yaml 文件
func (*InstallDefinition) RenderReleases ¶
func (*InstallDefinition) SetChartRepository ¶
func (i *InstallDefinition) SetChartRepository(chartRepo string)
func (*InstallDefinition) SetDatasourceTpl ¶
func (i *InstallDefinition) SetDatasourceTpl(dsTpl string)
func (*InstallDefinition) SetImageRepository ¶
func (i *InstallDefinition) SetImageRepository(imageRepo string)
func (*InstallDefinition) SetPrefix ¶
func (i *InstallDefinition) SetPrefix(prefix string)
func (*InstallDefinition) SetStorageClass ¶
func (i *InstallDefinition) SetStorageClass(sc string)
func (*InstallDefinition) SetThinMode ¶
func (i *InstallDefinition) SetThinMode(thinMode bool)
func (*InstallDefinition) WithPrefix ¶
func (i *InstallDefinition) WithPrefix() string
template 内嵌函数
type Persistence ¶
type Persistence struct { Client *c7nclient.K8sClient CommonLabels map[string]string AccessModes []v1.PersistentVolumeAccessMode Capacity v1.ResourceList Name string PvcEnabled bool Path string RootPath string Size string Namespace string RefPvName string RefPvcName string Mode string Own string MountOptions []string StorageClass string }
func (*Persistence) CheckOrCreatePv ¶
func (p *Persistence) CheckOrCreatePv(pvs v1.PersistentVolumeSource) error
check and create pv with defined pv schema
func (*Persistence) CheckOrCreatePvc ¶
func (p *Persistence) CheckOrCreatePvc(sc string) error
type Release ¶
type Release struct { Name string Chart string Version string Namespace string RepoURL string Values []c7nclient.ChartValue Persistence []*Persistence PreInstall []ReleaseJob AfterInstall []ReleaseJob Requirements []string Resource *config.Resource // TODO Remove Timeout int Prefix string SkipInput bool PaaSVersion string }
func (*Release) ExecuteAfterTasks ¶
执行 after Task,完成后更新任务状态,并执行 wg.done
func (*Release) HelmValues ¶
convert yml values to values list as xxx=yyy
type ReleaseJob ¶
type Request ¶
type Request struct { Header []c7nclient.ChartValue Url string Parameters []c7nclient.ChartValue Body string Method string }
Click to show internal directories.
Click to hide internal directories.