1 Star 0 Fork 0

fudata-faas / faas-provider

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
function_deployment.go 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
miyuan 提交于 2023-03-13 16:35 . add: volumes && device support
package types
// FunctionDeployment represents a request to create or update a Function.
type FunctionDeployment struct {
// Service is the name of the function deployment
Service string `json:"service"`
// Image is a fully-qualified container image
Image string `json:"image"`
// 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
EnvProcess string `json:"envProcess,omitempty"`
// EnvVars can be provided to set environment variables for the function runtime.
EnvVars map[string]string `json:"envVars,omitempty"`
// Constraints are specific to the faas-provider.
Constraints []string `json:"constraints,omitempty"`
// Secrets list of secrets to be made available to function
Secrets []string `json:"secrets,omitempty"`
Volumes []string `json:"volumes,omitempty"`
VolumeDevices []string `json:"volumeDevices,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"`
// Limits for function
Limits *FunctionResources `json:"limits,omitempty"`
// Requests of resources requested by function
Requests *FunctionResources `json:"requests,omitempty"`
// ReadOnlyRootFilesystem removes write-access from the root filesystem
// mount-point.
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
}
// FunctionResources Memory and CPU
type FunctionResources struct {
Memory string `json:"memory,omitempty"`
CPU string `json:"cpu,omitempty"`
}
1
https://gitee.com/fudata-faas/faas-provider.git
git@gitee.com:fudata-faas/faas-provider.git
fudata-faas
faas-provider
faas-provider
v0.19.1

搜索帮助