Documentation ¶
Index ¶
- Constants
- func MakeDeleteHandler(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
- func MakeDeployHandler(functionNamespace string, clientset *kubernetes.Clientset, ...) http.HandlerFunc
- func MakeFunctionReader(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
- func MakeHealthHandler() http.HandlerFunc
- func MakeInfoHandler(version, sha string) http.HandlerFunc
- func MakeProxy(functionNamespace string, timeout time.Duration) http.HandlerFunc
- func MakeReplicaReader(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
- func MakeReplicaUpdater(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
- func MakeSecretHandler(namespace string, kube kubernetes.Interface) http.HandlerFunc
- func MakeUpdateHandler(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
- func UpdateSecrets(request requests.CreateFunctionRequest, deployment *v1beta1.Deployment, ...) error
- func ValidateDeployRequest(request *requests.CreateFunctionRequest) error
- type DeployHandlerConfig
- type FunctionProbeConfig
Constants ¶
const ( //OrchestrationIdentifier identifier string for provider orchestration OrchestrationIdentifier = "kubernetes" //ProviderName name of the provider ProviderName = "faas-netes" )
Variables ¶
This section is empty.
Functions ¶
func MakeDeleteHandler ¶
func MakeDeleteHandler(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
MakeDeleteHandler delete a function
func MakeDeployHandler ¶
func MakeDeployHandler(functionNamespace string, clientset *kubernetes.Clientset, config *DeployHandlerConfig) http.HandlerFunc
MakeDeployHandler creates a handler to create new functions in the cluster
func MakeFunctionReader ¶
func MakeFunctionReader(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
MakeFunctionReader handler for reading functions deployed in the cluster as deployments.
func MakeHealthHandler ¶
func MakeHealthHandler() http.HandlerFunc
MakeHealthHandler returns 200/OK when healthy
func MakeInfoHandler ¶
func MakeInfoHandler(version, sha string) http.HandlerFunc
MakeInfoHandler creates handler for /system/info endpoint
func MakeProxy ¶
func MakeProxy(functionNamespace string, timeout time.Duration) http.HandlerFunc
MakeProxy creates a proxy for HTTP web requests which can be routed to a function.
func MakeReplicaReader ¶
func MakeReplicaReader(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
MakeReplicaReader reads the amount of replicas for a deployment
func MakeReplicaUpdater ¶
func MakeReplicaUpdater(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
MakeReplicaUpdater updates desired count of replicas
func MakeSecretHandler ¶
func MakeSecretHandler(namespace string, kube kubernetes.Interface) http.HandlerFunc
MakeSecretHandler makes a handler for Create/List/Delete/Update of secrets in the Kubernetes API
func MakeUpdateHandler ¶
func MakeUpdateHandler(functionNamespace string, clientset *kubernetes.Clientset) http.HandlerFunc
MakeUpdateHandler update specified function
func UpdateSecrets ¶
func UpdateSecrets(request requests.CreateFunctionRequest, deployment *v1beta1.Deployment, existingSecrets map[string]*apiv1.Secret) error
UpdateSecrets will update the Deployment spec to include secrets that have beenb deployed in the kubernetes cluster. For each requested secret, we inspect the type and add it to the deployment spec as appropriat: secrets with type `SecretTypeDockercfg/SecretTypeDockerjson` are added as ImagePullSecrets all other secrets are mounted as files in the deployments containers.
func ValidateDeployRequest ¶
func ValidateDeployRequest(request *requests.CreateFunctionRequest) error
ValidateDeployRequest validates that the service name is valid for Kubernetes
Types ¶
type DeployHandlerConfig ¶
type DeployHandlerConfig struct { HTTPProbe bool FunctionReadinessProbeConfig *FunctionProbeConfig FunctionLivenessProbeConfig *FunctionProbeConfig ImagePullPolicy string }
DeployHandlerConfig specify options for Deployments
type FunctionProbeConfig ¶
type FunctionProbeConfig struct { InitialDelaySeconds int32 TimeoutSeconds int32 PeriodSeconds int32 }
FunctionProbeConfig specify options for Liveliness and Readiness checks