Documentation ¶
Overview ¶
Copyright 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func MakeElaResourceLabels(s *v1alpha1.Service) map[string]string
- func MakeServiceConfiguration(service *v1alpha1.Service) *v1alpha1.Configuration
- func MakeServiceRoute(service *v1alpha1.Service, configName string) *v1alpha1.Route
- func NewController(kubeClientSet kubernetes.Interface, elaClientSet clientset.Interface, ...) controller.Interface
- type Controller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeElaResourceLabels ¶
MakeElaResourceLabels constructs the labels we will apply to Route and Configuration resources.
func MakeServiceConfiguration ¶
func MakeServiceConfiguration(service *v1alpha1.Service) *v1alpha1.Configuration
MakeServiceConfiguration creates a Configuration from a Service object.
func MakeServiceRoute ¶
MakeServiceRoute creates a Route from a Service object.
func NewController ¶
func NewController( kubeClientSet kubernetes.Interface, elaClientSet clientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, elaInformerFactory informers.SharedInformerFactory, config *rest.Config, controllerConfig controller.Config, logger *zap.SugaredLogger) controller.Interface
NewController initializes the controller and is called by the generated code Registers eventhandlers to enqueue events
Types ¶
type Controller ¶
type Controller struct { *controller.Base // contains filtered or unexported fields }
Controller implements the controller for Service resources. +controller:group=ela,version=v1alpha1,kind=Service,resource=services
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.