-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from utkarsh-pro/utkarsh-pro/feature/envoy-fi…
…lter Add support for Envoy Filter
- Loading branch information
Showing
5 changed files
with
318 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
278 changes: 278 additions & 0 deletions
278
templates/oam/workloads/envoyfilter.meshery.layer5.io.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,278 @@ | ||
{ | ||
"description": "Customizing Envoy configuration generated by Istio. See more details at: https://istio.io/docs/reference/config/networking/envoy-filter.html", | ||
"properties": { | ||
"configPatches": { | ||
"description": "One or more patches with match conditions.", | ||
"items": { | ||
"properties": { | ||
"applyTo": { | ||
"enum": [ | ||
"INVALID", | ||
"LISTENER", | ||
"FILTER_CHAIN", | ||
"NETWORK_FILTER", | ||
"HTTP_FILTER", | ||
"ROUTE_CONFIGURATION", | ||
"VIRTUAL_HOST", | ||
"HTTP_ROUTE", | ||
"CLUSTER", | ||
"EXTENSION_CONFIG" | ||
], | ||
"type": "string" | ||
}, | ||
"match": { | ||
"description": "Match on listener/route configuration/cluster.", | ||
"oneOf": [ | ||
{ | ||
"not": { | ||
"anyOf": [ | ||
{ | ||
"required": ["listener"] | ||
}, | ||
{ | ||
"required": ["routeConfiguration"] | ||
}, | ||
{ | ||
"required": ["cluster"] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"required": ["listener"] | ||
}, | ||
{ | ||
"required": ["routeConfiguration"] | ||
}, | ||
{ | ||
"required": ["cluster"] | ||
} | ||
], | ||
"properties": { | ||
"cluster": { | ||
"description": "Match on envoy cluster attributes.", | ||
"properties": { | ||
"name": { | ||
"description": "The exact name of the cluster to match.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"portNumber": { | ||
"description": "The service port for which this cluster was generated.", | ||
"type": "integer" | ||
}, | ||
"service": { | ||
"description": "The fully qualified service name for this cluster.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"subset": { | ||
"description": "The subset associated with the service.", | ||
"format": "string", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"context": { | ||
"description": "The specific config generation context to match on.", | ||
"enum": [ | ||
"ANY", | ||
"SIDECAR_INBOUND", | ||
"SIDECAR_OUTBOUND", | ||
"GATEWAY" | ||
], | ||
"type": "string" | ||
}, | ||
"listener": { | ||
"description": "Match on envoy listener attributes.", | ||
"properties": { | ||
"filterChain": { | ||
"description": "Match a specific filter chain in a listener.", | ||
"properties": { | ||
"applicationProtocols": { | ||
"description": "Applies only to sidecars.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"destinationPort": { | ||
"description": "The destination_port value used by a filter chain's match condition.", | ||
"type": "integer" | ||
}, | ||
"filter": { | ||
"description": "The name of a specific filter to apply the patch to.", | ||
"properties": { | ||
"name": { | ||
"description": "The filter name to match on.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"subFilter": { | ||
"properties": { | ||
"name": { | ||
"description": "The filter name to match on.", | ||
"format": "string", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"name": { | ||
"description": "The name assigned to the filter chain.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"sni": { | ||
"description": "The SNI value used by a filter chain's match condition.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"transportProtocol": { | ||
"description": "Applies only to `SIDECAR_INBOUND` context.", | ||
"format": "string", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"name": { | ||
"description": "Match a specific listener by its name.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"portName": { | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"portNumber": { | ||
"type": "integer" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"proxy": { | ||
"description": "Match on properties associated with a proxy.", | ||
"properties": { | ||
"metadata": { | ||
"additionalProperties": { | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"type": "object" | ||
}, | ||
"proxyVersion": { | ||
"format": "string", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"routeConfiguration": { | ||
"description": "Match on envoy HTTP route configuration attributes.", | ||
"properties": { | ||
"gateway": { | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"name": { | ||
"description": "Route configuration name to match on.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"portName": { | ||
"description": "Applicable only for GATEWAY context.", | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"portNumber": { | ||
"type": "integer" | ||
}, | ||
"vhost": { | ||
"properties": { | ||
"name": { | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"route": { | ||
"description": "Match a specific route within the virtual host.", | ||
"properties": { | ||
"action": { | ||
"description": "Match a route with specific action type.", | ||
"enum": [ | ||
"ANY", | ||
"ROUTE", | ||
"REDIRECT", | ||
"DIRECT_RESPONSE" | ||
], | ||
"type": "string" | ||
}, | ||
"name": { | ||
"format": "string", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"patch": { | ||
"description": "The patch to apply along with the operation.", | ||
"properties": { | ||
"filterClass": { | ||
"description": "Determines the filter insertion order.", | ||
"enum": ["UNSPECIFIED", "AUTHN", "AUTHZ", "STATS"], | ||
"type": "string" | ||
}, | ||
"operation": { | ||
"description": "Determines how the patch should be applied.", | ||
"enum": [ | ||
"INVALID", | ||
"MERGE", | ||
"ADD", | ||
"REMOVE", | ||
"INSERT_BEFORE", | ||
"INSERT_AFTER", | ||
"INSERT_FIRST", | ||
"REPLACE" | ||
], | ||
"type": "string" | ||
}, | ||
"value": { | ||
"description": "The JSON config of the object being patched.", | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
}, | ||
"workloadSelector": { | ||
"properties": { | ||
"labels": { | ||
"additionalProperties": { | ||
"format": "string", | ||
"type": "string" | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Envoy Filter" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"apiVersion": "core.oam.dev/v1alpha1", | ||
"kind": "WorkloadDefinition", | ||
"metadata": { | ||
"name": "EnvoyFilterIstio" | ||
}, | ||
"spec": { | ||
"definitionRef": { | ||
"name": "envoyfilter.meshery.layer5.io" | ||
} | ||
} | ||
} |