1. 19 Feb, 2021 3 commits
    • Geoff Simmons's avatar
    • Geoff Simmons's avatar
      Add the controller devmode flag and TemplateConfig CRD, first iteration. · 6d7ab230
      Geoff Simmons authored
      The TemplateConfig resource is only read by the controller's k8s client
      when the devmode CLI flag is set.
      
      The TemplateConfig spec has fields for the various templates for VCL
      generation: ingress, self-sharding, ACL etc. The value type for all
      of those fields is string, and each field is optional.
      
      When a TemplateConfig specifies a value for a template type, the
      controller attempts to parse it as a text/template.Template, using
      the same function map defined for the template type. If the parse
      fails, then the error is logged and an Event type Warning with the
      error message is generated, and the field is ignored.
      
      If the parse succeeds, then the template is replaced for all further
      VCL generation by the controller.
      
      When a TemplateConfig is deleted, then for each template type that it
      specifies, the template is reverted to the controller's standard value.
      
      In this first iteration:
      
      - only the ACL template is updated, will add the other types.
      
      - only kubectl deployments are supported, will add support in the
      helm chart for the viking controller.
      
      - we have an e2e test, but it is not yet added to the e2e script that
      runs all of them, or to the gitlab CI script, since these have to
      support helm deployments.
      6d7ab230
    • Geoff Simmons's avatar
  2. 15 Feb, 2021 4 commits
  3. 11 Feb, 2021 1 commit
  4. 24 Jan, 2021 1 commit
  5. 14 Jan, 2021 3 commits
  6. 13 Jan, 2021 1 commit
  7. 07 Jan, 2021 1 commit
    • Geoff Simmons's avatar
      Set the "regular" config to "not available" when no Ingress is defined. · 7ca83849
      Geoff Simmons authored
      This was a remnant of earlier versions when the Pods were set to not
      Ready when there is no Ingress to implement. No the Pods are always
      ready, but we set the "configured" endpoint to respond with non-200
      when nothing is defined.
      
      However, if an Ingress had been defined previously, then deleted,
      the http/https endpoints still responded as for the previous config.
      This was semantically incorrect, and also meant that the VCL config
      remained defined indefinitely. Now it becomes unlabeled, so it can
      go cold and then be discarded.
      7ca83849
  8. 06 Jan, 2021 1 commit
  9. 05 Jan, 2021 2 commits
    • Geoff Simmons's avatar
      Fix discard of VCL configs that have gone cold. · 0d9ac205
      Geoff Simmons authored
      I believe this became necessary because the meaning of the state
      and temperature fields in vcl.list has changed in recent Varnish
      versions (which we are now using).
      0d9ac205
    • Geoff Simmons's avatar
      Use Pod names to generate VCL backend name symbols. · 1e4941c4
      Geoff Simmons authored
      This makes backend names more readily recognizable in VCL sources,
      and as used in tools such as varnishlog and varnishstat. If the
      Pod ns/name is not available, fall back to the previous scheme of
      generating names from the Endpoint network addresses.
      1e4941c4
  10. 03 Jan, 2021 1 commit
  11. 01 Jan, 2021 1 commit
    • Geoff Simmons's avatar
      Evaluate Ingress rules in vcl_backend_fetch. · ae09f859
      Geoff Simmons authored
      This is possible now that we are using Varnish versions that support
      return(error(404)) from the backend side. It eliminates unnecessary
      computation when a request leads to a cache hit or synthetic response.
      
      It also simplifies the generated VCL code, since the evaluation
      happens in one place, rather than in each of hit, miss, pass and
      pipe.
      ae09f859
  12. 31 Dec, 2020 3 commits
  13. 30 Dec, 2020 8 commits
  14. 07 Dec, 2020 1 commit
  15. 06 Dec, 2020 3 commits
  16. 04 Dec, 2020 1 commit
  17. 26 Nov, 2020 5 commits