From 3785998730b03d75a87c1e56e73c3ef756d1c272 Mon Sep 17 00:00:00 2001 From: leecalcote Date: Tue, 4 Oct 2022 01:21:11 +0000 Subject: [PATCH] [Patterns] Pattern components generated from latest OSM manifests Signed-off-by: l5io --- ...ery.layer5.io.meshery.layer5io.schema.json | 29 ++++++++++ ...vice.OSM.meshery.layer5.io_definition.json | 20 +++++++ ...ery.layer5.io.meshery.layer5io.schema.json | 56 +++++++++++++++++++ ...etry.OSM.meshery.layer5.io_definition.json | 20 +++++++ 4 files changed, 125 insertions(+) create mode 100644 templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io.meshery.layer5io.schema.json create mode 100644 templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io_definition.json create mode 100644 templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io.meshery.layer5io.schema.json create mode 100644 templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io_definition.json diff --git a/templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io.meshery.layer5io.schema.json b/templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io.meshery.layer5io.schema.json new file mode 100644 index 00000000..a3d17118 --- /dev/null +++ b/templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io.meshery.layer5io.schema.json @@ -0,0 +1,29 @@ +{ + "properties": { + "connectTimeout": { + "description": "Timeout for connecting to the service.", + "type": "string" + }, + "host": { + "description": "Hostname of the service.", + "minLength": 1, + "type": "string" + }, + "port": { + "description": "Port of the service.", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "protocol": { + "description": "Protocol of the service.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "title": "Extension Service", + "type": "object" +} \ No newline at end of file diff --git a/templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io_definition.json b/templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io_definition.json new file mode 100644 index 00000000..040b735d --- /dev/null +++ b/templates/oam/workloads/v1.2.1/extensionservice.OSM.meshery.layer5.io_definition.json @@ -0,0 +1,20 @@ +{ + "kind": "WorkloadDefinition", + "apiVersion": "core.oam.dev/v1alpha1", + "metadata": { + "name": "ExtensionService.OSM", + "creationTimestamp": null + }, + "spec": { + "definitionRef": { + "name": "extensionservice.OSM.meshery.layer5.io" + }, + "metadata": { + "@type": "pattern.meshery.io/mesh/workload", + "k8sAPIVersion": "config.openservicemesh.io/v1alpha2", + "k8sKind": "ExtensionService", + "meshName": "OPEN_SERVICE_MESH", + "meshVersion": "v1.2.1" + } + } +} \ No newline at end of file diff --git a/templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io.meshery.layer5io.schema.json b/templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io.meshery.layer5io.schema.json new file mode 100644 index 00000000..2b1c58fc --- /dev/null +++ b/templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io.meshery.layer5io.schema.json @@ -0,0 +1,56 @@ +{ + "properties": { + "accessLog": { + "description": "accessLog (optional) defines the Envoy access log configuration.", + "properties": { + "format": { + "description": "format (optional) defines the Envoy access log format. The format can either be unstructured or structured (e.g. JSON). Refer to https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#format-strings regarding how a format string can be specified.", + "minLength": 1, + "type": "string" + }, + "openTelemetry": { + "description": "openTelemetry (optional) defines the OpenTelemetry configuration used to export the Envoy access logs to an OpenTelemetry collector.", + "properties": { + "attributes": { + "additionalProperties": true, + "description": "attributes (optional) defines key-value pairs as additional metadata corresponding access log record.", + "type": "object" + }, + "extensionService": { + "description": "extensionService defines the reference to ExtensionService resource corresponding to the OpenTelemetry collector the access log should be exported to.", + "properties": { + "name": { + "description": "Name of the ExtensionService resource.", + "minLength": 1, + "type": "string" + }, + "namespace": { + "description": "Namespace of the ExtensionService resource.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "namespace", + "name" + ], + "type": "object" + } + }, + "required": [ + "extensionService" + ], + "type": "object" + } + }, + "type": "object" + }, + "selector": { + "additionalProperties": true, + "description": "selector (optional) defines the pod label selector for pods the Telemetry configuration is applicable to. It selects pods with matching label keys and values. If not specified, the configuration applies to all pods in the Telemetry resource's namespace.", + "type": "object" + } + }, + "title": "Telemetry", + "type": "object" +} \ No newline at end of file diff --git a/templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io_definition.json b/templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io_definition.json new file mode 100644 index 00000000..b041a138 --- /dev/null +++ b/templates/oam/workloads/v1.2.1/telemetry.OSM.meshery.layer5.io_definition.json @@ -0,0 +1,20 @@ +{ + "kind": "WorkloadDefinition", + "apiVersion": "core.oam.dev/v1alpha1", + "metadata": { + "name": "Telemetry.OSM", + "creationTimestamp": null + }, + "spec": { + "definitionRef": { + "name": "telemetry.OSM.meshery.layer5.io" + }, + "metadata": { + "@type": "pattern.meshery.io/mesh/workload", + "k8sAPIVersion": "policy.openservicemesh.io/v1alpha1", + "k8sKind": "Telemetry", + "meshName": "OPEN_SERVICE_MESH", + "meshVersion": "v1.2.1" + } + } +} \ No newline at end of file