Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f914c1a
create page with hard coded rules
Anton-Fil Aug 18, 2025
0ea3fef
add dinamic gateway choose without validation
Anton-Fil Aug 20, 2025
507a543
add dinamic validatione to perenRef and UX upgrade
Anton-Fil Aug 20, 2025
9d27720
Add wizard vith small validatione
Anton-Fil Aug 27, 2025
7b2f454
create page with hard coded rules
Anton-Fil Aug 18, 2025
037250b
add dinamic gateway choose without validation
Anton-Fil Aug 20, 2025
78e636b
add mathces steps+ validation
Anton-Fil Aug 29, 2025
6a4acc7
Adding filter form to rule wizard
Patryk-Stefanski Sep 1, 2025
7f1227e
fix 'Unexpected any' lint warnings
Patryk-Stefanski Sep 18, 2025
18def05
fixing up httpRoute edit errors
Patryk-Stefanski Sep 19, 2025
2db1382
Override default edit button for httpRoutes
Patryk-Stefanski Sep 19, 2025
7bc6652
Fix form -> yaml synchronization on edit
Patryk-Stefanski Sep 23, 2025
e34aa98
Fix create httpRoute yaml view
Patryk-Stefanski Sep 23, 2025
e6d310b
Merge pull request #27 from Kuadrant/12-filter-wizard
jasonmadigan Oct 6, 2025
2ef9029
adding beckand ref + ymal synchronization + validation
Anton-Fil Sep 17, 2025
02eac9c
added select for port, added alert for namespace, fixed bug with chos…
Anton-Fil Sep 24, 2025
b081d09
refractoring
Anton-Fil Oct 7, 2025
93b8ef1
i18n
Anton-Fil Oct 7, 2025
2c39e75
refractoring after rewive
Anton-Fil Oct 7, 2025
072b9e0
Merge pull request #29 from Kuadrant/gh-issue-246-backenRef
Anton-Fil Oct 7, 2025
cbd5e00
review wizart step addet with small validatione
Anton-Fil Sep 22, 2025
be911d6
add smart validatione
Anton-Fil Sep 23, 2025
6e2b4dc
add smart validatione+++
Anton-Fil Sep 23, 2025
eb4fec3
aded smart validation to beckendref
Anton-Fil Sep 24, 2025
cd7dd8d
add generic validatione for header nad query param
Anton-Fil Sep 25, 2025
22b3411
refractoring
Anton-Fil Oct 7, 2025
c9d16f4
upgrade validation
Anton-Fil Oct 7, 2025
aea3d01
ui upgrade
Anton-Fil Oct 8, 2025
7098f8c
upgrade ui and validation
Anton-Fil Oct 8, 2025
e661d8f
Merge pull request #31 from Kuadrant/gh-issue-246-ReviewAndCreate
Anton-Fil Oct 16, 2025
7707a6c
iu and valifation upgrade
Anton-Fil Oct 17, 2025
3450ae2
Final interface improvements, validations, and bug fixes
Anton-Fil Oct 22, 2025
cbe4bce
Final fix filter tab bug
Anton-Fil Oct 22, 2025
3e5fdb4
Fixed consol extention and restart buttun
Anton-Fil Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"component": { "$codeRef": "GatewayCreatePage" }
}
},
{
"type": "console.resource/create",
"properties": {
"model": {
"group": "gateway.networking.k8s.io",
"version": "v1",
"kind": "HTTPRoute"
},
"component": { "$codeRef": "HTTPRouteCreatePage" }
}
},
{
"type": "console.tab/horizontalNav",
"properties": {
Expand All @@ -33,6 +44,25 @@
"component": { "$codeRef": "GatewaySingleOverview" }
}
},
{
"type": "console.page/route",
"properties": {
"exact": true,
"path": "/k8s/ns/:namespace/gateway.networking.k8s.io~v1~HTTPRoute/:name/edit",
"component": { "$codeRef": "HTTPRouteCreatePage" }
}
},
{
"type": "console.action/resource-provider",
"properties": {
"model": {
"group": "gateway.networking.k8s.io",
"version": "v1",
"kind": "HTTPRoute"
},
"provider": { "$codeRef": "useHTTPRouteActions" }
}
},
{
"type": "console.tab/horizontalNav",
"properties": {
Expand All @@ -48,4 +78,4 @@
"component": { "$codeRef": "HTTPRouteSingleOverview" }
}
}
]
]
121 changes: 117 additions & 4 deletions locales/en/plugin__gateway-api-console-plugin.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
{
"A Gateway represents an instance of a service-traffic handling infrastructure by binding Listeners to a set of IP addresses.": "A Gateway represents an instance of a service-traffic handling infrastructure by binding Listeners to a set of IP addresses.",
"A list of actions to perform on a request or response before it is sent to the backend.": "A list of actions to perform on a request or response before it is sent to the backend.",
"A map of key/value pairs to enable implementation-specific TLS options, such as minimum TLS version or cipher suites.": "A map of key/value pairs to enable implementation-specific TLS options, such as minimum TLS version or cipher suites.",
"A unique name for the gateway within the namespace.": "A unique name for the gateway within the namespace.",
"A unique name for this listener within the gateway.": "A unique name for this listener within the gateway.",
"Actions": "Actions",
"Add": "Add",
"Add address": "Add address",
"Add backend reference": "Add backend reference",
"Add certificate reference": "Add certificate reference",
"Add filter": "Add filter",
"Add hostname": "Add hostname",
"Add listener": "Add listener",
"Add Listener": "Add Listener",
"Add match": "Add match",
"Add more": "Add more",
"Add parent reference": "Add parent reference",
"Add route kind": "Add route kind",
"Add rule": "Add rule",
"Add TLS option": "Add TLS option",
"Add, set, or remove request headers.": "Add, set, or remove request headers.",
"Add, set, or remove response headers.": "Add, set, or remove response headers.",
"Addresses (Optional)": "Addresses (Optional)",
"Addresses help": "Addresses help",
"Addresses table": "Addresses table",
"All": "All",
"All backend references": "All backend references",
"All filters": "All filters",
"All hostnames": "All hostnames",
"All matches": "All matches",
"All route kinds": "All route kinds",
"Allow from all namespaces.": "Allow from all namespaces.",
"Allow from namespaces matching a specific label.": "Allow from namespaces matching a specific label.",
Expand All @@ -24,6 +36,13 @@
"Allowed Route Kinds": "Allowed Route Kinds",
"Allowed Routes": "Allowed Routes",
"At least one listener is required to create a Gateway.": "At least one listener is required to create a Gateway.",
"At least one parent reference required for the HTTPRoute": "At least one parent reference required for the HTTPRoute",
"At least one rule is required for a HTTPRoute to handle traffic.": "At least one rule is required for a HTTPRoute to handle traffic.",
"Attaches this route to the selected Gateway(s), linking it to the entry point.": "Attaches this route to the selected Gateway(s), linking it to the entry point.",
"Auto-filled from selected service": "Auto-filled from selected service",
"Backend references": "Backend references",
"Backend References": "Backend References",
"Backend Service": "Backend Service",
"Cancel": "Cancel",
"Certificate name": "Certificate name",
"Certificate namespace": "Certificate namespace",
Expand All @@ -32,30 +51,57 @@
"Certificate references for TLS termination. Specify the name, namespace, and kind of the certificate resource.": "Certificate references for TLS termination. Specify the name, namespace, and kind of the certificate resource.",
"Configuration": "Configuration",
"Create": "Create",
"Create an HTTPRoute to route traffic from the Gateway to backend services.": "Create an HTTPRoute to route traffic from the Gateway to backend services.",
"Create Gateway": "Create Gateway",
"Create HTTPRoute": "Create HTTPRoute",
"Defines the backend Kubernetes Service(s) to forward traffic to. Traffic is load-balanced between them based on weight.": "Defines the backend Kubernetes Service(s) to forward traffic to. Traffic is load-balanced between them based on weight.",
"Defines the backend Kubernetes Service(s) to forward traffic to. Traffic is load-balanced between them based on weight. If omitted, this rule will have no effect.": "Defines the backend Kubernetes Service(s) to forward traffic to. Traffic is load-balanced between them based on weight. If omitted, this rule will have no effect.",
"Defines the criteria for a request to match this rule. If multiple matches are specified, they are OR ed. If omitted, this rule matches all requests.": "Defines the criteria for a request to match this rule. If multiple matches are specified, they are OR ed. If omitted, this rule matches all requests.",
"Defines the criteria for a request to match this rule. If multiple matches are specified, they are OR ed. If omitted, this rule matches all requests. Multiple Matches in one Rule share all BackendRefs.": "Defines the criteria for a request to match this rule. If multiple matches are specified, they are OR ed. If omitted, this rule matches all requests. Multiple Matches in one Rule share all BackendRefs.",
"Delete": "Delete",
"Delete it permanently": "Delete it permanently",
"Delete match": "Delete match",
"e.g., 192.168.1.100": "e.g., 192.168.1.100",
"e.g., gateway.example.com": "e.g., gateway.example.com",
"e.g., gateway.networking.k8s.io": "e.g., gateway.networking.k8s.io",
"e.g., minVersion, cipherSuites": "e.g., minVersion, cipherSuites",
"e.g., TLSv1.2, ECDHE-RSA-AES256-GCM-SHA384": "e.g., TLSv1.2, ECDHE-RSA-AES256-GCM-SHA384",
"Edit": "Edit",
"Edit an HTTPRoute to route traffic from the Gateway to backend services.": "Edit an HTTPRoute to route traffic from the Gateway to backend services.",
"Edit Gateway": "Edit Gateway",
"Edit HTTPRoute": "Edit HTTPRoute",
"Edit listener": "Edit listener",
"Edit Listener": "Edit Listener",
"Edit rule": "Edit rule",
"Enter gateway name": "Enter gateway name",
"Enter hostname (optional)": "Enter hostname (optional)",
"Enter listener name": "Enter listener name",
"Enter port (1-65535)": "Enter port (1-65535)",
"Envoy Gateway": "Envoy Gateway",
"Error: YAML Validation": "Error: YAML Validation",
"example.com": "example.com",
"Filter type": "Filter type",
"Filters": "Filters",
"Gateway class cannot be changed after creation.": "Gateway class cannot be changed after creation.",
"Gateway Class Name": "Gateway Class Name",
"Gateway Name": "Gateway Name",
"Gateway is terminating.": "Gateway is terminating.",
"Gateway name": "Gateway name",
"Gateway names cannot be changed after creation.": "Gateway names cannot be changed after creation.",
"Gateway Namespace": "Gateway Namespace",
"Group": "Group",
"Header name": "Header name",
"Header value": "Header value",
"Headers": "Headers",
"Hostname": "Hostname",
"Hostnames": "Hostnames",
"Hostnames help": "Hostnames help",
"HTTP method": "HTTP method",
"HTTPRoute name": "HTTPRoute name",
"Inherits from parent listener if empty.": "Inherits from parent listener if empty.",
"Istio": "Istio",
"Key": "Key",
"Kind": "Kind",
"Learn more": "Learn more",
"Listener is not available for route binding.": "Listener is not available for route binding.",
"Listener Name": "Listener Name",
"Listener Summary": "Listener Summary",
"Listeners": "Listeners",
Expand All @@ -64,58 +110,125 @@
"Listeners table": "Listeners table",
"Loading gateway...": "Loading gateway...",
"Loading YAML editor...": "Loading YAML editor...",
"Matches": "Matches",
"Matches traffic for these hostnames.": "Matches traffic for these hostnames.",
"Mirror backend name": "Mirror backend name",
"Missing required metadata fields (uid, resourceVersion) for {{kind}} update": "Missing required metadata fields (uid, resourceVersion) for {{kind}} update",
"more": "more",
"N/A": "N/A",
"Name": "Name",
"Namespace": "Namespace",
"Next": "Next",
"No attached resources found": "No attached resources found",
"No matching resources found": "No matching resources found",
"None": "None",
"Not allowed by Gateway settings.": "Not allowed by Gateway settings.",
"Not set": "Not set",
"Not specified": "Not specified",
"Only HTTPRoute is supported by this Gateway.": "Only HTTPRoute is supported by this Gateway.",
"Optional hostname to match requests. Leave empty to match all hostnames.": "Optional hostname to match requests. Leave empty to match all hostnames.",
"Parent reference": "Parent reference",
"Parent references": "Parent references",
"Parent references help": "Parent references help",
"Path redirect": "Path redirect",
"Path redirect type": "Path redirect type",
"Path replacement type": "Path replacement type",
"Path rewrite": "Path rewrite",
"Path type": "Path type",
"Path value": "Path value",
"Port": "Port",
"Protocol": "Protocol",
"Query param name": "Query param name",
"Query param value": "Query param value",
"Query Params": "Query Params",
"Redirect path value": "Redirect path value",
"Redirect the request to a different hostname, path, or port.": "Redirect the request to a different hostname, path, or port.",
"Redirect type": "Redirect type",
"Remove": "Remove",
"Remove address": "Remove address",
"Remove listener": "Remove listener",
"Remove parent reference": "Remove parent reference",
"Request a specific static IP address or hostname for the Gateway. This is optional and used to specify where the Gateway should be accessible.": "Request a specific static IP address or hostname for the Gateway. This is optional and used to specify where the Gateway should be accessible.",
"Request Header Modifier": "Request Header Modifier",
"Request Mirror": "Request Mirror",
"Request Redirect": "Request Redirect",
"Requests are evaluated against rules in order.": "Requests are evaluated against rules in order.",
"Response Header Modifier": "Response Header Modifier",
"Restart configuration": "Restart configuration",
"Restricts the types of Route resources that can attach to this listener (e.g., only HTTPRoute).": "Restricts the types of Route resources that can attach to this listener (e.g., only HTTPRoute).",
"Review & Create": "Review & Create",
"Review and create": "Review and create",
"Rewrite the hostname or path of the request before forwarding.": "Rewrite the hostname or path of the request before forwarding.",
"Route Kind": "Route Kind",
"Rule ID": "Rule ID",
"Rule incomplete": "Rule incomplete",
"Rules": "Rules",
"Rules are used for matching and processing requests. ": "Rules are used for matching and processing requests. ",
"Rules help": "Rules help",
"Rules table": "Rules table",
"Same": "Same",
"Save": "Save",
"Scheme": "Scheme",
"Scheme redirect": "Scheme redirect",
"Search by {{filterValue}}...": "Search by {{filterValue}}...",
"Section": "Section",
"Section name": "Section name",
"Select Address Type": "Select Address Type",
"Select Allowed Namespaces": "Select Allowed Namespaces",
"Select Certificate Kind": "Select Certificate Kind",
"Select Gateway": "Select Gateway",
"Select Gateway Class": "Select Gateway Class",
"Select header action": "Select header action",
"Select header type": "Select header type",
"Select HTTP method": "Select HTTP method",
"Select path type": "Select path type",
"Select Port": "Select Port",
"Select Protocol": "Select Protocol",
"Select query param type": "Select query param type",
"Select Route Kind": "Select Route Kind",
"Select Section": "Select Section",
"Select Service": "Select Service",
"Select TLS Mode": "Select TLS Mode",
"Select type": "Select type",
"Selector": "Selector",
"Send a copy of the request to a different backend (for traffic shadowing).": "Send a copy of the request to a different backend (for traffic shadowing).",
"Service Name": "Service Name",
"Set": "Set",
"Show detailed errors": "Show detailed errors",
"Show warnings": "Show warnings",
"Some references for the HTTPRoute could not be resolved.": "Some references for the HTTPRoute could not be resolved.",
"Specify static IP addresses or hostnames where the Gateway should be accessible. This is optional and depends on your infrastructure setup.": "Specify static IP addresses or hostnames where the Gateway should be accessible. This is optional and depends on your infrastructure setup.",
"Status": "Status",
"Status code": "Status code",
"Supports wildcards (e.g., *.example.com).": "Supports wildcards (e.g., *.example.com).",
"The first rule that matches is used.": "The first rule that matches is used.",
"The gateway class name must be unique within the namespace and conform to DNS-1123 label standards (lowercase alphanumeric characters or \"-\").": "The gateway class name must be unique within the namespace and conform to DNS-1123 label standards (lowercase alphanumeric characters or \"-\").",
"The Gateway configuration is accepted but not yet programmed.": "The Gateway configuration is accepted but not yet programmed.",
"The Gateway has issues and is not ready to serve traffic.": "The Gateway has issues and is not ready to serve traffic.",
"The Gateway is accepted and programmed in the data plane.": "The Gateway is accepted and programmed in the data plane.",
"The Gateway is accepted, programmed, and ready to serve traffic.": "The Gateway is accepted, programmed, and ready to serve traffic.",
"The HTTPRoute is accepted by at least one parent gateway.": "The HTTPRoute is accepted by at least one parent gateway.",
"The HTTPRoute is not accepted by any parent gateways.": "The HTTPRoute is not accepted by any parent gateways.",
"The name of the Gateway to attach to.": "The name of the Gateway to attach to.",
"The namespace of the Gateway.": "The namespace of the Gateway.",
"The network port that this listener will bind to (1-65535).": "The network port that this listener will bind to (1-65535).",
"The protocol that this listener will accept.": "The protocol that this listener will accept.",
"The resource is being processed.": "The resource is being processed.",
"The status of the resource is unknown.": "The status of the resource is unknown.",
"This resource has no related items configured": "This resource has no related items configured",
"This rule cannot be created until it includes at least one match, filter, or backend reference.": "This rule cannot be created until it includes at least one match, filter, or backend reference.",
"This rule has validation errors that must be fixed before creation.": "This rule has validation errors that must be fixed before creation.",
"TLS Mode": "TLS Mode",
"TLS Option": "TLS Option",
"TLS Options": "TLS Options",
"TLS termination mode. Terminate decrypts TLS at the gateway, Passthrough forwards encrypted traffic.": "TLS termination mode. Terminate decrypts TLS at the gateway, Passthrough forwards encrypted traffic.",
"Try adjusting your search criteria": "Try adjusting your search criteria",
"Type": "Type",
"Unique name of the HTTPRoute": "Unique name of the HTTPRoute",
"Unnamed": "Unnamed",
"Update": "Update",
"Value": "Value"
"URL Rewrite": "URL Rewrite",
"Validation warnings": "Validation warnings",
"Value": "Value",
"Weight": "Weight"
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"exposedModules": {
"GatewaySingleOverview": "./components/GatewaySingleOverview",
"HTTPRouteSingleOverview": "./components/HTTPRouteSingleOverview",
"GatewayCreatePage": "./components/GatewayCreatePage"
"GatewayCreatePage": "./components/GatewayCreatePage",
"HTTPRouteCreatePage": "./components/HTTPRouteCreatePage",
"useHTTPRouteActions": "./components/httproute/useHTTPRouteActions"
},
"dependencies": {
"@console/pluginAPI": "*"
Expand Down
17 changes: 11 additions & 6 deletions src/components/GatewayApiCreateUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ import {
PageSection,
ActionGroup,
} from '@patternfly/react-core';
import { k8sCreate, k8sUpdate } from '@openshift-console/dynamic-plugin-sdk';
import {
k8sCreate,
k8sUpdate,
K8sModel,
K8sResourceCommon,
} from '@openshift-console/dynamic-plugin-sdk';

interface GatewayApiCreateUpdateProps {
resource: any;
interface GatewayApiCreateUpdateProps<TResource extends K8sResourceCommon = K8sResourceCommon> {
resource: TResource;
formValidation: boolean;
model: any;
model: K8sModel;
ns: string;
view: string;
resourceKind?: string;
Expand Down Expand Up @@ -83,12 +88,12 @@ const GatewayApiCreateUpdate: React.FC<GatewayApiCreateUpdateProps> = ({
const resourcePath = `${model.apiGroup}~${model.apiVersion}~${model.kind}`;
history.push(`/k8s/ns/${ns}/${resourcePath}`);
}
} catch (error) {
} catch (error: unknown) {
const action = update ? 'updating' : 'creating';
setErrorAlertMsg(
t(`Error ${action} {{kind}}: {{error}}`, {
kind: resourceKind,
error: error,
error: error instanceof Error ? error.message : String(error),
}),
);
}
Expand Down
Loading