diff --git a/charts/osm/README.md b/charts/osm/README.md index 034c0ebe74..df2f01f05e 100644 --- a/charts/osm/README.md +++ b/charts/osm/README.md @@ -74,6 +74,7 @@ The following table lists the configurable parameters of the osm chart and their | OpenServiceMesh.enablePermissiveTrafficPolicy | bool | `false` | Enable permissive traffic policy mode | | OpenServiceMesh.enablePrivilegedInitContainer | bool | `false` | Run init container in privileged mode | | OpenServiceMesh.enablePrometheusScraping | bool | `true` | Enable Prometheus metrics scraping on sidecar proxies | +| OpenServiceMesh.enableWASMStatsExperimental | bool | `false` | Enable extra Envoy statistics generated by a custom WASM extension | | OpenServiceMesh.enforceSingleMesh | bool | `false` | Enforce only deploying one mesh in the cluster | | OpenServiceMesh.envoyLogLevel | string | `"error"` | Envoy log level is used to specify the level of logs collected from envoy | | OpenServiceMesh.fluentBit.enableProxySupport | bool | `false` | Enable proxy support toggle for Fluent Bit | diff --git a/charts/osm/templates/osm-deployment.yaml b/charts/osm/templates/osm-deployment.yaml index f2deff6237..1e231c80ff 100644 --- a/charts/osm/templates/osm-deployment.yaml +++ b/charts/osm/templates/osm-deployment.yaml @@ -48,6 +48,9 @@ spec: "--cert-manager-issuer-name", "{{.Values.OpenServiceMesh.certmanager.issuerName}}", "--cert-manager-issuer-kind", "{{.Values.OpenServiceMesh.certmanager.issuerKind}}", "--cert-manager-issuer-group", "{{.Values.OpenServiceMesh.certmanager.issuerGroup}}", + {{- if .Values.OpenServiceMesh.enableWASMStatsExperimental }} + "--stats-wasm-experimental", + {{- end }} ] resources: limits: diff --git a/charts/osm/values.schema.json b/charts/osm/values.schema.json index 3c31ca1bcd..60dddde6dd 100644 --- a/charts/osm/values.schema.json +++ b/charts/osm/values.schema.json @@ -464,6 +464,15 @@ "" ] }, + "enableWASMStatsExperimental": { + "$id": "#/properties/OpenServiceMesh/properties/enableWASMStatsExperimental", + "type": "boolean", + "title": "Enable WASM Stats", + "description": "Enable extra Envoy statistics generated by a custom WASM extension", + "examples": [ + false + ] + }, "osmNamespace": { "$id": "#/properties/OpenServiceMesh/properties/osmNamespace", "type": "string", diff --git a/charts/osm/values.yaml b/charts/osm/values.yaml index 8dbdf352a0..f148208c24 100644 --- a/charts/osm/values.yaml +++ b/charts/osm/values.yaml @@ -106,6 +106,8 @@ OpenServiceMesh: enforceSingleMesh: false # -- Validating- and MutatingWebhookConfiguration name webhookConfigNamePrefix: osm-webhook + # -- Enable extra Envoy statistics generated by a custom WASM extension + enableWASMStatsExperimental: false # -- Optional parameter. If not specified, the release namespace is used to deploy the osm components. osmNamespace: "" diff --git a/cmd/osm-controller/osm-controller.go b/cmd/osm-controller/osm-controller.go index 723bbe973e..4ff982428e 100644 --- a/cmd/osm-controller/osm-controller.go +++ b/cmd/osm-controller/osm-controller.go @@ -100,6 +100,9 @@ func init() { flags.StringVar(&certManagerOptions.IssuerKind, "cert-manager-issuer-kind", "Issuer", "cert-manager issuer kind") flags.StringVar(&certManagerOptions.IssuerGroup, "cert-manager-issuer-group", "cert-manager.io", "cert-manager issuer group") + // feature flags + flags.BoolVar(&optionalFeatures.WASMStats, "stats-wasm-experimental", false, "Enable a WebAssembly module that generates additional Envoy statistics.") + _ = clientgoscheme.AddToScheme(scheme) _ = v1beta1.AddToScheme(scheme) }