• Geoff Simmons's avatar
    Watch for resources in all namespaces. · 1140313d
    Geoff Simmons authored
    This commit includes a comprehensive refactoring of the
    controller:
    
    - ResourceEventHandlers dispatch work to a workqueue for
      a worker that in turn dispatches work to a separate
      queue for each namespace. For each namespace, there
      is a worker that syncs the various resources.
    
    - The controller uses a SharedInformer, with Informers
      and Listers for each resource type. The Listers are
      handed off to the namespace-specific workers.
    
    - Separate source files contain code for syncing
      Endpoints, Ingress, Service and Secret.
    
    - Added the controller CLI options:
      -namespace: for single-namespace deployments
      -templatedir: to locate the templates for VCL
    
    - The director for templates is given either by the
      templatedir CLI option or the TEMPLATE_DIR env
      variable. This makes it possible to run the
      controller from the command-line, and run tests
      from any working directory.
    
    - The Ingress annotation
      ingress.varnish-cache.org/varnish-svc identifies
      the Service name of the Varnish Service intended
      to implement it. If the annotation is absent,
      then the controller looks for exactly one Service
      in the namespace with the label "app:varnish-ingress".
      If none is found, the Ingress is rejected.
      (This is not yet documented.)
    
    - Docs and examples updated
    
    - Example for single-namespace deployment added.
    1140313d
adm-secret.yaml 194 Bytes