Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

feat(metrics): add flag to enable WASM metrics #2615

Merged
merged 1 commit into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
3 changes: 3 additions & 0 deletions charts/osm/templates/osm-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions charts/osm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down
3 changes: 3 additions & 0 deletions cmd/osm-controller/osm-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down