diff --git a/internal/pkg/parser.go b/internal/pkg/parser.go index 56e3085..2847413 100644 --- a/internal/pkg/parser.go +++ b/internal/pkg/parser.go @@ -218,6 +218,13 @@ func parseGateway(gw *gatewayv1beta1.Gateway) (map[string]interface{}, error) { }, "rules": []interface{}{}, } + rlt["ltm/virtual-address/"+ipaddr] = map[string]interface{}{ + "name": ipaddr, // must be set: 403, {"code":403,"message":"Operation is not supported on component /ltm/virtual-address." + "address": ipaddr, + "mask": "255.255.255.255", + "icmpEcho": "enabled", + "routeAdvertisement": "disabled", + } if _, ok := irules[name]; ok { rlt["ltm/virtual/"+name].(map[string]interface{})["rules"] = irules[name] } diff --git a/tests/systest/controllers_basics_test.go b/tests/systest/controllers_basics_test.go index 09553f1..307bafd 100644 --- a/tests/systest/controllers_basics_test.go +++ b/tests/systest/controllers_basics_test.go @@ -4,9 +4,9 @@ import ( "fmt" "time" + f5_bigip "github.com/f5devcentral/f5-bigip-rest-go/bigip" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - f5_bigip "github.com/f5devcentral/f5-bigip-rest-go/bigip" ) var _ = Describe("Controllers basic test", Ordered, func() { @@ -136,3 +136,5 @@ func checkResourcesAsExpected() { slog.Infof("pool is created as expected") slog.Infof("finished bigip resources checking") } + +// TODO: Add tests for updating gateway.yaml with addresses changed