utkuozdemir / pv-migrate

CLI tool to easily migrate Kubernetes persistent volumes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to pass annotations to service

MurzNN opened this issue · comments

Is your feature request related to a problem? Please describe.
I use metallb as load balancer and it has a feature to share a single IP between several services via annotations:

apiVersion: v1
kind: Service
metadata:
  annotations:
    metallb.universe.tf/allow-shared-ip: "key-to-share-1.2.3.4"

With metallb it's common situation that Kubernetes cluster has no free IP addresses pool to assign them to new temporary services, so pv-migrate fails in that situation because all IP are busy.

Describe the solution you'd like
To solve this problem we can add ability to pass annotations to Service, created by pv-migrate via extending Helm chart and adding values like this:

sshd:
  service:
    annotations: 
      metallb.universe.tf/allow-shared-ip: "my-key"

What do you think about this way of implementing this feature?

Definitely makes sense, I will add it.

Closed by #157 and it is part of the release in v0.11.0.

I added support for annotations and loadBalancerIP into the Helm chart. To be able to override the rsync target host, I introduced a new flag called --dest-host-override (shorthand -H).

Using all of these things, it should be able to address your use case.

Please give it a try and see if it works.