sharepod

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SharepodDeployment

type SharepodDeployment struct {

	// Service is the name of the function deployment
	Service string `json:"service"`

	Containers []corev1.Container `json:"containers"`

	// Namespace for the function, if supported by the faas-provider
	Namespace string `json:"namespace,omitempty"`

	// EnvProcess overrides the fprocess environment variable and can be used
	// with the watchdog
	//not sure about this now
	EnvProcess string `json:"envProcess,omitempty"`

	// Constraints are specific to the faas-provider.
	Constraints []string `json:"constraints,omitempty"`

	// Labels are metadata for functions which may be used by the
	// faas-provider or the gateway
	Labels *map[string]string `json:"labels,omitempty"`

	// Annotations are metadata for functions which may be used by the
	// faas-provider or the gateway
	Annotations map[string]string `json:"annotations,omitempty"`

	Resources *SharepodResources `json:"resources, omitempty"`

	// ReadOnlyRootFilesystem removes write-access from the root filesystem
	// mount-point.
	ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
}

TODO: not yet finalized, still need to check its validation

type SharepodRequirements

type SharepodRequirements struct {
	//Limits
	GPULimit   resource.Quantity `json:"gpuLimit"`
	GPURequest resource.Quantity `json:"gpuRequest"`
	Memory     resource.Quantity `json:"memory"`
}

type SharepodResources

type SharepodResources struct {
	GPULimit   string `json:"gpuLimit"`
	GPURequest string `json:"gpuRequest"`
	Memory     string `json:"memory"`
}

SharepodResources is used to set GPU and memory limits and requests

type SharepodSpec

type SharepodSpec struct {
	//Name string `json:"name"`
	//this is inside ObjectMeta
	TerminationGracePeriodSeconds int `json:"terminationGracePeriodSeconds, omitempty"`

	//Image string `json:"image"`
	//use Containers instead, regarding how it was defined in KubeShare
	Containers []corev1.Container `json:"containers,omitempty"`

	RestartPolicy string `json:"restartPolicy, omitempty"`

	// +optional
	Handler string `json:"handler,omitempty"`

	// +optional
	Labels *map[string]string `json:"labels,omitempty"`
	// +optional
	//Environment *map[string]string `json:"environment,omitempty"`
	// +optional
	Constraints []string `json:"constraints,omitempty"`
	// +optional
	//Secrets []string `json:"secrets,omitempty"`
	// +optional
	//Limits *SharepodResources `json:"limits,omitempty"`
	// +optional
	//Requests *SharepodResources `json:"requests,omitempty"`
	// +optional
	ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem"`
}

type SharepodStatus added in v0.1.18

type SharepodStatus struct {
	// Name is the name of the function deployment
	Name string `json:"name"`
	// Namespace for the function, if supported by the faas-provider
	Namespace string `json:"namespace,omitempty"`

	// Labels are metadata for functions which may be used by the
	// faas-provider or the gateway
	Labels *map[string]string `json:"labels,omitempty"`

	Containers []corev1.Container `json:"containers,omitempty"`

	// Annotations are metadata for functions which may be used by the
	// faas-provider or the gateway
	Annotations *map[string]string `json:"annotations,omitempty"`

	// Limits for function
	Limits *SharepodResources `json:"limits,omitempty"`

	// Requests of resources requested by function
	Requests *SharepodResources `json:"requests,omitempty"`

	// InvocationCount count of invocations
	InvocationCount float64 `json:"invocationCount,omitempty"`

	// Replicas desired within the cluster
	Replicas uint64 `json:"replicas,omitempty"`

	// AvailableReplicas is the count of replicas ready to receive
	// invocations as reported by the faas-provider
	AvailableReplicas uint64 `json:"availableReplicas,omitempty"`

	// CreatedAt is the time read back from the faas backend's
	// data store for when the function or its container was created.
	CreatedAt time.Time `json:"createdAt,omitempty"`

	// Usage represents CPU and RAM used by all of the
	// functions' replicas. Divide by AvailableReplicas for an
	// average value per replica.
	Usage *SharepodUsage `json:"usage,omitempty"`
}

type SharepodUsage added in v0.1.18

type SharepodUsage struct {
	GPU float64 `json:"gpu, omitempty"`

	TotalMemoryBytes float64 `json:"totalMemoryBytes, omitempty"`
}

Jump to

Keyboard shortcuts

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