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

Commit

Permalink
Fluent Bit: update charts and schema for fluent bit variables (#2107)
Browse files Browse the repository at this point in the history
Signed-off-by: Sanya Kochhar <kochhars@microsoft.com>
  • Loading branch information
SanyaKochhar authored Nov 23, 2020
1 parent e412f39 commit 5238514
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 31 deletions.
6 changes: 6 additions & 0 deletions charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ A Helm chart to install the OSM control plane on Kubernetes
| OpenServiceMesh.deployPrometheus | bool | `false` | |
| OpenServiceMesh.enablePrometheusScraping | bool | `true` | Cannot be false if `deployPrometheus` is true |
| OpenServiceMesh.envoyLogLevel | string | `"error"` | |
| OpenServiceMesh.fluentBit.name | string | `"fluentbit-logger"` | |
| OpenServiceMesh.fluentBit.registry | string | `"fluent"` | |
| OpenServiceMesh.fluentBit.tag | string | `"1.6.4"` | |
| OpenServiceMesh.fluentBit.pullPolicy | string | `"IfNotPresent"` | |
| OpenServiceMesh.fluentBit.defaultOutput | string | `"stdout"` | |
| OpenServiceMesh.fluentBit.allowCustomOutput | bool | `"true"` | |
| OpenServiceMesh.grafana.port | int | `3000` | |
| OpenServiceMesh.image.pullPolicy | string | `"IfNotPresent"` | |
| OpenServiceMesh.image.registry | string | `"openservicemesh"` | |
Expand Down
8 changes: 4 additions & 4 deletions charts/osm/templates/fluentbit-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ data:
match *
regex message /"level":"error"/
[OUTPUT]
Name {{ .Values.OpenServiceMesh.fluentbitOutput }}
Name {{ .Values.OpenServiceMesh.fluentBit.defaultOutput }}
Match *
{{- if not .Values.OpenServiceMesh.customLogAnalyticsWorkspace }}
Customer_ID {{ .Values.OpenServiceMesh.customerID }}
Shared_Key {{ .Values.OpenServiceMesh.sharedKey }}
{{- if not .Values.OpenServiceMesh.fluentBit.allowCustomOutput }}
Customer_ID {{ .Values.OpenServiceMesh.fluentBit.workspaceID }}
Shared_Key {{ .Values.OpenServiceMesh.fluentBit.primaryKey }}
{{- end }}
parser.conf: |-
Expand Down
6 changes: 3 additions & 3 deletions charts/osm/templates/osm-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ spec:
fieldRef:
fieldPath: metadata.name
{{- if .Values.OpenServiceMesh.enableFluentbit }}
- name: {{ .Values.OpenServiceMesh.fluentBitImage.name }}
image: {{ .Values.OpenServiceMesh.fluentBitImage.registry }}/fluent-bit:{{ .Values.OpenServiceMesh.fluentBitImage.tag }}
imagePullPolicy: {{ .Values.OpenServiceMesh.fluentBitImage.pullPolicy }}
- name: {{ .Values.OpenServiceMesh.fluentBit.name }}
image: {{ .Values.OpenServiceMesh.fluentBit.registry }}/fluent-bit:{{ .Values.OpenServiceMesh.fluentBit.tag }}
imagePullPolicy: {{ .Values.OpenServiceMesh.fluentBit.pullPolicy }}
volumeMounts:
- name: config
mountPath: /fluent-bit/etc
Expand Down
113 changes: 93 additions & 20 deletions charts/osm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"deployPrometheus",
"enablePrometheusScraping",
"deployGrafana",
"enableFluentbit",
"fluentBit",
"meshName",
"useHTTPSIngress",
"envoyLogLevel",
"enforceSingleMesh",
"deployJaeger",
"tracing",
"fluentbitOutput",
"webhookConfigNamePrefix",
"customLogAnalyticsWorkspace",
"connectVault"
],
"properties": {
Expand Down Expand Up @@ -195,6 +195,97 @@
false
]
},
"enableFluentbit": {
"$id": "#/properties/OpenServiceMesh/properties/enableFluentbit",
"type": "boolean",
"title": "The enableFluentbit schema",
"description": "Indicates whether Fluent Bit log forwarding should be enabled",
"examples": [
false
]
},
"fluentBit": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit",
"type": "object",
"title": "The Fluent Bit schema",
"description": "The default details of the Fluent Bit sidecar if enabled.",
"examples": [
{
"name": "fluentbit-logger",
"registry": "fluent",
"tag": "1.6.4",
"pullPolicy": "IfNotPresent",
"defaultOutput": "stdout",
"allowCustomOutput": "true"
}
],
"required": [
"name",
"registry",
"tag",
"pullPolicy",
"defaultOutput",
"allowCustomOutput"
],
"properties": {
"name": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit/properties/name",
"type": "string",
"title": "The name schema",
"description": "The name of the Fluent Bit container",
"examples": [
"fluentbit-logger"
]
},
"registry": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit/properties/registry",
"type": "string",
"title": "The registry schema",
"description": "The registry of the image to run.",
"examples": [
"fluent"
]
},
"tag": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit/properties/tag",
"type": "string",
"title": "The tag schema",
"description": "The image tag to run.",
"examples": [
"1.5"
]
},
"pullPolicy": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit/properties/pullPolicy",
"type": "string",
"title": "The pullPolicy schema",
"description": "The image pull policy.",
"pattern": "^(Always|Never|IfNotPresent)$",
"examples": [
"IfNotPresent"
]
},
"defaultOutput": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit/properties/defaultOutput",
"type": "string",
"title": "The default output schema for Fluent Bit",
"description": "The default log forwarding destination for Fluent Bit",
"examples": [
"stdout"
]
},
"allowCustomOutput": {
"$id": "#/properties/OpenServiceMesh/properties/fluentBit/properties/allowCustomOutput",
"type": "boolean",
"title": "The allowCustomOutput output schema",
"description": "Indicates whether users can provide their own output plugin",
"examples": [
true
]
}
},
"additionalProperties": true
},
"meshName": {
"$id": "#/properties/OpenServiceMesh/properties/meshName",
"type": "string",
Expand Down Expand Up @@ -267,15 +358,6 @@
},
"additionalProperties": true
},
"fluentbitOutput": {
"$id": "#/properties/OpenServiceMesh/properties/fluentbitOutput",
"type": "string",
"title": "Fluentbit logger output location",
"description": "The log forwarding destination to be forwarded by Fluent Bit",
"examples": [
"stdout"
]
},
"webhookConfigNamePrefix": {
"$id": "#/properties/OpenServiceMesh/properties/webhookConfigNamePrefix",
"type": "string",
Expand All @@ -285,15 +367,6 @@
""
]
},
"customLogAnalyticsWorkspace": {
"$id": "#/properties/OpenServiceMesh/properties/customLogAnalyticsWorkspace",
"type": "boolean",
"title": "Custom Log Analytics Workspace",
"description": "Specifies whether users will provide their own output plugin",
"examples": [
true
]
},
"connectVault": {
"$id": "#/properties/OpenServiceMesh/properties/connectVault",
"type": "boolean",
Expand Down
8 changes: 4 additions & 4 deletions charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ OpenServiceMesh:
enablePrometheusScraping: true
deployGrafana: false
enableFluentbit: false
fluentBitImage:
fluentBit:
name: fluentbit-logger
registry: fluent
tag: 1.5
tag: 1.5.0
pullPolicy: IfNotPresent
defaultOutput: stdout
allowCustomOutput: true
meshName: osm
useHTTPSIngress: false
envoyLogLevel: error
controllerLogLevel: trace
enforceSingleMesh: false
customLogAnalyticsWorkspace: true
fluentbitOutput: stdout
webhookConfigNamePrefix: osm-webhook

# Set deployJaeger to true to deploy a Jaeger cluster in the
Expand Down

0 comments on commit 5238514

Please sign in to comment.