aledbf / kube-keepalived-vip

Kubernetes Virtual IP address/es using keepalived
Apache License 2.0
188 stars 75 forks source link

Ability to specify a cidr for a virtual_ipaddress #86

Open schplat opened 5 years ago

schplat commented 5 years ago

We have a unique constraint placed on us by a provider. We have two separate networks that are in the same VLAN. In order to make routing work correctly, the ability to set the virtual_ipaddress to match that network's subnet would be the ideal solution, ideally through a config map.

Something along the lines of:

apiVersion: v1
kind: ConfigMap
metadata:
  name: vip-configmap
data:
  10.0.0.10: ""
  vip_cidr: 27

resulting in:

  virtual_ipaddress {
    10.0.0.10/27
  }

inside the container's /etc/keepalived.conf, which is a valid keepalived configuration.