feat: add activation-id label for kubernetes resources #641
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #616
In the current implementation, the name and label for Job/Pod/Service changes with each restart of the Rulebook Activation. This is a behavior that compromises stability when exposing the Service to the outside of the cluster.
This PR adds the Activation ID as an immutable label that does not change upon restart. This allows users to create arbitrarily named Service with this label as the
selector
, and arbitrarily named Ingress that use it.There are no side effects because this do not remove nor replace existing labels, but simply add to them.
Changes:
activation-id
to Job, Pod, Service, Secret that created by enabling Rulebook ActivationTests:
By enabling Rulebook Activation (ID: 5) that listens inbound connection on 5000, following resources are created:
By creating the following Service and Inrgess that refer to this new label, we will not need to modify them after the Rulebook Activation is restarted.