• Geoff Simmons's avatar
    Another breaking change to fix & complete self-sharding with conditions. · f2f71758
    Geoff Simmons authored
    The self-sharding field in VarnishConfig now has a mandatory field
    rules. This is an array of at least one object with a mandatory
    field shard and an optional field conditions.
    
    spec.self-sharding.rules[n].shard configures sharding in the fields
    key, digest and primaryOnly (all optional).
    
    spec.self-sharding.rules[n].conditions, if specified, is an array
    of at least one condition, which specifies a boolean expression.
    It is the same as conditions used for other contexts such as
    rewrites.
    
    The rules array is evaluated in order as an if-elsif-else sequence.
    This means that if any element of the array specifies no conditions,
    it MUST be the last rule in the array. In an array of length > 1,
    it becomes the else case. This constraint is trivially satisfied
    if there is only one rule. It is currently *not* enforced (would be
    suitable for a webhook validation).
    
    The fields probe and max2ndttl are now top-level fields under
    self-sharding, both optional.
    f2f71758
shard_test.go 4.03 KB