Documentation ¶
Index ¶
- Constants
- func CheckCustomResourceType(obj interface{}) (faasv1.FunctionIngress, bool)
- func EventRecorder(client kubernetes.Interface) record.EventRecorder
- func GetClass(ingressType string) string
- func GetIssuerKind(issuerType string) string
- func IngressNeedsUpdate(old, fni *faasv1.FunctionIngress) bool
- func MakeAnnotations(fni *faasv1.FunctionIngress) map[string]string
- func MakeOwnerRef(fni *faasv1.FunctionIngress) []metav1.OwnerReference
- type BaseController
Constants ¶
const ( // 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 controller" // MessageResourceSynced is the message used for an Event fired when a Function // is synced successfully MessageResourceSynced = "FunctionIngress synced successfully" )
const AgentName = "ingress-operator"
const FaasIngressKind = "FunctionIngress"
const OpenfaasWorkloadPort = 8080
Variables ¶
This section is empty.
Functions ¶
func CheckCustomResourceType ¶
func CheckCustomResourceType(obj interface{}) (faasv1.FunctionIngress, bool)
func EventRecorder ¶
func EventRecorder(client kubernetes.Interface) record.EventRecorder
func GetIssuerKind ¶
func IngressNeedsUpdate ¶
func IngressNeedsUpdate(old, fni *faasv1.FunctionIngress) bool
func MakeAnnotations ¶
func MakeAnnotations(fni *faasv1.FunctionIngress) map[string]string
func MakeOwnerRef ¶
func MakeOwnerRef(fni *faasv1.FunctionIngress) []metav1.OwnerReference
Types ¶
type BaseController ¶
type BaseController struct { FunctionsLister listers.FunctionIngressLister FunctionsSynced cache.InformerSynced // Workqueue is a rate limited work queue. This is used to queue work to be // processed instead of performing it as soon as a change happens. This // means we can ensure we only process a fixed amount of resources at a // time, and makes it easy to ensure we are never processing the same item // simultaneously in two different workers. Workqueue workqueue.RateLimitingInterface SyncHandler func(ctx context.Context, key string) error }
BaseController is the controller contains the common function ingress implementation that is shared between the various versions of k8s.
func (*BaseController) EnqueueFunction ¶
func (c *BaseController) EnqueueFunction(obj interface{})
enqueueFunction takes a fni resource and converts it into a namespace/name string which is then put onto the work queue. This method should *not* be passed resources of any type other than fni.
func (BaseController) HandleObject ¶
func (c BaseController) HandleObject(obj interface{})
handleObject will take any resource implementing metav1.Object and attempt to find the fni resource that 'owns' it. It does this by looking at the objects metadata.ownerReferences field for an appropriate OwnerReference. It then enqueues that fni resource to be processed. If the object does not have an appropriate OwnerReference, it will simply be skipped.
func (BaseController) Run ¶
func (c BaseController) Run(threadiness int, stopCh <-chan struct{}) error
func (BaseController) SetupEventHandlers ¶
func (c BaseController) SetupEventHandlers( functionIngress v1.FunctionIngressInformer, kubeInformerFactory kubeinformers.SharedInformerFactory, )