Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertJsonToYaml(data []byte) ([]byte, error)
- func GetLabelString(m map[string]string) string
- func GetStringFromValues(vals map[string]interface{}, key string) (string, bool)
- type HelmHandler
- func (p *HelmHandler) CheckClusterNameIsUnique(clusterName string) error
- func (p *HelmHandler) DeleteRelease(releaseName string, purge bool) error
- func (p *HelmHandler) InstallReleaseFromChart(c *chart.Chart, ns string, rawVals []byte, releaseName string) error
- func (p *HelmHandler) ReleaseStatus(releaseName string) (*rls.GetReleaseStatusResponse, error)
- func (p *HelmHandler) RollbackRelease(releaseName string) error
- func (p *HelmHandler) UpdateReleaseFromChart(releaseName string, c *chart.Chart, rawVals []byte) error
- type JobDirective
- type KubeHandler
- func (p *KubeHandler) CheckApiVersionsSupported(apiVersions []string) error
- func (p *KubeHandler) DescribeClusterDetails(clusterWrapper *models.ClusterWrapper) error
- func (p *KubeHandler) DescribeRuntimeProviderZones(credential string) ([]string, error)
- func (p *KubeHandler) ValidateCredential(credential, zone string) error
- func (p *KubeHandler) WaitWorkloadReady(runtimeId, namespace string, clusterRoles map[string]*models.ClusterRole, ...) error
- type Parser
- type Provider
- func (p *Provider) CheckResource(ctx context.Context, clusterWrapper *models.ClusterWrapper) error
- func (p *Provider) DescribeClusterDetails(ctx context.Context, clusterWrapper *models.ClusterWrapper) error
- func (p *Provider) DescribeRuntimeProviderZones(ctx context.Context, url, credential string) ([]string, error)
- func (p *Provider) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
- func (p *Provider) DescribeVpc(ctx context.Context, runtimeId, vpcId string) (*models.Vpc, error)
- func (p *Provider) HandleSubtask(ctx context.Context, task *models.Task) error
- func (p *Provider) ParseClusterConf(ctx context.Context, versionId, runtimeId, conf string, ...) error
- func (p *Provider) SplitJobIntoTasks(ctx context.Context, job *models.Job) (*models.TaskLayer, error)
- func (p *Provider) UpdateClusterStatus(ctx context.Context, job *models.Job) error
- func (p *Provider) ValidateCredential(ctx context.Context, runtimeId, url, credential, zone string) error
- func (p *Provider) WaitSubtask(ctx context.Context, task *models.Task) error
- type TaskDirective
Constants ¶
View Source
const ( RuntimeAnnotationKey = "openpitrix_runtime" DeploymentFlag = "-Deployment" StatefulSetFlag = "-StatefulSet" DaemonSetFlag = "-DaemonSet" )
Variables ¶
View Source
var ( ClusterNameReg = `^[a-z]([-a-z0-9]*[a-z0-9])?$` ClusterNameRegExp = regexp.MustCompile(ClusterNameReg) )
View Source
var ( NamespaceReg = `^[a-z]([-a-z0-9]*[a-z0-9])?$` NamespaceRegExp = regexp.MustCompile(NamespaceReg) )
Functions ¶
func ConvertJsonToYaml ¶ added in v0.1.8
func GetLabelString ¶ added in v0.1.8
Types ¶
type HelmHandler ¶ added in v0.1.8
type HelmHandler struct { RuntimeId string // contains filtered or unexported fields }
func GetHelmHandler ¶ added in v0.1.8
func GetHelmHandler(ctx context.Context, runtimeId string) *HelmHandler
func (*HelmHandler) CheckClusterNameIsUnique ¶ added in v0.1.8
func (p *HelmHandler) CheckClusterNameIsUnique(clusterName string) error
func (*HelmHandler) DeleteRelease ¶ added in v0.1.8
func (p *HelmHandler) DeleteRelease(releaseName string, purge bool) error
func (*HelmHandler) InstallReleaseFromChart ¶ added in v0.1.8
func (*HelmHandler) ReleaseStatus ¶ added in v0.1.8
func (p *HelmHandler) ReleaseStatus(releaseName string) (*rls.GetReleaseStatusResponse, error)
func (*HelmHandler) RollbackRelease ¶ added in v0.1.8
func (p *HelmHandler) RollbackRelease(releaseName string) error
func (*HelmHandler) UpdateReleaseFromChart ¶ added in v0.1.8
type JobDirective ¶
type KubeHandler ¶ added in v0.1.8
type KubeHandler struct { RuntimeId string // contains filtered or unexported fields }
func GetKubeHandler ¶ added in v0.1.8
func GetKubeHandler(ctx context.Context, runtimeId string) *KubeHandler
func (*KubeHandler) CheckApiVersionsSupported ¶ added in v0.1.8
func (p *KubeHandler) CheckApiVersionsSupported(apiVersions []string) error
func (*KubeHandler) DescribeClusterDetails ¶ added in v0.2.1
func (p *KubeHandler) DescribeClusterDetails(clusterWrapper *models.ClusterWrapper) error
func (*KubeHandler) DescribeRuntimeProviderZones ¶ added in v0.1.8
func (p *KubeHandler) DescribeRuntimeProviderZones(credential string) ([]string, error)
func (*KubeHandler) ValidateCredential ¶ added in v0.1.8
func (p *KubeHandler) ValidateCredential(credential, zone string) error
func (*KubeHandler) WaitWorkloadReady ¶ added in v0.2.1
func (p *KubeHandler) WaitWorkloadReady(runtimeId, namespace string, clusterRoles map[string]*models.ClusterRole, timeout time.Duration, waitInterval time.Duration) error
type Parser ¶
type Provider ¶
type Provider struct{}
func NewProvider ¶
func NewProvider() *Provider
func (*Provider) CheckResource ¶ added in v0.1.7
func (*Provider) DescribeClusterDetails ¶ added in v0.2.1
func (*Provider) DescribeRuntimeProviderZones ¶
func (*Provider) DescribeSubnets ¶
func (p *Provider) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
func (*Provider) DescribeVpc ¶
func (*Provider) HandleSubtask ¶
func (*Provider) ParseClusterConf ¶
func (*Provider) SplitJobIntoTasks ¶
func (*Provider) UpdateClusterStatus ¶
func (*Provider) ValidateCredential ¶
Click to show internal directories.
Click to hide internal directories.