Skip to content

Commit 1d24a75

Browse files
flandsMrAlias
andauthored
Add data collection configuration for Kubernetes (#147)
* Add data collection configuration for Kubernetes Also add language around Splunk Observability versus Platform * Address feedback * Address feedback * Update specification/configuration.md Co-authored-by: Tyler Yahn <[email protected]> * Update specification/configuration.md Co-authored-by: Tyler Yahn <[email protected]> * Update specification/configuration.md * Update specification/configuration.md * Address feedback * Address feedback Co-authored-by: Tyler Yahn <[email protected]>
1 parent 19cd66b commit 1d24a75

File tree

1 file changed

+77
-18
lines changed

1 file changed

+77
-18
lines changed

specification/configuration.md

Lines changed: 77 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ One or more configuration variables may be needed to properly configure GDI
66
repositories. Components that can be configured with environment variables MUST
77
support configuration of these variables using environment variables. Any
88
component that cannot be configured with environment variables MUST support
9-
configuration of these variables using an alternate method and that method MUST
10-
be defined in a section below (see the [Real User Monitoring Libraries
11-
section](#real-user-monitoring-libraries) as an example). Any component MAY
9+
configuration of these variables using an alternate method. Any component MAY
1210
support configuration of these variables by additional methods.
1311

1412
GDI repositories MUST adopt stable and SHOULD adopt experimental configuration
@@ -32,15 +30,18 @@ release. This change MAY result in a breaking change so caution should be
3230
exhibited when considering repository-specific configuration variables.
3331

3432
Splunk-specific configuration variables defined in the GDI specification MUST
35-
be prefixed with `SPLUNK_`. If a Splunk-specific configuration variable is
36-
declared as stable in the GDI specification and later the OpenTelemetry
37-
specification declares a similar variable as stable, the GDI specification
38-
MUST adopt the OpenTelemetry configuration variable and SHOULD mark the GDI
39-
specification configuration variable as deprecated by the next minor release.
40-
In addition to defining Splunk-specification configuration variables, the GDI
41-
specification MAY require specific OpenTelemetry configuration variables be
42-
supported. If it does, the GDI specification MAY require certain values be
43-
supported including a specific default value.
33+
be prefixed with `SPLUNK_`. Furthermore, configuration specific to Splunk
34+
Observability Cloud MUST be prefixed with `SPLUNK_OBSERVABILITY_` and to Splunk
35+
Enterprise or Splunk Cloud MUST be prefixed with `SPLUNK_PLATFORM_`. If a
36+
Splunk-specific configuration variable is declared as stable in the GDI
37+
specification and later the OpenTelemetry specification declares a similar
38+
variable as stable, the GDI specification MUST adopt the OpenTelemetry
39+
configuration variable and SHOULD mark the GDI specification configuration
40+
variable as deprecated by the next minor release. In addition to defining
41+
Splunk-specification configuration variables, the GDI specification MAY require
42+
specific OpenTelemetry configuration variables be supported. If it does, the
43+
GDI specification MAY require certain values be supported including a specific
44+
default value.
4445

4546
Whenever a configuration variable changes its name, a stable GDI repository
4647
(version >= 1.0) MUST support both old and new names until the next major
@@ -69,11 +70,11 @@ chooses what to install limiting the configuration options.
6970
It MUST be possible to configure a Data Collector instance using the following
7071
environment variables:
7172

72-
| Name (default value) | Description |
73-
| :-------------------: | :-----------------------------------: |
74-
| `SPLUNK_ACCESS_TOKEN` () | Access token added to exported data. [1][2] |
75-
| `SPLUNK_CONFIG` () | Configuration file to use. [1] |
76-
| `SPLUNK_REALM` () | Realm configured for the exporter endpoint. [1][2] |
73+
| Name (default value) | Description |
74+
| :-------------------: | :-----------------------------------: |
75+
| `SPLUNK_ACCESS_TOKEN` () | Access token added to exported data. [1][2] |
76+
| `SPLUNK_CONFIG` () | Configuration file to use. [1] |
77+
| `SPLUNK_REALM` () | Realm configured for the exporter endpoint. [1][2] |
7778

7879
- [1]: Either `SPLUNK_ACCESS_TOKEN` and `SPLUNK_REALM` MUST be defined or
7980
`SPLUNK_CONFIG` MUST be defined. If `SPLUNK_ACCESS_TOKEN` and `SPLUNK_REALM`
@@ -89,6 +90,64 @@ environment variables:
8990
If `SPLUNK_CONFIG` is defined then these options are not required but MAY be
9091
defined.
9192

93+
### Kubernetes Package Management Solutions
94+
95+
While Kubernetes supports container technology that can be configured using
96+
environment variables, package management solutions such as Helm charts and
97+
Operators require YAML-based configuration. As a result, Kubernetes package
98+
management solutions MUST support the YAML configuration options specified
99+
below.
100+
101+
> Any option description listed as REQUIRED means a value for the option MUST
102+
> be specified.
103+
104+
- `clusterName` () : [REQUIRED] Name of the cluster.
105+
- `cloudProvider` () : Where Kubernetes is deployed.
106+
- `distribution` () : Which distribution of Kubernetes is deployed.
107+
- `environment` () : Name of the environment; if not defined then skipped.
108+
- `agent` : Deployed as a DaemonSet.
109+
- `enabled` (`true`) : Whether agent is deployed.
110+
- `config` () : Updates configuration. Non-list options merged, list options override.
111+
- `gateway` : Deployed as a clustered Service and receives data from agent.
112+
- `enabled` (`false`) : Whether gateway is deployed.
113+
- `config` () : Updates configuration. Non-list options merged, list options override.
114+
- `clusterReceiver` : Deployed as a single replica deployment and collects Kubernetes API cluster and event telemetry.
115+
- `enabled` (`true`) : Whether k8sClusteReceiver is deployed. Ignored if `metricsEnabled` is `false`.
116+
- `config` () : Updates configuration. Non-list options merged, list options override.
117+
118+
In addition, at least one of the below configuration groups,
119+
`splunkObservability` or `splunkPlatform`, MUST be specified.
120+
121+
> Any option description listed as REQUIRED means a value for the option MUST
122+
> be specified in that section. Both `accessToken` and `token` values are
123+
> stored as Kubernetes secrets. The secret key names are specified after this
124+
> section. If Kubernetes secret keys are specified they will override the
125+
> values specified below. In short, `accessToken` and `token` are required only
126+
> if not specified in Kubernetes secrets.
127+
128+
- `splunkObservability`
129+
- `accessToken` () : [REQUIRED] Access token added to exported data.
130+
- `realm` () : [REQUIRED] Realm configured for the exporter endpoint.
131+
- `logsEnabled` (`false`) : Whether logs are collected and sent.
132+
- `metricsEnabled` (`true`) : Whether metrics are collected, received, and sent.
133+
- `tracesEnabled` (`true`) : Whether traces are received and sent.
134+
- `splunkPlatform`
135+
- `token` () : [REQUIRED] Token added to exported data.
136+
- `endpoint` () : [REQUIRED] Where to send exported data.
137+
- `logsEnabled` (`true`) : Whether logs are collected and sent.
138+
- `metricsEnabled` (`true`) : Whether metrics are collected, received, and sent.
139+
140+
Finally, the below Kubernetes secret configuration options MUST be
141+
supported:
142+
143+
- Splunk Observability
144+
- `splunk_observability_access_token`
145+
- Splunk Platform
146+
- `splunk_platform_hec_token`
147+
- `splunk_platform_hec_client_cert`
148+
- `splunk_platform_hec_client_key`
149+
- `splunk_platform_hec_ca_file`
150+
92151
## Instrumentation Libraries
93152

94153
**Status**: [Stable](../README.md#versioning-and-status-of-the-specification)
@@ -224,4 +283,4 @@ libraries based on OpenTelemetry, serverless MUST honour the following:
224283
225284
As there is no deployment phase in case of Serverless functions, if a required
226285
configuration property is missing, the serverless instrumentation library MUST
227-
log an error but MUST still execute.
286+
log an error but MUST still execute.

0 commit comments

Comments
 (0)