stackset-controller icon indicating copy to clipboard operation
stackset-controller copied to clipboard

Update annotations in per-stack ingresses

Open aermakov-zalando opened this issue 5 years ago • 4 comments

Per-stack ingresses should be updated when the annotations in stackset.ingress.metadata change as well, otherwise filter/predicate changes won't be propagated. We should probably handle label changes as well, but doing this correctly is way too annoying. :/

aermakov-zalando avatar May 20 '20 11:05 aermakov-zalando

Pull Request Test Coverage Report for Build 1519

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 68.747%

Totals Coverage Status
Change from base Build 1516: 0.0%
Covered Lines: 1575
Relevant Lines: 2291

💛 - Coveralls

coveralls avatar May 20 '20 11:05 coveralls

Can you elaborate on the use case you have where this would be helpful?

On the one hand stacks are created based on the StackSet state at the creation time and after that not updated when the stackset is upated. So based on this I would argue that semantically the annotations shouldn't be updated. However on the other side if they're not updated you don't really have a way to update them on a stack because editing the stack won't help. So I think it would be helpful just to understand the use case and think about if it can cause any regression for other use cases.

mikkeloscar avatar May 20 '20 15:05 mikkeloscar

@mikkeloscar Ingress configuration is global, it doesn't even exist in the stack's spec, so it should also be updated when the source of truth in the stackset object is updated. Right now, for example, if you make a mistake in the predicates or filters, you'll have to delete the ingresses even if you fix it in the stackset.

aermakov-zalando avatar May 20 '20 15:05 aermakov-zalando

Although maybe I should change it even further. Even though ingress settings are global, they won't be updated unless the users also do unrelated changes in the stack, which is not very intuitive.

aermakov-zalando avatar May 20 '20 16:05 aermakov-zalando