Skip to content

ServiceAccount replication doesn't preserve annotations #286

@vivek1612

Description

@vivek1612

Describe the bug

Replicated service accounts only have replicator.v1.mittwald.de/replicated-at and replicator.v1.mittwald.de/replicated-from-version. Annotations in the source service account are missing in the target.

To Reproduce

Create a service account and a namespace. Notice the service account will be replicated to the new namespace but the replicated service account will not have testAnnotation.

apiVersion: v1 kind: ServiceAccount metadata: name: test-sa namespace: default annotations: replicator.v1.mittwald.de/replicate-to-matching: app=my-app testAnnotation: testAnnotation 
apiVersion: v1 kind: Namespace metadata: name: test-ns labels: app: my-app 

Expected behavior

The target service account should have all the annotations that were present in the source, besides the ones that trigger replication.

Environment:

  • Kubernetes version: 1.27 (EKS)
  • kubernetes-replicator version: 2.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions