Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewK8SProvider ¶
func NewK8SProvider(config string, rm *manager.ResourceManager, nodeName string, operatingSystem string, daemonEndpointPort int32) (*k8sProvider, error)
NewK8SProvider creates a new K8SProvider.
Types ¶
type CapsuleSpec ¶
type CapsuleSpec struct { Volumes []Volume `json:"volumes,omitempty"` Containers []Container `json:"containers,omitempty"` RestartPolicy string `json:"restartPolicy,omitempty"` }
CapsuleSpec
type CapsuleTemplate ¶
type CapsuleTemplate struct { Spec CapsuleSpec `json:"spec,omitempty"` Kind string `json:"kind,omitempty"` Metadata Metadata `json:"metadata,omitempty"` }
type Container ¶
type Container struct { // Name string `json:"name" protobuf:"bytes,1,opt,name=name"` Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` WorkingDir string `json:"workDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"` // Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` Env map[string]string `json:"env,omitempty"` //ENV is different with Kubernetes // Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=env"` Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,7,opt,name=resources"` // VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,8,rep,name=volumeMounts"` ImagePullPolicy string `json:"imagePullPolicy,omitempty" protobuf:"bytes,8,opt,name=imagePullPolicy"` }
type ResourceList ¶
type ResourceList map[ResourceName]float64
type ResourceName ¶
type ResourceName string
type ResourceRequirements ¶
type ResourceRequirements struct {
Limits ResourceList `json:"requests,omitempty" protobuf:"bytes,1,rep,name=limits"`
}
ResourceRequirements describes the compute resource requirements.
Click to show internal directories.
Click to hide internal directories.