k8s

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FederationCluster = "Federation"
)

define const vars

Variables

View Source
var (
	//EnableBCSApiGw define
	EnableBCSApiGw = ""
)

Functions

func NewOperator

func NewOperator(conf *config.ContainerResourceConfig) (op.Operator, error)

NewOperator get a new operator. TODO: For now, k8s operator do not support to deploy multi instances in one node(all pods with some host port).

So the request_cpu must big enough to occupy whole resource in one node. This should be solved later, and handle
the ports managements.

Types

type FederationData

type FederationData struct {
	Total int `json:"total"`
}

FederationData define

type FederationResourceParam

type FederationResourceParam struct {
	Resources     ResRequests       `json:"resources"`
	ClusterID     string            `json:"clusterID"` //子集群ID,非联邦集群ID
	ClusterLabels map[string]string `json:"clusterLabels"`
	NodeSelector  map[string]string `json:"nodeSelector"`
}

FederationResourceParam define

type FederationResult

type FederationResult struct {
	Code int            `json:"code"`
	Msg  string         `json:"msg"`
	Data FederationData `json:"data"`
}

FederationResult define

type ResRequest

type ResRequest struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

ResRequest define

type ResRequests

type ResRequests struct {
	Requests ResRequest `json:"requests"`
}

ResRequests define

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL