Documentation ¶
Index ¶
Constants ¶
const ( LabelMinReplicas = "com.openfaas.scale.min" // SuccessSynced is used as part of the Event 'reason' when a Function is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a Function fails // to sync due to a Deployment of the same name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to a Deployment already existing MessageResourceExists = "Resource %q already exists and is not managed by OpenFaaS" // MessageResourceSynced is the message used for an Event fired when a Function // is synced successfully MessageResourceSynced = "Function synced successfully" )
Variables ¶
This section is empty.
Functions ¶
func UpdateSecrets ¶
func UpdateSecrets(function *faasv1.Function, deployment *appsv1.Deployment, existingSecrets map[string]*corev1.Secret) error
UpdateSecrets will update the Deployment spec to include secrets that have been deployed in the kubernetes cluster. For each requested secret, we inspect the type and add it to the deployment spec as appropriate: secrets with type `SecretTypeDockercfg` are added as ImagePullSecrets all other secrets are mounted as files in the deployments containers.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the controller implementation for Function resources
func NewController ¶
func NewController( kubeclientset kubernetes.Interface, faasclientset clientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, faasInformerFactory informers.SharedInformerFactory, factory FunctionFactory) *Controller
NewController returns a new OpenFaaS controller
func (*Controller) Run ¶
func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error
Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.
type FunctionFactory ¶
type FunctionFactory struct {
Factory k8s.FunctionFactory
}
FunctionFactory wraps faas-netes factory
func NewFunctionFactory ¶
func NewFunctionFactory(clientset kubernetes.Interface, config k8s.DeploymentConfig) FunctionFactory
func (*FunctionFactory) ConfigureContainerUserID ¶
func (f *FunctionFactory) ConfigureContainerUserID(deployment *appsv1.Deployment)
func (*FunctionFactory) ConfigureReadOnlyRootFilesystem ¶
func (f *FunctionFactory) ConfigureReadOnlyRootFilesystem(function *faasv1.Function, deployment *appsv1.Deployment)
func (*FunctionFactory) MakeProbes ¶
func (f *FunctionFactory) MakeProbes(function *faasv1.Function) (*k8s.FunctionProbes, error)