Documentation ¶
Index ¶
- Constants
- Variables
- func AppInstall(scheme *runtime.Scheme)
- func ConvertJsonToYaml(data []byte) ([]byte, error)
- func CreateRelease(cfg *action.Configuration, releaseName, ns string, ch *chart.Chart, ...) (*release.Release, error)
- func DeleteRelease(cfg *action.Configuration, name string, keepHistory bool) error
- func ExtensionInstall(scheme *runtime.Scheme)
- func GetLabelString(m map[string]string) string
- func GetRelease(cfg *action.Configuration, releaseName string) (*release.Release, error)
- func GetStringFromValues(vals map[string]interface{}, key string) (string, bool)
- func ListReleases(cfg *action.Configuration, releaseName, ns, status string) ([]*release.Release, error)
- func RollbackRelease(cfg *action.Configuration, name string, revision int32) (*release.Release, error)
- func Serve(cfg *config.Config)
- func UpgradeRelease(cfg *action.Configuration, name string, ch *chart.Chart, ...) (*release.Release, error)
- type JobDirective
- type Parser
- type Proxy
- func (proxy *Proxy) CheckApiVersionsSupported(apiVersions []string) error
- func (proxy *Proxy) CheckClusterNameIsUnique(clusterName, namespace string) error
- func (proxy *Proxy) DeleteRelease(cfg *action.Configuration, releaseName string, purge bool, namespace string) error
- func (proxy *Proxy) DescribeClusterDetails(clusterWrapper *models.ClusterWrapper) error
- func (proxy *Proxy) DescribeRuntimeProviderZones(runtimeCredential *models.RuntimeCredential) ([]string, error)
- func (proxy *Proxy) DescribeVersionInfo() (*version.Info, error)
- func (proxy *Proxy) GetHelmConfig(namespace string) (*action.Configuration, error)
- func (proxy *Proxy) GetKubeClient() (*kubernetes.Clientset, *rest.Config, error)
- func (proxy *Proxy) GetKubeClientWithCredential(credential string) (*kubernetes.Clientset, *rest.Config, error)
- func (proxy *Proxy) InstallReleaseFromChart(cfg *action.Configuration, c *chart.Chart, rawVals map[string]interface{}, ...) error
- func (proxy *Proxy) ListRelease(cfg *action.Configuration, name string) (*release.Release, error)
- func (proxy *Proxy) ReleaseStatus(cfg *action.Configuration, releaseName string) (release.Status, error)
- func (proxy *Proxy) RollbackRelease(cfg *action.Configuration, releaseName string) error
- func (proxy *Proxy) UpdateReleaseFromChart(cfg *action.Configuration, releaseName string, c *chart.Chart, ...) error
- func (proxy *Proxy) ValidateRuntime(zone string, runtimeCredential *models.RuntimeCredential, needCreate bool) error
- func (proxy *Proxy) WaitWorkloadReady(runtimeId, namespace string, clusterRoles map[string]*models.ClusterRole, ...) error
- type Server
- func (p *Server) CheckResource(ctx context.Context, req *pb.CheckResourceRequest) (*pb.CheckResourceResponse, error)
- func (p *Server) DescribeClusterDetails(ctx context.Context, req *pb.DescribeClusterDetailsRequest) (*pb.DescribeClusterDetailsResponse, error)
- func (p *Server) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
- func (p *Server) DescribeVpc(ctx context.Context, req *pb.DescribeVpcRequest) (*pb.DescribeVpcResponse, error)
- func (p *Server) DescribeZones(ctx context.Context, req *pb.DescribeZonesRequest) (*pb.DescribeZonesResponse, error)
- func (s *Server) HandleSubtask(ctx context.Context, req *pb.HandleSubtaskRequest) (*pb.HandleSubtaskResponse, error)
- func (p *Server) ParseClusterConf(ctx context.Context, req *pb.ParseClusterConfRequest) (*pb.ParseClusterConfResponse, error)
- func (p *Server) SplitJobIntoTasks(ctx context.Context, req *pb.SplitJobIntoTasksRequest) (*pb.SplitJobIntoTasksResponse, error)
- func (p *Server) ValidateRuntime(ctx context.Context, req *pb.ValidateRuntimeRequest) (*pb.ValidateRuntimeResponse, error)
- func (s *Server) WaitSubtask(ctx context.Context, req *pb.WaitSubtaskRequest) (*pb.WaitSubtaskResponse, error)
- type TaskDirective
- type Workload
Constants ¶
View Source
const ( Provider = constants.ProviderKubernetes ProviderConfig = ` provider_type: helm enable: true ` )
View Source
const ( RuntimeAnnotationKey = "openpitrix_runtime" DeploymentFlag = "-Deployment" StatefulSetFlag = "-StatefulSet" DaemonSetFlag = "-DaemonSet" Driver = "configmap" )
View Source
const ( Type = "type" ExternalIp = "external_ip" )
Variables ¶
View Source
var ( NamespaceReg = `^[a-z0-9]([-a-z0-9]*[a-z0-9])?$` NamespaceRegExp = regexp.MustCompile(NamespaceReg) ClusterNameReg = `^[a-z]([-a-z0-9]*[a-z0-9])?$` ClusterNameRegExp = regexp.MustCompile(ClusterNameReg) )
View Source
var Codecs = serializer.NewCodecFactory(Scheme)
Codecs provides access to encoding and decoding for the scheme
View Source
var ParameterCodec = runtime.NewParameterCodec(Scheme)
ParameterCodec handles versioning of objects that are converted to query parameters.
View Source
var Scheme = runtime.NewScheme()
Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. NOTE: If you are copying this file to start a new api group, STOP! Copy the extensions group instead. This Scheme is special and should appear ONLY in the api group, unless you really know what you're doing. TODO(lavalamp): make the above error impossible.
Functions ¶
func AppInstall ¶
func ConvertJsonToYaml ¶
func CreateRelease ¶
func DeleteRelease ¶
func DeleteRelease(cfg *action.Configuration, name string, keepHistory bool) error
func ExtensionInstall ¶
func GetLabelString ¶
func GetRelease ¶
func GetStringFromValues ¶
func ListReleases ¶
func RollbackRelease ¶
Types ¶
type JobDirective ¶
type Parser ¶
type Proxy ¶
type Proxy struct { RuntimeId string WorkloadInfo *Workload // contains filtered or unexported fields }
Helm kubernetes proxy
func (*Proxy) CheckApiVersionsSupported ¶
func (*Proxy) CheckClusterNameIsUnique ¶
func (*Proxy) DeleteRelease ¶
func (*Proxy) DescribeClusterDetails ¶
func (proxy *Proxy) DescribeClusterDetails(clusterWrapper *models.ClusterWrapper) error
func (*Proxy) DescribeRuntimeProviderZones ¶
func (proxy *Proxy) DescribeRuntimeProviderZones(runtimeCredential *models.RuntimeCredential) ([]string, error)
func (*Proxy) DescribeVersionInfo ¶
func (*Proxy) GetHelmConfig ¶
func (proxy *Proxy) GetHelmConfig(namespace string) (*action.Configuration, error)
func (*Proxy) GetKubeClient ¶
func (*Proxy) GetKubeClientWithCredential ¶
func (*Proxy) InstallReleaseFromChart ¶
func (*Proxy) ListRelease ¶
func (*Proxy) ReleaseStatus ¶
func (*Proxy) RollbackRelease ¶
func (proxy *Proxy) RollbackRelease(cfg *action.Configuration, releaseName string) error
func (*Proxy) UpdateReleaseFromChart ¶
func (*Proxy) ValidateRuntime ¶
type Server ¶
type Server struct {
runtimeprovider.Server
}
func (*Server) CheckResource ¶
func (p *Server) CheckResource(ctx context.Context, req *pb.CheckResourceRequest) (*pb.CheckResourceResponse, error)
func (*Server) DescribeClusterDetails ¶
func (p *Server) DescribeClusterDetails(ctx context.Context, req *pb.DescribeClusterDetailsRequest) (*pb.DescribeClusterDetailsResponse, error)
func (*Server) DescribeSubnets ¶
func (p *Server) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
func (*Server) DescribeVpc ¶
func (p *Server) DescribeVpc(ctx context.Context, req *pb.DescribeVpcRequest) (*pb.DescribeVpcResponse, error)
func (*Server) DescribeZones ¶
func (p *Server) DescribeZones(ctx context.Context, req *pb.DescribeZonesRequest) (*pb.DescribeZonesResponse, error)
func (*Server) HandleSubtask ¶
func (s *Server) HandleSubtask(ctx context.Context, req *pb.HandleSubtaskRequest) (*pb.HandleSubtaskResponse, error)
func (*Server) ParseClusterConf ¶
func (p *Server) ParseClusterConf(ctx context.Context, req *pb.ParseClusterConfRequest) (*pb.ParseClusterConfResponse, error)
func (*Server) SplitJobIntoTasks ¶
func (p *Server) SplitJobIntoTasks(ctx context.Context, req *pb.SplitJobIntoTasksRequest) (*pb.SplitJobIntoTasksResponse, error)
func (*Server) ValidateRuntime ¶
func (p *Server) ValidateRuntime(ctx context.Context, req *pb.ValidateRuntimeRequest) (*pb.ValidateRuntimeResponse, error)
func (*Server) WaitSubtask ¶
func (s *Server) WaitSubtask(ctx context.Context, req *pb.WaitSubtaskRequest) (*pb.WaitSubtaskResponse, error)
type TaskDirective ¶
type Workload ¶
type Workload struct { Deployments []appsv1.Deployment `json:"deployments,omitempty" description:"deployment list"` Statefulsets []appsv1.StatefulSet `json:"statefulsets,omitempty" description:"statefulset list"` Daemonsets []appsv1.DaemonSet `json:"daemonsets,omitempty" description:"daemonset list"` Services []corev1.Service `json:"services,omitempty" description:"application services"` Ingresses []v1beta1.Ingress `json:"ingresses,omitempty" description:"application ingresses"` }
Click to show internal directories.
Click to hide internal directories.