Documentation ¶
Index ¶
- func CreateContainerSpec(container Container, major string, minor string) v1core.Container
- func CreatePodSpec(containers []v1core.Container, volumes []v1core.Volume, ...) v1core.PodTemplateSpec
- func CreateServiceSpec(name string, trainingID string) *v1core.Service
- func CreateStatefulSetSpecForLearner(name, servicename string, replicas int, podTemplateSpec v1core.PodTemplateSpec) *v1beta1.StatefulSet
- func CreateVolumeSecretsSpec(secrets Secrets) []*v1core.Secret
- func GenerateImagePullSecret(k8sClient kubernetes.Interface, req *service.JobDeploymentRequest) ([]v1core.LocalObjectReference, error)
- func GetLearnerImageForFramework(image Image) string
- func PopulateLearnerEnvVariablesAndLabels(existingEnvVars []v1core.EnvVar, trainingID string, numLearners int, ...) []v1core.EnvVar
- type COSVolume
- type COSVolumeSecret
- type Container
- type Image
- type Resources
- type SHMVolume
- type SSHVolume
- type SSHVolumeSecret
- type Secrets
- type VolumeMountSpec
- type Volumes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateContainerSpec ¶
CreateContainerSpec ...
func CreatePodSpec ¶
func CreatePodSpec(containers []v1core.Container, volumes []v1core.Volume, labels map[string]string, nodeSelector map[string]string, imagePullSecret []v1core.LocalObjectReference, nodeAffinity *v1core.NodeAffinity, gpuToleration []v1core.Toleration, termGracePeriodSecs int64) v1core.PodTemplateSpec
CreatePodSpec ...
func CreateServiceSpec ¶
CreateServiceSpec ... this service will govern the statefulset
func CreateStatefulSetSpecForLearner ¶
func CreateStatefulSetSpecForLearner(name, servicename string, replicas int, podTemplateSpec v1core.PodTemplateSpec) *v1beta1.StatefulSet
CreateStatefulSetSpecForLearner ...
func CreateVolumeSecretsSpec ¶
CreateVolumeSecretsSpec ...
func GenerateImagePullSecret ¶
func GenerateImagePullSecret(k8sClient kubernetes.Interface, req *service.JobDeploymentRequest) ([]v1core.LocalObjectReference, error)
GenerateImagePullSecret ... creates secret only for custom images; otherwise returns default secret name
func GetLearnerImageForFramework ¶
GetLearnerImageForFramework returns the full route for the learner image
func PopulateLearnerEnvVariablesAndLabels ¶
func PopulateLearnerEnvVariablesAndLabels(existingEnvVars []v1core.EnvVar, trainingID string, numLearners int, statefulsetName string, mountTrainingDataStoreInLearner, mountResultsStoreInLearner bool) []v1core.EnvVar
PopulateLearnerEnvVariablesAndLabels ... create envvars for learner from shared env vars. add learner specific envs vars + filter out what is not required
Types ¶
type COSVolume ¶
type COSVolume struct {
ID, Region, Bucket, Endpoint, SecretRef, CacheSize, DiskFree string
MountSpec VolumeMountSpec
}
COSVolume ...
type COSVolumeSecret ¶
type COSVolumeSecret struct {
ID, TrainingID, Username, APIKey string
}
COSVolumeSecret ...
type Container ¶
type Container struct { Image Resources VolumeMounts []v1core.VolumeMount Name, Command string //FIXME eventually get rid of command as well EnvVars []v1core.EnvVar }
Container ...
type SHMVolume ¶
type SHMVolume struct { ID string Size int64 MountSpec VolumeMountSpec }
SHMVolume ...
type SSHVolume ¶
type SSHVolume struct {
ID, SecretName string
MountSpec VolumeMountSpec
}
SSHVolume ...
type SSHVolumeSecret ¶
type SSHVolumeSecret struct {
ID, TrainingID, Framework, Version string
}
SSHVolumeSecret ...
type Secrets ¶
type Secrets struct { TrainingDataSecret *COSVolumeSecret SSHVolumeSecret *SSHVolumeSecret ResultsDirSecret *COSVolumeSecret }
Secrets ...
type VolumeMountSpec ¶
type VolumeMountSpec struct {
MountPath, SubPath string
}
VolumeMountSpec ...
type Volumes ¶
type Volumes struct { TrainingDataVolumes []*COSVolume ResultsDir *COSVolume SSHVolume *SSHVolume SHMVolume *SHMVolume }
Volumes ...
func (Volumes) CreateVolumeForLearner ¶
CreateVolumeForLearner ...
func (Volumes) CreateVolumeMountsForLearner ¶
func (volumes Volumes) CreateVolumeMountsForLearner() []v1core.VolumeMount
CreateVolumeMountsForLearner ...