• Geoff Simmons's avatar
    Add the conditions field to VarnishConfig.self-sharding. · 075c5b26
    Geoff Simmons authored
    Currently only implemented to kubectl-style deployments.
    Helm support to be added in the next commits.
    
    This is a breaking change for the self-sharding configuration.
    Configs previously expressed in the self-sharding object are
    now moved to self-sharding.shard. In addition, the optional
    array self-sharding.conditions may express conditions under
    which self-sharding logic is executed.
    
    The conditions array has the same syntax and semantics as
    for req-disposition.
    
    XXX: there is some DRY that needs to be refactored away.
    
    - We currently have two internal means of expressing
      conditions under which something happens (translated
      to if-clauses with matching operations and the like in
      VCL): Condition and the legacy MatchTerm, in both the
      k8s VarnishConfig class and the spec type for VCL
      templating. These should be unified to Condition.
    
    - The code for interpreting Conditions for the k8s object
      in pkg/controller is in part repeated for self-sharding
      and req-disposition. These should be encapsulated in a
      common function.
    
    - Template generation for the if-clauses implementing
      conditions is repeated in req-dispostiion and currently
      in two places for self-sharding. This should be a
      common text/template object.
    
    While here, move some of the code about self-sharding and
    conditions from varnishconfig.go to ingress.go. Because
    it's actually about the VarnishConfig Custom Resource, and
    in a continuing effort to reduce the oversized ingress.go
    source.
    075c5b26
Name
Last commit
Last update
charts Loading commit data...
cmd Loading commit data...
container Loading commit data...
deploy Loading commit data...
docs Loading commit data...
examples Loading commit data...
hack Loading commit data...
pkg Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.kind-gitlab.yaml Loading commit data...
COPYING Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...