Open
Description
Is your feature request related to a problem? Please describe.
For many external peers for a node, it might be difficult to change per-node settings (e.g. password, asn prepends, etc.) because they are stored in different arrays.
Describe the solution you'd like
Restructure configuration in a serialized json or yaml format, with elements of peer configurations.
Instead of:
apiVersion: v1
kind: Node
metadata:
annotations:
...
kube-router.io/peer.asns: "64640"
kube-router.io/peer.ips: 192.168.8.254
kube-router.io/peer.passwords: cGFzc3dvcmQ=
...
We could have:
apiVersion: v1
kind: Node
metadata:
annotations:
...
kube-router.io/peers: |
- remoteip: 192.168.8.254
remoteasn: 64640
password: cGFzc3dvcmQ=
...
``
For compatibility, both formats can be supported at the same time.
**Additional context**
If having multiple peers, and for example we want some fields have defaults or not specified (e.g. a password), the list can read confusing. Also, right now there are many settings applicable for a peer, and restructuring them into a real struct would enhance readability, and also would make processing it in code much simpler.