Skip to content

Commit

Permalink
[Patterns] Pattern components generated from latest Nginx Service Mes…
Browse files Browse the repository at this point in the history
…h Helm chart

Signed-off-by: l5io <[email protected]>
  • Loading branch information
leecalcote authored and l5io committed Nov 2, 2022
1 parent 1e05b0f commit dc020cd
Show file tree
Hide file tree
Showing 16 changed files with 580 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"description": "Specifications of this circuit breaker.",
"properties": {
"destination": {
"description": "The destination of this circuit breaker.",
"properties": {
"kind": {
"description": "Kind of the destination.",
"enum": [
"Service"
],
"type": "string"
},
"name": {
"description": "Name of the destination.",
"minLength": 1,
"type": "string"
},
"namespace": {
"description": "Namespace of the destination.",
"type": "string"
}
},
"required": [
"name",
"kind"
],
"type": "object"
},
"errors": {
"description": "The number of errors allowed within the timeout before tripping the circuit.",
"minimum": 0,
"type": "integer"
},
"fallback": {
"description": "The fallback Service to send traffic to when the circuit is tripped.",
"properties": {
"port": {
"description": "The port of the fallback Service.",
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"service": {
"description": "The fallback Service to send traffic to when the circuit is tripped.",
"type": "string"
}
},
"type": "object"
},
"timeoutSeconds": {
"description": "The timeout window for errors to occur, and the amount of time to wait before closing the circuit.",
"minimum": 0,
"type": "integer"
}
},
"required": [
"destination",
"errors",
"timeoutSeconds"
],
"title": "Circuit Breaker",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "WorkloadDefinition",
"apiVersion": "core.oam.dev/v1alpha1",
"metadata": {
"name": "CircuitBreaker",
"creationTimestamp": null
},
"spec": {
"definitionRef": {
"name": "circuitbreaker.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/mesh/workload",
"k8sAPIVersion": "specs.smi.nginx.com/v1alpha1",
"k8sKind": "CircuitBreaker",
"meshName": "NGINX_SERVICE_MESH",
"meshVersion": "1.6.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"description": "HTTPRouteGroupSpec defines the desired state of HTTPRouteGroup It is the specification for a HTTPRouteGroup",
"properties": {
"matches": {
"description": "Routes for inbound traffic",
"items": {
"description": "HTTPMatch defines an individual route for HTTP traffic",
"properties": {
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "Headers is a list of headers used to match HTTP traffic",
"type": "object"
},
"methods": {
"description": "Methods for inbound traffic as defined in RFC 7231 https://tools.ietf.org/html/rfc7231#section-4",
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"description": "Name is the name of the match for referencing in a TrafficTarget",
"type": "string"
},
"pathRegex": {
"description": "PathRegex is a regular expression defining the route",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"title": "HTTP Route Group",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "WorkloadDefinition",
"apiVersion": "core.oam.dev/v1alpha1",
"metadata": {
"name": "HTTPRouteGroup",
"creationTimestamp": null
},
"spec": {
"definitionRef": {
"name": "httproutegroup.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/mesh/workload",
"k8sAPIVersion": "specs.smi-spec.io/v1alpha3",
"k8sKind": "HTTPRouteGroup",
"meshName": "NGINX_SERVICE_MESH",
"meshVersion": "1.6.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
1 change: 1 addition & 0 deletions templates/oam/workloads/1.6.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"kind":"WorkloadDefinition","apiVersion":"core.oam.dev/v1alpha1","metadata":{"name":"NginxMesh","creationTimestamp":null},"spec":{"definitionRef":{"name":"nginxmesh.meshery.layer5.io"},"metadata":{"@type":"pattern.meshery.io/core","version":"1.6.0"}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"properties": {
"burst": {
"description": "The number of requests to allow beyond the given rate.",
"minimum": 0,
"type": "integer"
},
"delay": {
"description": "The number of requests after which to delay requests.",
"x-kubernetes-int-or-string": true
},
"destination": {
"description": "The destination of this rate limit.",
"properties": {
"kind": {
"description": "Kind of the destination.",
"minLength": 1,
"type": "string"
},
"name": {
"description": "Name of the destination.",
"minLength": 1,
"type": "string"
},
"namespace": {
"description": "Namespace of the destination.",
"type": "string"
}
},
"required": [
"name",
"kind"
],
"type": "object"
},
"name": {
"description": "Name of this rate limit spec.",
"minLength": 1,
"type": "string"
},
"rate": {
"description": "The allowed rate of traffic.",
"pattern": "^[0-9]+r/[s,m]$",
"type": "string"
},
"sources": {
"description": "Sources of this rate limit.",
"items": {
"properties": {
"kind": {
"description": "Kind of this source.",
"minLength": 1,
"type": "string"
},
"name": {
"description": "Name of this source.",
"minLength": 1,
"type": "string"
},
"namespace": {
"description": "Namespace of this source.",
"type": "string"
}
},
"required": [
"name",
"kind"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"name",
"destination",
"rate"
],
"title": "Rate Limit",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "WorkloadDefinition",
"apiVersion": "core.oam.dev/v1alpha1",
"metadata": {
"name": "RateLimit",
"creationTimestamp": null
},
"spec": {
"definitionRef": {
"name": "ratelimit.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/mesh/workload",
"k8sAPIVersion": "specs.smi.nginx.com/v1alpha1",
"k8sKind": "RateLimit",
"meshName": "NGINX_SERVICE_MESH",
"meshVersion": "1.6.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"description": "SpiffeIDSpec defines the desired state of SpiffeID",
"properties": {
"dnsNames": {
"items": {
"type": "string"
},
"type": "array"
},
"federatesWith": {
"items": {
"type": "string"
},
"type": "array"
},
"parentId": {
"type": "string"
},
"selector": {
"properties": {
"agent_node_uid": {
"description": "UID of the node",
"type": "string"
},
"arbitrary": {
"description": "Arbitrary selectors",
"items": {
"type": "string"
},
"type": "array"
},
"cluster": {
"description": "The k8s_psat cluster name",
"type": "string"
},
"containerImage": {
"description": "Container image to match for this spiffe ID",
"type": "string"
},
"containerName": {
"description": "Container name to match for this spiffe ID",
"type": "string"
},
"namespace": {
"description": "Namespace to match for this spiffe ID",
"type": "string"
},
"nodeName": {
"description": "Node name to match for this spiffe ID",
"type": "string"
},
"podLabel": {
"additionalProperties": {
"type": "string"
},
"description": "Pod label name/value to match for this spiffe ID",
"type": "object"
},
"podName": {
"description": "Pod name to match for this spiffe ID",
"type": "string"
},
"podUid": {
"description": "Pod UID to match for this spiffe ID",
"type": "string"
},
"serviceAccount": {
"description": "ServiceAccount to match for this spiffe ID",
"type": "string"
}
},
"type": "object"
},
"spiffeId": {
"type": "string"
}
},
"required": [
"parentId",
"selector",
"spiffeId"
],
"title": "Spiffe ID",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "WorkloadDefinition",
"apiVersion": "core.oam.dev/v1alpha1",
"metadata": {
"name": "SpiffeID",
"creationTimestamp": null
},
"spec": {
"definitionRef": {
"name": "spiffeid.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/mesh/workload",
"k8sAPIVersion": "spiffeid.spiffe.io/v1beta1",
"k8sKind": "SpiffeID",
"meshName": "NGINX_SERVICE_MESH",
"meshVersion": "1.6.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "TCPRouteSpec defines the desired state of TCPRoute",
"title": "TCP Route",
"type": "object"
}
Loading

0 comments on commit dc020cd

Please sign in to comment.