digitalocean / k8s-staticroute-operator

Create static routes for your k8s nodes using CRDs.
Apache License 2.0
55 stars 11 forks source link

Ability to set multiple destinations per gateway #10

Closed v-ctiutiu closed 2 years ago

v-ctiutiu commented 2 years ago

Background

Currently, the operator supports a single entry in the destination field per gateway within the StaticRoute CRD. This is fine for simple use cases, but leads to multiple CRs if a setup requires multiple destinations per gateway. Dealing with multiple CRDs in this case can be hard to manage.

Proposal

Change the destination filed in the StaticRoute CRD spec to array type. Creating a static routes resource with multiple destinations per gateway becomes:

apiVersion: networking.digitalocean.com/v1
kind: StaticRoute
metadata:
  name: public-egress
spec:
  destinations: 
   - "34.160.111.145"
   - "34.117.59.81"
   - "32.17.9.81"
  gateway: "10.116.0.4"