flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Deployment annotations are never updated

Open daviddelucca opened this issue 3 years ago • 1 comments

I am using v1.7.0 and noticed that annotations from primary Deployment are never updated after first rollout - If I change any annotation from my canary deployment, it nevers copied to primary one.

As example. I update my canary Deployment to something like:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    hpa.autoscaling.banzaicloud.io/maxReplicas: "42"
    hpa.autoscaling.banzaicloud.io/minReplicas: "13"
...
spec:  
  template:
    metadata:
      annotations:        
        my.annotat: random

Added annotation my.annot and changed value from hpa.autoscaling.banzaicloud.io/maxReplicas. Flagger triggers a new deploy but hpa.autoscaling.banzaicloud.io/maxReplicas is never updated

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    hpa.autoscaling.banzaicloud.io/maxReplicas: "41"
    hpa.autoscaling.banzaicloud.io/minReplicas: "13"
...
spec:  
  template:
    metadata:
      annotations:
        my.annotat: random

I have found this MR and wondering if it solves the problem copy annotations from Canary Deployment to Primary Deployment.

Any idea?

@kh34

daviddelucca avatar Jul 17 '22 12:07 daviddelucca

Add --include-label-prefix=hpa.autoscaling.banzaicloud.io to Flagger command args and see if it works please.

stefanprodan avatar Jul 26 '22 10:07 stefanprodan