Elafros generated pods and services are created with "revision" and "pod-template-hash" labels. However; both of these labels are hard to target against because they are generated at runtime. Also, they don't allow targeting all revisions of a configuration. I propose that we copy the configuration labels into elafros generated pod & service objects.
What should happen if:
In my opinion, existing revisions should not be touched when a configuration is updated. I would like to update my configuration & its labels and target all revisions onward with that, rather than going back in time for all revisions.
I don't really know how we can add labels to revisions - is that possible today? Pod labels can only be updated by the operator explicitly/manually, right? I don't know if we need to reconcile the labels after the revision is created.
@dprotaso and I will pick this up
Should we propagate labels that begin with elafros.dev?
/assign @bsnchan @dprotaso
I think we do want the auto-populated route/configuration labels plumbed through, which IIUC are elafros.dev/ scoped.
@mdemirhan Do you mean we should propagate the revisionTemplate labels to the pods and services instead of the Configuration labels?
The revisionTemplate labels seem to make the most sense since it is clear that those labels will already be applied to all the revisions.
@bsnchan Yes, I meant revisionTemplate labels. Thanks for the clarification!
@mdemirhan @bsnchan I think this may be done (and hit the issue with the PR template)?
I vaguely recall discussion of a label change breaking autoscaling and rollbacks in slack last week, so I want to confirm this landed before closing.
@mattmoor This is fixed as part of https://github.com/elafros/elafros/pull/589 which looks like it has been merged so this issue should be okay to close.
Most helpful comment
In my opinion, existing revisions should not be touched when a configuration is updated. I would like to update my configuration & its labels and target all revisions onward with that, rather than going back in time for all revisions.
I don't really know how we can add labels to revisions - is that possible today? Pod labels can only be updated by the operator explicitly/manually, right? I don't know if we need to reconcile the labels after the revision is created.