You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flagger does not modify that value to include -primary when it updates the primary deployment. So the affinity rule only applies to the canaried deployment. Alternatively, I can also update the rule to include -primary in it. In this case, the rules only apply to the primary and not the canaried deployment.
I've thought about utilizing a different label, one that would be the same across both the canary and the primary.
The downside here is that if I have 10 pods in the deployment, it would require me to temporarily have 20 nodes because of the topologyKey since I would have 10 canaried pods and 10 primary pods.
What I'm really looking for is a way to set up something like this:
A suggestion would be to have Flagger parse affinity rules and add -primary to primary pods if the app.kubernetes.io/name key is found. But I wasn't sure if there was a better, simpler, way to do this.
The text was updated successfully, but these errors were encountered:
Apollorion
changed the title
Affinity Rules with app.kubernetes.io/name labels
Affinity rules with app.kubernetes.io/name labels
Jul 14, 2020
I think Flagger could parse the rules, extract the ones that match the label selector (can be one of app, name, app.kubernetes.io/name or something else configured at startup with --selector-labels) and append the -primary to the value. The problem is that you can have more than one value, in this case Flagger should skip the replace and log that it did so.
If I have a deployment that has this affinity rule:
Flagger does not modify that value to include
-primary
when it updates the primary deployment. So the affinity rule only applies to the canaried deployment. Alternatively, I can also update the rule to include-primary
in it. In this case, the rules only apply to the primary and not the canaried deployment.I've thought about utilizing a different label, one that would be the same across both the canary and the primary.
The downside here is that if I have 10 pods in the deployment, it would require me to temporarily have 20 nodes because of the
topologyKey
since I would have 10 canaried pods and 10 primary pods.What I'm really looking for is a way to set up something like this:
instead of:
A suggestion would be to have Flagger parse affinity rules and add
-primary
to primary pods if theapp.kubernetes.io/name
key is found. But I wasn't sure if there was a better, simpler, way to do this.The text was updated successfully, but these errors were encountered: