From 85010ede2aa3716fb3fc98b8920fc81c1892144e Mon Sep 17 00:00:00 2001 From: Ankit R Gadiya Date: Fri, 16 Feb 2024 18:56:26 +0530 Subject: [PATCH] feat(static-route): add support for IP Whitelisting --- riocli/apply/manifests/staticroute.yaml | 5 ++++- riocli/jsonschema/schemas/static_route-schema.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/riocli/apply/manifests/staticroute.yaml b/riocli/apply/manifests/staticroute.yaml index dadb1779..d1bb5f3b 100644 --- a/riocli/apply/manifests/staticroute.yaml +++ b/riocli/apply/manifests/staticroute.yaml @@ -5,4 +5,7 @@ metadata: project: "project-guid" # region: us labels: - app: test \ No newline at end of file + app: test +spec: + sourceIPRange: + - 10.0.0.0/8 diff --git a/riocli/jsonschema/schemas/static_route-schema.yaml b/riocli/jsonschema/schemas/static_route-schema.yaml index a686e681..f4a4c9dc 100644 --- a/riocli/jsonschema/schemas/static_route-schema.yaml +++ b/riocli/jsonschema/schemas/static_route-schema.yaml @@ -51,11 +51,18 @@ definitions: uuid: type: string pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ipRange: + type: string + pattern: '^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}/([1-9]|1\d|2\d|3[0-2])$' staticRouteSpec: type: object properties: url: type: string + sourceIPRange: + type: array + items: + "$ref": "#/definitions/ipRange" staticRouteStatus: type: object properties: