added repo
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
examples/
|
||||
# Ignore unittest
|
||||
tests/
|
||||
*/__snapshot__/*
|
||||
@@ -0,0 +1,12 @@
|
||||
# Collector Chart Contributing Guide
|
||||
|
||||
All changes to the chart require a bump to the version in `chart.yaml`. See the [Contributing Guide](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/CONTRIBUTING.md#versioning) for our versioning requirements.
|
||||
|
||||
Once the chart version is bumped, the examples must be regenerated. You can regenerate examples by running `make generate-examples CHARTS=opentelemetry-collector`.
|
||||
|
||||
## Bumping Default Collector Version
|
||||
|
||||
1. Increase the minor version of the chart by one and set the patch version to zero.
|
||||
2. Update the chart's `appVersion` to match the new collector version. This version will be used as the image tag by default.
|
||||
3. Review the corresponding release notes in [Collector Core](https://github.com/open-telemetry/opentelemetry-collector/releases), [Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases), and [Collector Releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases). If any changes affect the helm charts, adjust the helm chart accordingly.
|
||||
4. Run `make generate-examples CHARTS=opentelemetry-collector`.
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.153.0
|
||||
description: OpenTelemetry Collector Helm chart for Kubernetes
|
||||
home: https://opentelemetry.io/
|
||||
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
|
||||
maintainers:
|
||||
- name: dmitryax
|
||||
- name: jaronoff97
|
||||
- name: TylerHelmuth
|
||||
name: opentelemetry-collector
|
||||
sources:
|
||||
- https://github.com/open-telemetry/opentelemetry-collector
|
||||
- https://github.com/open-telemetry/opentelemetry-collector-contrib
|
||||
type: application
|
||||
version: 0.158.1
|
||||
@@ -0,0 +1,352 @@
|
||||
# OpenTelemetry Collector Helm Chart
|
||||
|
||||
The helm chart installs [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector)
|
||||
in kubernetes cluster.
|
||||
|
||||
## Meesho customizations (intentional fork)
|
||||
|
||||
This is an upstream chart with the following Meesho-specific additions (ported from
|
||||
`opentelemetry-collector-latest`). These are **not** upstream and will be lost on the
|
||||
next `helm pull` sync unless re-applied:
|
||||
|
||||
- `templates/external-secret.yaml` — optional `external-secrets.io/v1` `ExternalSecret`,
|
||||
gated on `.Values.externalSecret.enabled` (default `false`). The guard
|
||||
`{{- if and .Values.externalSecret .Values.externalSecret.enabled }}` plus the
|
||||
`externalSecret` default in `values.yaml` prevent the nil-pointer render error that
|
||||
affected consumers (e.g. the otel daemonset) that do not set the key. The key is also
|
||||
registered in `values.schema.json` (root `additionalProperties: false`).
|
||||
- `templates/resourcequota.yaml` — a `ResourceQuota` (`opentelemetry-critical-pods`)
|
||||
pinning capacity for `system-node-critical` / `system-cluster-critical` pods in the
|
||||
`opentelemetry` namespace.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.24+
|
||||
- Helm 4.0+
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
Add OpenTelemetry Helm repository:
|
||||
|
||||
```console
|
||||
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
|
||||
```
|
||||
|
||||
To install the chart with the release name my-opentelemetry-collector, run the following command:
|
||||
|
||||
```console
|
||||
helm install my-opentelemetry-collector open-telemetry/opentelemetry-collector --set mode=<value> --set image.repository="ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s" --set command.name="otelcol-k8s"
|
||||
```
|
||||
|
||||
Where the `mode` value needs to be set to one of `daemonset`, `deployment` or `statefulset`.
|
||||
|
||||
For an in-depth walk through getting started in Kubernetes using this helm chart, see [OpenTelemetry Kubernetes Getting Started](https://opentelemetry.io/docs/kubernetes/getting-started/).
|
||||
|
||||
## Upgrading
|
||||
|
||||
See [UPGRADING.md](UPGRADING.md).
|
||||
|
||||
## Security Considerations
|
||||
|
||||
OpenTelemetry Collector recommends to bind receivers' servers to addresses that limit connections to authorized users.
|
||||
For this reason, by default the chart binds all the Collector's endpoints to the pod's IP.
|
||||
|
||||
More info is available in the [Security Best Practices documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks)
|
||||
|
||||
Some care must be taken when using `hostNetwork: true`, as then OpenTelemetry Collector will listen on all the addresses in the host network namespace.
|
||||
|
||||
## Configuration
|
||||
|
||||
### Default configuration
|
||||
|
||||
By default this chart will deploy an OpenTelemetry Collector with three pipelines (logs, metrics and traces)
|
||||
and debug exporter enabled by default. The collector can be installed either as daemonset (agent), deployment or stateful set.
|
||||
|
||||
*Example*: Install collector as a deployment.
|
||||
|
||||
```yaml
|
||||
mode: deployment
|
||||
```
|
||||
|
||||
By default collector has the following receivers enabled:
|
||||
|
||||
- **metrics**: OTLP and prometheus. Prometheus is configured only for scraping collector's own metrics.
|
||||
- **traces**: OTLP, zipkin and jaeger (thrift and grpc).
|
||||
- **logs**: OTLP (to enable container logs, see [Configuration for Kubernetes container logs](#configuration-for-kubernetes-container-logs)).
|
||||
|
||||
### Basic Top Level Configuration
|
||||
|
||||
The Collector's configuration is set via the `config` section. Default components can be removed with `null`. Remember that lists in helm are not merged, so if you want to modify any default list you must specify all items, including any default items you want to keep.
|
||||
|
||||
*Example*: Disable metrics and logs pipelines and non-otlp receivers:
|
||||
|
||||
```yaml
|
||||
config:
|
||||
receivers:
|
||||
jaeger: null
|
||||
prometheus: null
|
||||
zipkin: null
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers:
|
||||
- otlp
|
||||
metrics: null
|
||||
logs: null
|
||||
```
|
||||
|
||||
The chart also provides several presets, detailed below, to help configure important Kubernetes components. For more details on each component, see [Kubernetes Collector Components](https://opentelemetry.io/docs/kubernetes/collector/components/).
|
||||
|
||||
### Configuration for Kubernetes Container Logs
|
||||
|
||||
The collector can be used to collect logs sent to standard output by Kubernetes containers.
|
||||
This feature is disabled by default. It has the following requirements:
|
||||
|
||||
- It needs agent collector to be deployed.
|
||||
- It requires the [Filelog receiver](https://opentelemetry.io/docs/kubernetes/collector/components/#filelog-receiver) to be included in the collector, such as [k8s](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) version of the collector image.
|
||||
|
||||
To enable this feature, set the `presets.logsCollection.enabled` property to `true`.
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
|
||||
presets:
|
||||
logsCollection:
|
||||
enabled: true
|
||||
includeCollectorLogs: true
|
||||
```
|
||||
|
||||
The way this feature works is it adds a `filelog` receiver on the `logs` pipeline. This receiver is preconfigured
|
||||
to read the files where Kubernetes container runtime writes all containers' console output to.
|
||||
|
||||
#### :warning: Warning: Risk of looping the exported logs back into the receiver, causing "log explosion"
|
||||
|
||||
#### Log collection for a subset of pods or containers
|
||||
|
||||
The `logsCollection` preset will by default ingest the logs of all kubernetes containers.
|
||||
This is achieved by using an include path of `/var/log/pods/*/*/*.log` for the `filelog`receiver.
|
||||
|
||||
To limit the import to a certain subset of pods or containers, the `filelog`
|
||||
receivers `include` list can be overwritten by supplying explicit configuration.
|
||||
|
||||
E.g. The following configuration would only import logs for pods within the namespace: `example-namespace`:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
|
||||
presets:
|
||||
logsCollection:
|
||||
enabled: true
|
||||
config:
|
||||
receivers:
|
||||
filelog:
|
||||
include:
|
||||
- /var/log/pods/example-namespace_*/*/*.log
|
||||
```
|
||||
|
||||
The container logs pipeline uses the `debug` exporter by default.
|
||||
Paired with the default `filelog` receiver that receives all containers' console output,
|
||||
it is easy to accidentally feed the exported logs back into the receiver.
|
||||
|
||||
Also note that using the `--verbosity=detailed` option for the `debug` exporter causes it to output
|
||||
multiple lines per single received log, which when looped, would amplify the logs exponentially.
|
||||
|
||||
To prevent the looping, the default configuration of the receiver excludes logs from the collector's containers.
|
||||
|
||||
If you want to include the collector's logs, make sure to replace the `debug` exporter
|
||||
with an exporter that does not send logs to collector's standard output.
|
||||
|
||||
Here's an example `values.yaml` file that replaces the default `debug` exporter on the `logs` pipeline
|
||||
with an `otlphttp` exporter that sends the container logs to `https://example.com:55681` endpoint.
|
||||
It also clears the `filelog` receiver's `exclude` property, for collector logs to be included in the pipeline.
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
|
||||
presets:
|
||||
logsCollection:
|
||||
enabled: true
|
||||
includeCollectorLogs: true
|
||||
|
||||
config:
|
||||
exporters:
|
||||
otlphttp:
|
||||
endpoint: https://example.com:55681
|
||||
service:
|
||||
pipelines:
|
||||
logs:
|
||||
exporters:
|
||||
- otlphttp
|
||||
```
|
||||
|
||||
### Configuration for Kubernetes Attributes Processor
|
||||
|
||||
The collector can be configured to add Kubernetes metadata, such as pod name and namespace name, as resource attributes to incoming logs, metrics and traces.
|
||||
|
||||
This feature is disabled by default. It has the following requirements:
|
||||
|
||||
- It requires the [Kubernetes Attributes processor](https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor) to be included in the collector, such as [k8s](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) version of the collector image.
|
||||
|
||||
#### :memo: Note: Changing or supplementing `k8sattributes` scopes
|
||||
|
||||
In order to minimize the collector's privileges, the [Kubernetes RBAC Rules](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) that are applied to the collector as part of this chart are the minimum required for the `presets.kubernetesAttributes` preset to work. If additional configuration scopes are desired outside of the preset you must apply the corresponding RBAC rules to grant the collector access.
|
||||
|
||||
To enable this feature, set the `presets.kubernetesAttributes.enabled` property to `true`.
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
presets:
|
||||
kubernetesAttributes:
|
||||
enabled: true
|
||||
# You can also configure the preset to add all of the associated pod's labels and annotations to you telemetry.
|
||||
# The label/annotation name will become the resource attribute's key.
|
||||
extractAllPodLabels: true
|
||||
extractAllPodAnnotations: true
|
||||
```
|
||||
|
||||
### Configuration for Annotation-Based Discovery
|
||||
|
||||
The collector can be configured to automatically discover and collect telemetry from pods based on annotations. For logs specifically the feature can be used as a drop-in replacement for the `logsCollection` preset, allowing for more selective collection of logs and additional parsing capabilities.
|
||||
|
||||
> [!WARNING] > `annotationDiscovery.logs` and `logsCollection` are mutually exclusive.
|
||||
|
||||
`presets.annotationDiscovery.logs.enabled: true`: Collects logs only from all pods by-default, and allows to define additional configuration through annotations. Log collection from specific Pods/containers, can be disabled by using the proper annotation.
|
||||
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
annotationDiscovery:
|
||||
logs:
|
||||
enabled: true
|
||||
metrics:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
#### How Annotation-Based Discovery Works
|
||||
|
||||
When annotation-based discovery is enabled, the collector will:
|
||||
|
||||
1. **Discover Pods**: Use the Receiver Creator receiver to watch for pods with specific annotations
|
||||
2. **Generate Receiver Configurations**: Automatically generate receiver configuration
|
||||
|
||||
**Default Behavior**: When `presets.annotationDiscovery.logs.enabled` is `true`, the collector will collect logs from all containers by default, unless a pod explicitly opts out using the `io.opentelemetry.discovery.logs/enabled: "false"` annotation.
|
||||
|
||||
This approach provides the same functionality as `logsCollection` but with fine-grained control over which pods are monitored, making it ideal for environments where you want to selectively collect telemetry from specific applications or services.
|
||||
|
||||
For more details and configuration options, see the [Receiver Creator](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/receivercreator/README.md#generate-receiver-configurations-from-provided-hints) documentation.
|
||||
|
||||
#### :memo: Note: RBAC Permissions
|
||||
|
||||
When annotation-based discovery is enabled, the chart automatically creates the necessary RBAC rules to allow the collector to list pods in the cluster. This is required for the Receiver Creator receiver to discover pods with the relevant annotations.
|
||||
|
||||
### Configuration for Retrieving Kubelet Metrics
|
||||
|
||||
The collector can be configured to collect node, pod, and container metrics from the API server on a kubelet.
|
||||
|
||||
This feature is disabled by default. It has the following requirements:
|
||||
|
||||
- It requires the [Kubeletstats receiver](https://opentelemetry.io/docs/kubernetes/collector/components/#kubeletstats-receiver) to be included in the collector, such as [k8s](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) version of the collector image.
|
||||
|
||||
To enable this feature, set the `presets.kubeletMetrics.enabled` property to `true`.
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
presets:
|
||||
kubeletMetrics:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
### Configuration for Kubernetes Cluster Metrics
|
||||
|
||||
The collector can be configured to collects cluster-level metrics from the Kubernetes API server. A single instance of this receiver can be used to monitor a cluster.
|
||||
|
||||
This feature is disabled by default. It has the following requirements:
|
||||
|
||||
- It requires the [Kubernetes Cluster receiver](https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-cluster-receiver) to be included in the collector, such as [k8s](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) version of the collector image.
|
||||
- It requires statefulset or deployment mode with a single replica.
|
||||
|
||||
To enable this feature, set the `presets.clusterMetrics.enabled` property to `true`.
|
||||
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: deployment
|
||||
replicaCount: 1
|
||||
presets:
|
||||
clusterMetrics:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
### Configuration for Retrieving Kubernetes Events
|
||||
|
||||
The collector can be configured to collect Kubernetes events.
|
||||
|
||||
This feature is disabled by default. It has the following requirements:
|
||||
|
||||
- It requires [Kubernetes Objects receiver](https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-objects-receiver) to be included in the collector, such as [k8s](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) version of the collector image.
|
||||
|
||||
To enable this feature, set the `presets.kubernetesEvents.enabled` property to `true`.
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: deployment
|
||||
replicaCount: 1
|
||||
presets:
|
||||
kubernetesEvents:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
### Configuration for Host Metrics
|
||||
|
||||
The collector can be configured to collect host metrics for Kubernetes nodes.
|
||||
|
||||
This feature is disabled by default. It has the following requirements:
|
||||
|
||||
- It requires [Host Metrics receiver](https://opentelemetry.io/docs/kubernetes/collector/components/#host-metrics-receiver) to be included in the collector, such as [k8s](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) version of the collector image.
|
||||
|
||||
To enable this feature, set the `presets.hostMetrics.enabled` property to `true`.
|
||||
Here is an example `values.yaml`:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
presets:
|
||||
hostMetrics:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
## CRDs
|
||||
|
||||
At this time, Prometheus CRDs are supported but other CRDs are not.
|
||||
|
||||
### Service Account Configuration
|
||||
|
||||
The chart allows you to control the `automountServiceAccountToken` setting for the collector pods. This can be useful for security purposes when you want to prevent automatic mounting of the service account token.
|
||||
|
||||
*Example*: Disable automatic mounting of service account token:
|
||||
|
||||
```yaml
|
||||
serviceAccount:
|
||||
create: true
|
||||
automountServiceAccountToken: false
|
||||
```
|
||||
|
||||
By default, `automountServiceAccountToken` is set to `true` (Kubernetes default behavior). When set to `false`, the service account token will not be automatically mounted into the collector pods.
|
||||
|
||||
### Other configuration options
|
||||
|
||||
The [values.yaml](./values.yaml) file contains information about all other configuration
|
||||
options for this chart.
|
||||
|
||||
For more examples see [Examples](examples).
|
||||
@@ -0,0 +1,433 @@
|
||||
# Upgrade guidelines
|
||||
|
||||
These upgrade guidelines only contain instructions for version upgrades which require manual modifications on the user's side.
|
||||
If the version you want to upgrade to is not listed here, then there is nothing to do for you.
|
||||
Just upgrade and enjoy.
|
||||
|
||||
## 0.157.0 to 0.157.1
|
||||
|
||||
The OpenTelemetry Collector renamed the `k8sattributes` processor to `k8s_attributes` in v0.146.0. The old name still works as an alias but is deprecated.
|
||||
|
||||
If your `values.yaml` references `k8sattributes` in `config.processors` or in any pipeline processor list, you will see a deprecation warning during `helm install` / `helm upgrade`. Please rename all occurrences of `k8sattributes` to `k8s_attributes` in your `values.yaml`. Support for the old name will be removed in a future chart release.
|
||||
|
||||
## 0.121.0 to 0.122.0
|
||||
|
||||
In the v0.123.1 Collector release we stopped pushing images to Dockerhub due to how their new rate limit changes affected our CI. If you're using `otel/opentelemetry-collector-k8s` for the image you should switch to `ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s`. See https://github.com/open-telemetry/community/issues/2641 for more details.
|
||||
|
||||
## 0.110.0 to 0.110.1 or 0.110.2
|
||||
|
||||
We broke the selector labels in `0.110.0`, which causes `helm upgrades` to fail. Do not attempt to upgrade from `0.110.0` to either `0.110.1` or `0.110.2`. Go straight to `0.110.3` instead.
|
||||
|
||||
## 0.97.2 to 0.98.0
|
||||
|
||||
> [!WARNING]
|
||||
> Critical content demanding immediate user attention due to potential risks.
|
||||
|
||||
The deprecated memory ballast extension has been removed from the default config. If you depend on this component you must manually configure `config.extensions` and `config.service.extensions` to include the memory ballast extension. Setting `useGOMEMLIMIT` to `false` will no longer keep the memory ballast extension in the rendered collector config.
|
||||
|
||||
## 0.88.0 to 0.89.0
|
||||
|
||||
> [!WARNING]
|
||||
> Critical content demanding immediate user attention due to potential risks.
|
||||
|
||||
As part of working towards using the [OpenTelemetry Collector Kubernetes Distro](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s) by default, the chart now requires users to explicitly set an image repository. If you are already explicitly setting an image repository this breaking change does not affect you.
|
||||
|
||||
If you are using a OpenTelemetry Community distribution of the Collector we recommend you use `otel/opentelemetry-collector-k8s`, but carefully review the [components included in this distribution](https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/distributions/otelcol-k8s/manifest.yaml) to make sure it includes all the components you use in your configuration. In the future this distribution will become the default image used for the chart.
|
||||
|
||||
You can use the OpenTelemetry Collector Kubernetes Distro by adding these lines to your values.yaml:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: "otel/opentelemetry-collector-k8s"
|
||||
```
|
||||
|
||||
If you want to stick with using the Contrib distribution, add these lines to your values.yaml:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: "otel/opentelemetry-collector-contrib"
|
||||
```
|
||||
|
||||
For more details see [#1135](https://github.com/open-telemetry/opentelemetry-helm-charts/issues/1135).
|
||||
|
||||
## 0.84.0 to 0.85.0
|
||||
|
||||
The `loggingexporter` has been removed from the default configuration. Use the `debugexporter` instead.
|
||||
|
||||
## 0.78.2 to 0.78.3
|
||||
|
||||
[Update Health Check Extension's endpoints to use Pod IP Instead of 0.0.0.0](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/1012)
|
||||
|
||||
The [Collector's security guidelines were updated](https://github.com/open-telemetry/opentelemetry-collector/pull/6959) to include containerized environments when discussing safeguards against denial of service attacks.
|
||||
To be in compliance with the Collector's security best practices the chart has been updated to use the Collector's pod IP in place of `0.0.0.0`.
|
||||
|
||||
The chart will continue to allow complete configuration of the Collector via the `config` field in the values.yaml. If pod IP does not suite your needs you can use `config` to set something different.
|
||||
|
||||
See [Security Best Practices docummentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks) for more details.
|
||||
|
||||
## 0.75.1 to 0.76.0
|
||||
|
||||
Enable the `useGOMEMLIMIT` feature flag by default. This means by default the chart now does not use the Memory Ballast Extension and any custom configuraiton applied to the Memory Ballast Extension is ignored.
|
||||
|
||||
**If you're still interested in using the Memory Ballast Extension set this back to false.**
|
||||
|
||||
## 0.69.3 to 0.70.0
|
||||
|
||||
The following deprecated fields have been removed. Please use the new values:
|
||||
|
||||
- `extraConfigMapMounts` -> `extraVolumes`
|
||||
- `extraHostPathMounts` -> `extraVolumes`
|
||||
- `secretMounts` -> `extraVolumes`
|
||||
- `containerLogs` -> `presets.logsCollection`
|
||||
|
||||
## 0.69.0 to 0.69.1 & 0.69.2
|
||||
|
||||
The `loggingexporter` was replaced with the `debugexporter`. This ended up being an accidental breaking change for any user that depended on the default logging exporter config when explicitly listing the logging exporter in an exporter list.
|
||||
|
||||
When using versions `0.69.1` or `0.69.2` you should explicitly list the debugging exporter instead of the logging exporter. You other option is to skip these version and use `0.69.3` or newer, which includes the logging exporter configuration.
|
||||
|
||||
**The logging exporter will be removed in a future version.** We highly recommend switching to the debug exporter.
|
||||
|
||||
## 0.67 to 0.68
|
||||
|
||||
The `preset.kubernetesEvents` preset now excludes `DELETED` watch types so that an log is not ingested when Kubernetes deletes an event.
|
||||
The intention behind this change is to cleanup the data ingested by the preset as the `DELETED` updated for a Kubernetes Events is
|
||||
uninteresting. If you want to keep ingesting `DELETED` updates for Kubernetes Events you will need to configure the `k8sobjectsreceiver` manually.
|
||||
|
||||
## 0.62 to 0.63
|
||||
|
||||
The `kubernetesAttributes` preset now respects order of processors in logs, metrics and traces pipelines.
|
||||
This implicitly might break your pipelines if you relied on having the `k8sAttributes` processor rendered as the first processor but also explicitly listed it in the signal's pipeline somewhere else.
|
||||
|
||||
## 0.55.2 to 0.56
|
||||
|
||||
The `tpl` function has been added to references of pod labels and ingress hosts. This adds the ability to add some reusability in
|
||||
charts values through referencing global values. If you are currently using any `{{ }}` syntax in pod labels or ingress hosts it will now be rendered. To escape existing instances of {{ }}, use {{` <original content> `}}.
|
||||
|
||||
```yaml
|
||||
global:
|
||||
region: us-east-1
|
||||
environment: stage
|
||||
|
||||
# Tests `tpl` function reference used in pod labels and
|
||||
# ingress.hosts[*]
|
||||
podLabels:
|
||||
environment: "{{ .Values.global.environment }}"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- host: "otlp-collector-{{ .Values.global.region }}-{{ .Values.global.environment }}-example.dev"
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
port: 4318
|
||||
```
|
||||
|
||||
Note that only global Helm values can be referenced as the Helm Chart schema currently does not allow `additionalValues`.
|
||||
|
||||
## 0.55.0 to 0.55.1
|
||||
|
||||
As of v0.55.1 Collector chart use `${env:ENV}` style syntax when getting environment variables and that $`{env:ENV}` syntax is not supported before collector 0.71. If you upgrade collector chart to v0.55.1, you need to make sure your collector version is after than 0.71 (default is v0.76.1).
|
||||
|
||||
## 0.53.1 to 0.54.0
|
||||
|
||||
As of v0.54.0 Collector chart, the default resource limits are removed. If you want to keep old values you can use the following configuration:
|
||||
|
||||
```
|
||||
resources:
|
||||
limits:
|
||||
# CPU units are in fractions of 1000; memory in powers of 2
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
```
|
||||
|
||||
See [the 644 issue](https://github.com/open-telemetry/opentelemetry-helm-charts/issues/644) for more information.
|
||||
|
||||
## 0.46.0 to 0.47.0
|
||||
|
||||
[Update Collector Endpoints to use Pod IP Instead of 0.0.0.0](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/603)
|
||||
|
||||
The [Collector's security guidelines were updated](https://github.com/open-telemetry/opentelemetry-collector/pull/6959) to include containerized environments when discussing safeguards against denial of service attacks.
|
||||
To be in compliance with the Collector's security best practices the chart has been updated to use the Collector's pod IP in place of `0.0.0.0`.
|
||||
|
||||
The chart will continue to allow complete configuration of the Collector via the `config` field in the values.yaml. If pod IP does not suite your needs you can use `config` to set something different.
|
||||
|
||||
See [Security Best Practices docummentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks) for more details.
|
||||
|
||||
The new default of binding to the pod IP, rather than `0.0.0.0`, will cause `kubectl port-forward` to fail. If port-forwarding is desired, the following `value.yaml` snippet will allow the Collector bind to `127.0.0.1` inside the pod, in addition to the pod's IP:
|
||||
|
||||
```yaml
|
||||
config:
|
||||
receivers:
|
||||
jaeger/local:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 127.0.0.1:14250
|
||||
thrift_compact:
|
||||
endpoint: 127.0.0.1:6831
|
||||
thrift_http:
|
||||
endpoint: 127.0.0.1:14268
|
||||
otlp/local:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 127.0.0.1:4317
|
||||
http:
|
||||
endpoint: 127.0.0.1:4318
|
||||
zipkin/local:
|
||||
endpoint: 127.0.0.1:9411
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers:
|
||||
- otlp
|
||||
- otlp/local
|
||||
- jaeger
|
||||
- jaeger/local
|
||||
- zipkin
|
||||
- zipkin/local
|
||||
```
|
||||
|
||||
## 0.40.7 to 0.41.0
|
||||
|
||||
[Require Kubernetes version 1.23 or later](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/541)
|
||||
|
||||
If you enable use of a _HorizontalPodAutoscaler_ for the collector when running in the "deployment" mode by way of `.Values.autoscaling.enabled`, the manifest now uses the "autoscaling/v2" API group version, which [is available only as recently as Kubernetes version 1.23](https://kubernetes.io/blog/2021/12/07/kubernetes-1-23-release-announcement/#horizontalpodautoscaler-v2-graduates-to-ga). As [all previous versions of this API group are deprecated and removed as of Kubernetes version 1.26](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#horizontalpodautoscaler-v126), we don't offer support for Kubernetes versions older than 1.23.
|
||||
|
||||
## 0.34.0 to 0.34.0
|
||||
|
||||
[config supports templating](TBD)
|
||||
|
||||
The chart now supports templating in `.Values.config`. If you are currently using any `{{ }}` syntax in `.Values.yaml` it will now be rendered. To escape existing instances of `{{ }}`, use ``` {{` <original content> `}} ```. For example, `{{ REDACTED_EMAIL }}` becomes ``` {{` {{ REDACTED_EMAIL }} `}} ```.
|
||||
|
||||
## 0.28.0 to 0.29.0
|
||||
|
||||
[Reduce requested resources](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/273)
|
||||
|
||||
Resource `limits` have been reduced. Upgrades/installs of chart 0.29.0 will now use fewer resources. In order to set the resources back to what they were, you will need to override the `resources` section in the `values.yaml`.
|
||||
|
||||
*Example*:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 2Gi
|
||||
```
|
||||
|
||||
## 0.23.1 to 0.24.0
|
||||
|
||||
[Remove containerLogs in favor of presets.logsCollection]()
|
||||
|
||||
The ability to enable logs collection from the collector has been moved from `containerLogs.enabled` to `presets.logsCollection.enabled`. If you are currently using `containerLogs.enabled`, you should instead use the preset:
|
||||
|
||||
```yaml
|
||||
presets:
|
||||
logsCollection:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
If you are using `containerLogs.enabled` and also enabling collection of the collector logs you can use `includeCollectorLogs`
|
||||
|
||||
```yaml
|
||||
presets:
|
||||
logsCollection:
|
||||
enabled: true
|
||||
includeCollectorLogs: true
|
||||
```
|
||||
|
||||
You no longer need to update `config.service.pipelines.logs` to include the filelog receiver yourself as the preset will automatically update the logs pipeline to include the filelog receiver.
|
||||
|
||||
The filelog's preset configuration can modified by `config.receivers`, but preset configuration cannot be removed. If you need to remove any filelog receiver configuration generated by the preset you should not use the preset. Instead, configure the filelog receiver manually in `config.receivers` and set any other necessary fields in the values.yaml to modify k8s as needed.
|
||||
|
||||
See the [daemonset-collector-logs example](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector/examples/daemonset-collector-logs) to see an example of the preset in action.
|
||||
|
||||
## 0.18.0 to 0.19.0
|
||||
|
||||
[Remove agentCollector and standaloneCollector settings](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/216)
|
||||
|
||||
The `agentCollector` and `standaloneCollector` config sections have been removed. Upgrades/installs of chart 0.19.0 will fail if `agentCollector` or `standaloneCollector` are in the values.yaml. See the [Migrate to mode](#migrate-to-mode) steps for instructions on how to replace `agentCollector` and `standaloneCollector` with `mode`.
|
||||
|
||||
## 0.13.0 to 0.14.0
|
||||
|
||||
[Remove two-deployment mode](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/159)
|
||||
|
||||
The ability to install both the agent and standalone collectors simultaneous with the chart has been removed. Installs/upgrades where both `.Values.agentCollector.enabled` and `.Values.standloneCollector.enables` are true will fail. `agentCollector` and `standloneCollector` have also be deprecated, but backward compatibility has been maintained.
|
||||
|
||||
### To run both a deployment and daemonset
|
||||
|
||||
Install a deployment version of the collector. This is done by setting `.Values.mode` to `deployment`
|
||||
|
||||
```yaml
|
||||
mode: deployment
|
||||
```
|
||||
|
||||
Next, install an daemonset version of the collector that is configured to send traffic to the previously installed deployment. This is done by setting `.Values.mode` to `daemonset` and updating `.Values.config` so that data is exported to the deployment.
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
|
||||
config:
|
||||
exporters:
|
||||
otlp:
|
||||
endpoint: example-opentelemetry-collector:4317
|
||||
tls:
|
||||
insecure: true
|
||||
service:
|
||||
pipelines:
|
||||
logs:
|
||||
exporters:
|
||||
- otlp
|
||||
- logging
|
||||
metrics:
|
||||
exporters:
|
||||
- otlp
|
||||
- logging
|
||||
traces:
|
||||
exporters:
|
||||
- otlp
|
||||
- logging
|
||||
```
|
||||
|
||||
See the [daemonset-and-deployment](examples/daemonset-and-deployment) example to see the rendered config.
|
||||
|
||||
### Migrate to `mode`:
|
||||
|
||||
The `agentCollector` and `standaloneCollector` sections in values.yaml have been deprecated. Instead there is a new field, `mode`, that determines if the collector is being installed as a daemonset or deployment.
|
||||
|
||||
```yaml
|
||||
# Valid values are "daemonset" and "deployment".
|
||||
# If set, agentCollector and standaloneCollector are ignored.
|
||||
mode: <daemonset|deployment>
|
||||
```
|
||||
|
||||
The following fields have also been added to the root-level to replace the depracated `agentCollector` and `standaloneCollector` settings.
|
||||
|
||||
```yaml
|
||||
containerLogs:
|
||||
enabled: false
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 2Gi
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podLabels: {}
|
||||
|
||||
# Host networking requested for this pod. Use the host's network namespace.
|
||||
hostNetwork: false
|
||||
|
||||
# only used with deployment mode
|
||||
replicaCount: 1
|
||||
|
||||
annotations: {}
|
||||
```
|
||||
|
||||
When using `mode`, these settings should be used instead of their counterparts in `agentCollector` and `standaloneCollector`.
|
||||
|
||||
Set `mode` to `daemonset` if `agentCollector` was being used. Move all `agentCollector` settings to the corresponding root-level setting. If `agentCollector.configOverride` was being used, merge the settings with `.Values.config`.
|
||||
|
||||
Example agentCollector values.yaml:
|
||||
|
||||
```yaml
|
||||
agentCollector:
|
||||
resources:
|
||||
limits:
|
||||
cpu: 3
|
||||
memory: 6Gi
|
||||
configOverride:
|
||||
receivers:
|
||||
hostmetrics:
|
||||
scrapers:
|
||||
cpu:
|
||||
disk:
|
||||
filesystem:
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp, prometheus, hostmetrics]
|
||||
```
|
||||
|
||||
Example mode values.yaml:
|
||||
|
||||
```yaml
|
||||
mode: daemonset
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 3
|
||||
memory: 6Gi
|
||||
|
||||
config:
|
||||
receivers:
|
||||
hostmetrics:
|
||||
scrapers:
|
||||
cpu:
|
||||
disk:
|
||||
filesystem:
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp, prometheus, hostmetrics]
|
||||
```
|
||||
|
||||
Set `mode` to `deployment` if `standaloneCollector` was being used. Move all `standaloneCollector` settings to the corresponding root-level setting. If `standaloneCollector.configOverride` was being used, merge the settings with `.Values.config`.
|
||||
|
||||
Example standaloneCollector values.yaml:
|
||||
|
||||
```yaml
|
||||
standaloneCollector:
|
||||
enabled: true
|
||||
replicaCount: 2
|
||||
configOverride:
|
||||
receivers:
|
||||
podman_stats:
|
||||
endpoint: unix://run/podman/podman.sock
|
||||
timeout: 10s
|
||||
collection_interval: 10s
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp, prometheus, podman_stats]
|
||||
```
|
||||
|
||||
Example mode values.yaml:
|
||||
|
||||
```yaml
|
||||
mode: deployment
|
||||
|
||||
replicaCount: 2
|
||||
|
||||
config:
|
||||
receivers:
|
||||
receivers:
|
||||
podman_stats:
|
||||
endpoint: unix://run/podman/podman.sock
|
||||
timeout: 10s
|
||||
collection_interval: 10s
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp, prometheus, podman_stats]
|
||||
```
|
||||
|
||||
Default configuration in `.Values.config` can now be removed with `null`. When changing a pipeline, you must explicitly list all the components that are in the pipeline, including any default components.
|
||||
|
||||
*Example*: Disable metrics and logging pipelines and non-otlp receivers:
|
||||
|
||||
```yaml
|
||||
config:
|
||||
receivers:
|
||||
jaeger: null
|
||||
prometheus: null
|
||||
zipkin: null
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers:
|
||||
- otlp
|
||||
metrics: null
|
||||
logs: null
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
useGOMEMLIMIT: true
|
||||
@@ -0,0 +1,27 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
clusterRole:
|
||||
create: true
|
||||
name: "testing-clusterrole"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- 'pods'
|
||||
- 'nodes'
|
||||
verbs:
|
||||
- 'get'
|
||||
- 'list'
|
||||
- 'watch'
|
||||
clusterRoleBinding:
|
||||
name: "testing-clusterrolebinding"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,26 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
config:
|
||||
receivers:
|
||||
jaeger: null
|
||||
otlp: null
|
||||
zipkin: null
|
||||
hostmetrics:
|
||||
scrapers:
|
||||
cpu:
|
||||
disk:
|
||||
filesystem:
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers:
|
||||
- prometheus
|
||||
- hostmetrics
|
||||
traces: null
|
||||
logs: null
|
||||
@@ -0,0 +1,12 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,33 @@
|
||||
global:
|
||||
test: templated-value
|
||||
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
# Tests `tpl` function reference used in pod labels and
|
||||
# ingress.hosts[*]
|
||||
podLabels:
|
||||
testLabel: "{{ .Values.global.test }}"
|
||||
|
||||
additionalLabels:
|
||||
testLabel: "{{ .Values.global.test }}"
|
||||
someLabel: "someValue"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- host: "{{ .Values.global.test }}"
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
port: 4318
|
||||
@@ -0,0 +1,21 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
ports:
|
||||
jaeger-compact:
|
||||
enabled: false
|
||||
jaeger-thrift:
|
||||
enabled: false
|
||||
jaeger-grpc:
|
||||
enabled: false
|
||||
zipkin:
|
||||
enabled: false
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,15 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
behavior: {}
|
||||
targetCPUUtilizationPercentage: 80
|
||||
targetMemoryUtilizationPercentage: 80
|
||||
@@ -0,0 +1,15 @@
|
||||
mode: statefulset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
behavior: {}
|
||||
targetCPUUtilizationPercentage: 80
|
||||
targetMemoryUtilizationPercentage: 80
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
internalTelemetryViaOTLP:
|
||||
endpoint: "http://localhost:4318"
|
||||
headers:
|
||||
- name: "x-opentelemetry-customer"
|
||||
value: "a value"
|
||||
traces:
|
||||
enabled: true
|
||||
metrics:
|
||||
enabled: true
|
||||
logs:
|
||||
enabled: true
|
||||
@@ -0,0 +1,49 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
|
||||
ingressClassName: nginx
|
||||
annotations:
|
||||
test.io/collector: default
|
||||
hosts:
|
||||
- host: defaultcollector.example.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
port: 4318
|
||||
|
||||
additionalIngresses:
|
||||
- name: additional-basic
|
||||
hosts:
|
||||
- host: additional-basic.example.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
port: 4318
|
||||
|
||||
- name: additional-advanced
|
||||
ingressClassName: nginx
|
||||
annotations:
|
||||
test.io/ingress: additional-advanced
|
||||
hosts:
|
||||
- host: additional-advanced.example.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Exact
|
||||
port: 4318
|
||||
tls:
|
||||
- secretName: somesecret
|
||||
hosts:
|
||||
- additional-advanced.example.com
|
||||
@@ -0,0 +1,37 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
networkPolicy:
|
||||
enabled: true
|
||||
|
||||
allowIngressFrom:
|
||||
- namespaceSelector: {}
|
||||
- ipBlock:
|
||||
cidr: 127.0.0.1/32
|
||||
|
||||
extraIngressRules:
|
||||
- ports:
|
||||
- port: metrics
|
||||
protocol: TCP
|
||||
from:
|
||||
- ipBlock:
|
||||
cidr: 127.0.0.1/32
|
||||
|
||||
egressRules:
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: jaeger
|
||||
ports:
|
||||
- port: 4317
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,15 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
networkPolicy:
|
||||
enabled: true
|
||||
@@ -0,0 +1,15 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
config:
|
||||
service:
|
||||
telemetry:
|
||||
metrics:
|
||||
address: ${env:MY_POD_IP}:8888
|
||||
@@ -0,0 +1,17 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
config:
|
||||
service:
|
||||
telemetry:
|
||||
metrics:
|
||||
address: 0.0.0.0:8888
|
||||
resource:
|
||||
"k8s.namespace.name": "default"
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
annotationDiscovery:
|
||||
logs:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
clusterMetrics:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
clusterMetrics:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,16 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
hostMetrics:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,16 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
kubernetesEvents:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,16 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
kubeletMetrics:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
kubernetesAttributes:
|
||||
enabled: true
|
||||
|
||||
config:
|
||||
processors:
|
||||
k8sattributes:
|
||||
passthrough: false
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
kubernetesAttributes:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
kubernetesObjects:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
mode: deployment
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
kubernetesObjects:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,17 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
logsCollection:
|
||||
enabled: true
|
||||
includeCollectorLogs: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler"
|
||||
|
||||
command:
|
||||
name: "otelcol-ebpf-profiler"
|
||||
extraArgs: ["--feature-gates=+service.profilesSupport"]
|
||||
|
||||
presets:
|
||||
profiling:
|
||||
enabled: true
|
||||
kubernetesAttributes:
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
|
||||
alternateConfig:
|
||||
receivers:
|
||||
profiling: {}
|
||||
exporters:
|
||||
debug: {}
|
||||
extensions:
|
||||
health_check:
|
||||
endpoint: ${env:MY_POD_IP}:13133
|
||||
service:
|
||||
extensions:
|
||||
- health_check
|
||||
pipelines:
|
||||
profiles:
|
||||
receivers:
|
||||
- profiling
|
||||
exporters:
|
||||
- debug
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
presets:
|
||||
resourceDetection:
|
||||
enabled: true
|
||||
@@ -0,0 +1,43 @@
|
||||
mode: daemonset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
config:
|
||||
extensions:
|
||||
health_check:
|
||||
endpoint: ${env:MY_POD_IP}:8989
|
||||
path: /healthz
|
||||
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 2
|
||||
terminationGracePeriodSeconds: 40
|
||||
httpGet:
|
||||
port: 8989
|
||||
path: /healthz
|
||||
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
successThreshold: 2
|
||||
failureThreshold: 2
|
||||
httpGet:
|
||||
port: 8989
|
||||
path: /healthz
|
||||
|
||||
startupProbe:
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 10
|
||||
terminationGracePeriodSeconds: 40
|
||||
httpGet:
|
||||
port: 8989
|
||||
path: /healthz
|
||||
@@ -0,0 +1,13 @@
|
||||
mode: statefulset
|
||||
|
||||
image:
|
||||
repository: "ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s"
|
||||
|
||||
command:
|
||||
name: "otelcol-k8s"
|
||||
|
||||
replicaCount: 2
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200M
|
||||
@@ -0,0 +1,87 @@
|
||||
{{- if not .Values.image.repository }}
|
||||
{{ fail "[ERROR] 'image.repository' must be set. See https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/UPGRADING.md for instructions." }}
|
||||
{{ end }}
|
||||
|
||||
{{- if .Values.presets.profiling.enabled }}
|
||||
{{- $repo := .Values.image.repository -}}
|
||||
{{- $unsupported := include "opentelemetry-collector.profilingUnsupportedImages" . | fromYamlArray -}}
|
||||
{{- range $distro := $unsupported }}
|
||||
{{- if or (eq $repo $distro) (hasSuffix (printf "/%s" $distro) $repo) }}
|
||||
{{ fail "[ERROR] presets.profiling is enabled but image.repository is a community distribution that does not include the profiling receiver. Use the opentelemetry-collector-ebpf-profiler distribution or a custom distribution that includes the receiver." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq (toString .Values.podSecurityContext.runAsNonRoot) "true" }}
|
||||
{{ fail "[ERROR] presets.profiling is enabled but podSecurityContext.runAsNonRoot is true. The eBPF profiler requires runAsUser: 0 to run. Set podSecurityContext.runAsNonRoot to false or remove it." }}
|
||||
{{ end }}
|
||||
{{- if .Values.securityContext }}
|
||||
[WARNING] presets.profiling is enabled with a custom securityContext. The preset will NOT inject runAsUser: 0 and privileged: true automatically; required by the eBPF profiler to function. Ensure your securityContext sets runAsUser: 0 plus either privileged: true, or right capabilities otherwise.
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- if and (not (eq .Values.mode "daemonset")) (not (eq .Values.mode "deployment")) (not (eq .Values.mode "statefulset")) }}
|
||||
{{ fail "[ERROR] 'mode' must be set. See https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/UPGRADING.md for instructions." }}
|
||||
{{ end }}
|
||||
|
||||
{{- if and (eq .Values.dnsPolicy "None") (not .Values.dnsConfig) }}
|
||||
{{- fail "[ERROR] dnsConfig should be provided when dnsPolicy is None" }}
|
||||
{{ end }}
|
||||
|
||||
{{- if .Values.presets.clusterMetrics.enabled }}
|
||||
{{- if gt (int .Values.replicaCount) 1 }}
|
||||
{{- fail "Cluster Metrics preset is not suitable for replicaCount greater than one. Please change replica count to one." }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* validate extensions must include health_check */}}
|
||||
{{- if and (not (has "health_check" .Values.config.service.extensions)) (not (has "healthcheckv2" .Values.config.service.extensions)) }}
|
||||
{{ fail "[ERROR] The opentelemetry-collector chart requires that the health_check extension or the healthcheckv2 extension to be included in the extension list." }}
|
||||
{{- end}}
|
||||
|
||||
{{- if not .Values.configMap.create }}
|
||||
[WARNING] "configMap" wil not be created and "config" will not take effect.
|
||||
{{ end }}
|
||||
|
||||
{{- if and .Values.configMap.create .Values.configMap.existingName }}
|
||||
{{ fail "[ERROR] Cannot set configMap.existingName when configMap.create is true" }}
|
||||
{{ end }}
|
||||
|
||||
{{- if and .Values.configMap.create .Values.configMap.existingPath }}
|
||||
{{ fail "[ERROR] Cannot set configMap.existingPath when configMap.create is true" }}
|
||||
{{ end }}
|
||||
|
||||
{{- if not .Values.resources }}
|
||||
[WARNING] No resource limits or requests were set. Consider setting resource requests and limits for your collector(s) via the `resources` field.
|
||||
{{ end }}
|
||||
|
||||
{{- if and (eq .Values.mode "daemonset") (eq .Values.service.internalTrafficPolicy "Cluster") }}
|
||||
[WARNING] Setting internalTrafficPolicy to 'Cluster' on Daemonset is not recommended. Consider using 'Local' instead.
|
||||
{{ end }}
|
||||
|
||||
{{- if and (.Values.useGOMEMLIMIT) (not ((((.Values.resources).limits).memory))) }}
|
||||
[WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied so the GOMEMLIMIT env var could not be added. Solve this problem by setting resources.limits.memory or disabling useGOMEMLIMIT
|
||||
{{ end }}
|
||||
|
||||
{{- if or (and (.Values.internalTelemetryViaOTLP.traces.enabled) (not (or .Values.internalTelemetryViaOTLP.endpoint .Values.internalTelemetryViaOTLP.traces.endpoint))) }}
|
||||
{{ fail "[ERROR] internalTelemetryViaOTLP.endpoint or .Values.internalTelemetryViaOTLP.traces.endpoint must be set when internalTelemetryViaOTLP.traces.enabled is true" }}
|
||||
{{ end }}
|
||||
|
||||
{{- if or (and (.Values.internalTelemetryViaOTLP.metrics.enabled) (not (or .Values.internalTelemetryViaOTLP.endpoint .Values.internalTelemetryViaOTLP.metrics.endpoint))) }}
|
||||
{{ fail "[ERROR] internalTelemetryViaOTLP.endpoint or .Values.internalTelemetryViaOTLP.metrics.endpoint must be set when internalTelemetryViaOTLP.metrics.enabled is true" }}
|
||||
{{ end }}
|
||||
|
||||
{{- if or (and (.Values.internalTelemetryViaOTLP.logs.enabled) (not (or .Values.internalTelemetryViaOTLP.endpoint .Values.internalTelemetryViaOTLP.logs.endpoint))) }}
|
||||
{{ fail "[ERROR] internalTelemetryViaOTLP.endpoint or .Values.internalTelemetryViaOTLP.logs.endpoint must be set when internalTelemetryViaOTLP.logs.enabled is true" }}
|
||||
{{ end }}
|
||||
|
||||
{{- if .Values.config.service.telemetry.metrics.address }}
|
||||
[WARNING] config.service.telemetry.metrics.address should not be used and will be removed in the future. Use internalTelemetryViaOTLP or config.service.telemetry.metrics.readers instead"
|
||||
{{ end }}
|
||||
|
||||
{{- if and .Values.presets.logsCollection.enabled .Values.presets.annotationDiscovery.logs.enabled }}
|
||||
{{- fail "[ERROR] logsCollection and annotationDiscovery.logs are mutually exclusive" }}
|
||||
{{- end }}
|
||||
|
||||
{{- $deprecations := include "opentelemetry-collector.deprecations" . -}}
|
||||
{{- if $deprecations }}
|
||||
{{ $deprecations }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,745 @@
|
||||
{{- define "opentelemetry-collector.otelsdkotlp.traces" -}}
|
||||
traces:
|
||||
processors:
|
||||
- batch:
|
||||
exporter:
|
||||
otlp:
|
||||
protocol: http/protobuf
|
||||
endpoint: {{ default .Values.internalTelemetryViaOTLP.endpoint .Values.internalTelemetryViaOTLP.traces.endpoint }}
|
||||
{{- if or .Values.internalTelemetryViaOTLP.headers .Values.internalTelemetryViaOTLP.traces.headers }}
|
||||
headers:
|
||||
{{- toYaml (default .Values.internalTelemetryViaOTLP.headers .Values.internalTelemetryViaOTLP.traces.headers) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.otelsdkotlp.metrics" -}}
|
||||
metrics:
|
||||
readers:
|
||||
- periodic:
|
||||
exporter:
|
||||
otlp:
|
||||
protocol: http/protobuf
|
||||
endpoint: {{ default .Values.internalTelemetryViaOTLP.endpoint .Values.internalTelemetryViaOTLP.metrics.endpoint }}
|
||||
{{- if or .Values.internalTelemetryViaOTLP.headers .Values.internalTelemetryViaOTLP.metrics.headers }}
|
||||
headers:
|
||||
{{- toYaml (default .Values.internalTelemetryViaOTLP.headers .Values.internalTelemetryViaOTLP.metrics.headers) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.metrics.prometheus" -}}
|
||||
metrics:
|
||||
readers:
|
||||
- pull:
|
||||
exporter:
|
||||
prometheus:
|
||||
host: {{ .address._0 | replace "{env!" "{env:" }}
|
||||
port: {{ .address._1 }}
|
||||
{{- if .Values.config.service.telemetry.resource }}
|
||||
with_resource_constant_labels:
|
||||
included:
|
||||
{{- range (keys .Values.config.service.telemetry.resource | sortAlpha) }}
|
||||
- {{ println . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.otelsdkotlp.logs" -}}
|
||||
logs:
|
||||
processors:
|
||||
- batch:
|
||||
exporter:
|
||||
otlp:
|
||||
protocol: http/protobuf
|
||||
endpoint: {{ default .Values.internalTelemetryViaOTLP.endpoint .Values.internalTelemetryViaOTLP.logs.endpoint }}
|
||||
{{- if or .Values.internalTelemetryViaOTLP.headers .Values.internalTelemetryViaOTLP.logs.headers }}
|
||||
headers:
|
||||
{{- toYaml (default .Values.internalTelemetryViaOTLP.headers .Values.internalTelemetryViaOTLP.logs.headers) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.baseConfig" -}}
|
||||
{{- if .Values.alternateConfig }}
|
||||
{{- .Values.alternateConfig | toYaml }}
|
||||
{{- else}}
|
||||
{{- $config := deepCopy .Values.config }}
|
||||
{{- if .Values.internalTelemetryViaOTLP.traces.enabled }}
|
||||
{{- $_ := set $config.service "telemetry" (mustMerge $config.service.telemetry (include "opentelemetry-collector.otelsdkotlp.traces" . | fromYaml)) }}
|
||||
{{- end }}
|
||||
{{- if .Values.internalTelemetryViaOTLP.metrics.enabled }}
|
||||
{{- $_ := unset $config.receivers "prometheus" }}
|
||||
{{- if $config.service.pipelines.metrics }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "receivers" (mustWithout $config.service.pipelines.metrics.receivers "prometheus") }}
|
||||
{{- end }}
|
||||
{{- $_ := unset $config.service.telemetry.metrics "readers" }}
|
||||
{{- $_ := set $config.service "telemetry" (mustMerge $config.service.telemetry (include "opentelemetry-collector.otelsdkotlp.metrics" . | fromYaml)) }}
|
||||
{{- else if .Values.config.service.telemetry.metrics.address }}
|
||||
{{/* First replace env: with env! so we can split the host with the port and replace it back later */}}
|
||||
{{- $address:= .Values.config.service.telemetry.metrics.address | replace "{env:" "{env!" | split ":" }}
|
||||
{{- $_ := unset $config.service.telemetry.metrics "address" }}
|
||||
{{- $_ := set $config.service "telemetry" (mustMerge (include "opentelemetry-collector.metrics.prometheus" (mustMerge (dict "address" $address) .) | fromYaml) $config.service.telemetry ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.internalTelemetryViaOTLP.logs.enabled }}
|
||||
{{- $_ := set $config.service "telemetry" (mustMerge $config.service.telemetry (include "opentelemetry-collector.otelsdkotlp.logs" . | fromYaml)) }}
|
||||
{{- end }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Build config file for daemonset OpenTelemetry Collector
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.daemonsetConfig" -}}
|
||||
{{- $values := deepCopy .Values }}
|
||||
{{- $data := dict "Values" $values | mustMergeOverwrite (deepCopy .) }}
|
||||
{{- $config := include "opentelemetry-collector.baseConfig" $data | fromYaml }}
|
||||
{{- if .Values.presets.logsCollection.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyLogsCollectionConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if or .Values.presets.annotationDiscovery.logs.enabled .Values.presets.annotationDiscovery.metrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyAnnotationDiscoveryConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.hostMetrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyHostMetricsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.profiling.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyProfilingConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubeletMetrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubeletMetricsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesAttributes.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubernetesAttributesConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubernetesObjectsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.clusterMetrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyClusterMetricsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if and .Values.presets.resourceDetection.enabled (or .Values.presets.resourceDetection.env.enabled .Values.presets.resourceDetection.k8snode.enabled .Values.presets.resourceDetection.eks.enabled .Values.presets.resourceDetection.aks.enabled .Values.presets.resourceDetection.gcp.enabled) }}
|
||||
{{- $config = (include "opentelemetry-collector.applyResourceDetectionConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- tpl (toYaml $config) . }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Build config file for deployment OpenTelemetry Collector
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.deploymentConfig" -}}
|
||||
{{- $values := deepCopy .Values }}
|
||||
{{- $data := dict "Values" $values | mustMergeOverwrite (deepCopy .) }}
|
||||
{{- $config := include "opentelemetry-collector.baseConfig" $data | fromYaml }}
|
||||
{{- if .Values.presets.logsCollection.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyLogsCollectionConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if or .Values.presets.annotationDiscovery.logs.enabled .Values.presets.annotationDiscovery.metrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyAnnotationDiscoveryConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.hostMetrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyHostMetricsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.profiling.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyProfilingConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubeletMetrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubeletMetricsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesAttributes.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubernetesAttributesConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesEvents.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubernetesEventsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyKubernetesObjectsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.clusterMetrics.enabled }}
|
||||
{{- $config = (include "opentelemetry-collector.applyClusterMetricsConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if and .Values.presets.resourceDetection.enabled (or .Values.presets.resourceDetection.env.enabled .Values.presets.resourceDetection.k8snode.enabled .Values.presets.resourceDetection.eks.enabled .Values.presets.resourceDetection.aks.enabled .Values.presets.resourceDetection.gcp.enabled) }}
|
||||
{{- $config = (include "opentelemetry-collector.applyResourceDetectionConfig" (dict "Values" $data "config" $config) | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- tpl (toYaml $config) . }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyHostMetricsConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "metrics" (dict "receivers" list)))) (include "opentelemetry-collector.hostMetricsConfig" .Values | fromYaml) .config }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "receivers" (append $config.service.pipelines.metrics.receivers "hostmetrics" | uniq) }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.hostMetricsConfig" -}}
|
||||
receivers:
|
||||
hostmetrics:
|
||||
root_path: /hostfs
|
||||
collection_interval: 10s
|
||||
scrapers:
|
||||
cpu:
|
||||
load:
|
||||
memory:
|
||||
disk:
|
||||
filesystem:
|
||||
exclude_mount_points:
|
||||
mount_points:
|
||||
- '^/dev($|/)'
|
||||
- '^/proc($|/)'
|
||||
- '^/sys($|/)'
|
||||
- '^/run/k3s/containerd($|/)'
|
||||
- '^/var/lib/docker($|/)'
|
||||
- '^/var/lib/kubelet($|/)'
|
||||
- '^/snap($|/)'
|
||||
match_type: regexp
|
||||
exclude_fs_types:
|
||||
fs_types:
|
||||
- autofs
|
||||
- binfmt_misc
|
||||
- bpf
|
||||
- cgroup2
|
||||
- configfs
|
||||
- debugfs
|
||||
- devpts
|
||||
- devtmpfs
|
||||
- fusectl
|
||||
- hugetlbfs
|
||||
- iso9660
|
||||
- mqueue
|
||||
- nsfs
|
||||
- overlay
|
||||
- proc
|
||||
- procfs
|
||||
- pstore
|
||||
- rpc_pipefs
|
||||
- securityfs
|
||||
- selinuxfs
|
||||
- squashfs
|
||||
- sysfs
|
||||
- tracefs
|
||||
match_type: strict
|
||||
network:
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyClusterMetricsConfig" -}}
|
||||
{{- $vals := .Values.Values -}}
|
||||
{{- $disableLeaderElection := false -}}
|
||||
{{- if and (hasKey $vals "presets") (hasKey $vals.presets "clusterMetrics") -}}
|
||||
{{- $disableLeaderElection = $vals.presets.clusterMetrics.disableLeaderElection -}}
|
||||
{{- end -}}
|
||||
{{- $useLeaderElection := and (eq $vals.mode "daemonset") (not $disableLeaderElection) -}}
|
||||
{{- $electorName := "k8s_cluster" }}
|
||||
{{- $ctx := mustMerge (dict "namespace" (include "opentelemetry-collector.namespace" .Values) "useLeaderElection" $useLeaderElection "electorName" $electorName) .Values }}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "metrics" (dict "receivers" list)))) (include "opentelemetry-collector.clusterMetricsConfig" $ctx | fromYaml) .config }}
|
||||
{{- if $useLeaderElection}}
|
||||
{{- $configExtensions := mustMergeOverwrite (dict "service" (dict "extensions" list)) $config }}
|
||||
{{- $_ := set $config.service "extensions" (append $configExtensions.service.extensions (printf "k8s_leader_elector/%s" $electorName) | uniq) }}
|
||||
{{- end }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "receivers" (append $config.service.pipelines.metrics.receivers "k8s_cluster" | uniq) }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.clusterMetricsConfig" -}}
|
||||
{{- if .useLeaderElection}}
|
||||
{{- include "opentelemetry-collector.leaderElectionConfig" (dict "name" .electorName "leaseName" "k8s.cluster.receiver.opentelemetry.io" "leaseNamespace" .namespace)}}
|
||||
{{- end}}
|
||||
receivers:
|
||||
k8s_cluster:
|
||||
{{- if .useLeaderElection}}
|
||||
k8s_leader_elector: k8s_leader_elector/{{ .electorName }}
|
||||
{{- end}}
|
||||
collection_interval: 10s
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyKubeletMetricsConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "metrics" (dict "receivers" list)))) (include "opentelemetry-collector.kubeletMetricsConfig" .Values | fromYaml) .config }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "receivers" (append $config.service.pipelines.metrics.receivers "kubeletstats" | uniq) }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.kubeletMetricsConfig" -}}
|
||||
receivers:
|
||||
kubeletstats:
|
||||
collection_interval: 20s
|
||||
auth_type: "serviceAccount"
|
||||
endpoint: "${env:K8S_NODE_IP}:10250"
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyLogsCollectionConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "logs" (dict "receivers" list)))) (include "opentelemetry-collector.logsCollectionConfig" .Values | fromYaml) .config }}
|
||||
{{- $_ := set $config.service.pipelines.logs "receivers" (append $config.service.pipelines.logs.receivers "filelog" | uniq) }}
|
||||
{{- if .Values.Values.presets.logsCollection.storeCheckpoints}}
|
||||
{{- $configExtensions := mustMergeOverwrite (dict "service" (dict "extensions" list)) $config }}
|
||||
{{- $_ := set $config.service "extensions" (append $configExtensions.service.extensions "file_storage" | uniq) }}
|
||||
{{- end }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.logsCollectionConfig" -}}
|
||||
{{- if .Values.presets.logsCollection.storeCheckpoints }}
|
||||
extensions:
|
||||
file_storage:
|
||||
directory: /var/lib/otelcol
|
||||
{{- end }}
|
||||
receivers:
|
||||
filelog:
|
||||
include: [ /var/log/pods/*/*/*.log ]
|
||||
{{- if .Values.presets.logsCollection.includeCollectorLogs }}
|
||||
exclude: []
|
||||
{{- else }}
|
||||
# Exclude collector container's logs. The file format is /var/log/pods/<namespace_name>_<pod_name>_<pod_uid>/<container_name>/<run_id>.log
|
||||
exclude: [ /var/log/pods/{{ include "opentelemetry-collector.namespace" . }}_{{ include "opentelemetry-collector.fullname" . }}*_*/{{ include "opentelemetry-collector.lowercase_chartname" . }}/*.log ]
|
||||
{{- end }}
|
||||
start_at: end
|
||||
retry_on_failure:
|
||||
enabled: true
|
||||
{{- if .Values.presets.logsCollection.storeCheckpoints}}
|
||||
storage: file_storage
|
||||
{{- end }}
|
||||
include_file_path: true
|
||||
include_file_name: false
|
||||
operators:
|
||||
# parse container logs
|
||||
- type: container
|
||||
id: container-parser
|
||||
max_log_size: {{ $.Values.presets.logsCollection.maxRecombineLogSize }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyAnnotationDiscoveryConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (include "opentelemetry-collector.annotationDiscoveryConfig" .Values | fromYaml) .config }}
|
||||
{{- $_ := set $config.service "extensions" (append $config.service.extensions "k8s_observer" | uniq) }}
|
||||
{{- if .Values.Values.presets.annotationDiscovery.logs.enabled }}
|
||||
{{- $_ := set $config.service.pipelines.logs "receivers" (append $config.service.pipelines.logs.receivers "receiver_creator/logs" | uniq) }}
|
||||
{{- end }}
|
||||
{{- if .Values.Values.presets.annotationDiscovery.metrics.enabled }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "receivers" (append $config.service.pipelines.metrics.receivers "receiver_creator/metrics" | uniq) }}
|
||||
{{- end }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.annotationDiscoveryConfig" -}}
|
||||
extensions:
|
||||
k8s_observer:
|
||||
auth_type: serviceAccount
|
||||
{{- if eq .Values.mode "daemonset" }}
|
||||
node: ${env:K8S_NODE_NAME}
|
||||
{{- end }}
|
||||
|
||||
receivers:
|
||||
{{- if .Values.presets.annotationDiscovery.logs.enabled }}
|
||||
receiver_creator/logs:
|
||||
watch_observers:
|
||||
- k8s_observer
|
||||
discovery:
|
||||
enabled: true
|
||||
default_annotations:
|
||||
io.opentelemetry.discovery.logs/enabled: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.presets.annotationDiscovery.metrics.enabled }}
|
||||
receiver_creator/metrics:
|
||||
watch_observers:
|
||||
- k8s_observer
|
||||
discovery:
|
||||
enabled: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyProfilingConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "profiles" (dict "receivers" list "exporters" list)))) (include "opentelemetry-collector.profilingConfig" .Values | fromYaml) .config }}
|
||||
{{- $_ := set $config.service.pipelines.profiles "receivers" (append $config.service.pipelines.profiles.receivers "profiling" | uniq) }}
|
||||
{{- if not $config.service.pipelines.profiles.exporters }}
|
||||
{{- $_ := set $config.service.pipelines.profiles "exporters" (list "debug") }}
|
||||
{{- end }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.profilingConfig" -}}
|
||||
receivers:
|
||||
profiling: {}
|
||||
exporters:
|
||||
debug: {}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyKubernetesAttributesConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (include "opentelemetry-collector.kubernetesAttributesConfig" .Values | fromYaml) .config }}
|
||||
{{- if $config.service.pipelines.logs }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "logs" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "k8sattributes" $config.service.pipelines.logs.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.logs "processors" (prepend $config.service.pipelines.logs.processors "k8sattributes" | uniq) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and $config.service.pipelines.metrics }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "metrics" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "k8sattributes" $config.service.pipelines.metrics.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "processors" (prepend $config.service.pipelines.metrics.processors "k8sattributes" | uniq) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and $config.service.pipelines.traces }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "traces" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "k8sattributes" $config.service.pipelines.traces.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.traces "processors" (prepend $config.service.pipelines.traces.processors "k8sattributes" | uniq) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $config.service.pipelines.profiles }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "profiles" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "k8sattributes" $config.service.pipelines.profiles.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.profiles "processors" (prepend $config.service.pipelines.profiles.processors "k8sattributes" | uniq) }}
|
||||
{{- end }}
|
||||
{{- $podAssoc := $config.processors.k8sattributes.pod_association }}
|
||||
{{- $containerIdSource := dict "sources" (list (dict "from" "resource_attribute" "name" "container.id")) }}
|
||||
{{- $hasContainerId := false }}
|
||||
{{- range $podAssoc }}
|
||||
{{- range .sources }}
|
||||
{{- if and (eq .from "resource_attribute") (eq .name "container.id") }}
|
||||
{{- $hasContainerId = true }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not $hasContainerId }}
|
||||
{{- $_ := set $config.processors.k8sattributes "pod_association" (prepend $podAssoc $containerIdSource) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.kubernetesAttributesConfig" -}}
|
||||
processors:
|
||||
k8sattributes:
|
||||
{{- if eq .Values.mode "daemonset" }}
|
||||
filter:
|
||||
node_from_env_var: K8S_NODE_NAME
|
||||
{{- end }}
|
||||
passthrough: false
|
||||
pod_association:
|
||||
- sources:
|
||||
- from: resource_attribute
|
||||
name: k8s.pod.ip
|
||||
- sources:
|
||||
- from: resource_attribute
|
||||
name: k8s.pod.uid
|
||||
- sources:
|
||||
- from: connection
|
||||
extract:
|
||||
otel_annotations: true
|
||||
metadata:
|
||||
- k8s.namespace.name
|
||||
- k8s.pod.name
|
||||
- k8s.pod.uid
|
||||
- k8s.node.name
|
||||
- k8s.pod.start_time
|
||||
- k8s.deployment.name
|
||||
- k8s.replicaset.name
|
||||
- k8s.replicaset.uid
|
||||
- k8s.daemonset.name
|
||||
- k8s.daemonset.uid
|
||||
- k8s.job.name
|
||||
- k8s.job.uid
|
||||
- k8s.container.name
|
||||
- k8s.cronjob.name
|
||||
- k8s.statefulset.name
|
||||
- k8s.statefulset.uid
|
||||
- container.image.tag
|
||||
- container.image.name
|
||||
- k8s.cluster.uid
|
||||
- service.namespace
|
||||
- service.name
|
||||
- service.version
|
||||
- service.instance.id
|
||||
{{- if .Values.presets.kubernetesAttributes.extractAllPodLabels }}
|
||||
labels:
|
||||
- tag_name: $$1
|
||||
key_regex: (.*)
|
||||
from: pod
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesAttributes.extractAllPodAnnotations }}
|
||||
annotations:
|
||||
- tag_name: $$1
|
||||
key_regex: (.*)
|
||||
from: pod
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Build the list of port for service */}}
|
||||
{{- define "opentelemetry-collector.servicePortsConfig" -}}
|
||||
{{- $ports := deepCopy .Values.ports }}
|
||||
{{- range $key, $port := $ports }}
|
||||
{{- if $port.enabled }}
|
||||
- name: {{ $key }}
|
||||
port: {{ $port.servicePort }}
|
||||
targetPort: {{ $port.containerPort }}
|
||||
protocol: {{ $port.protocol }}
|
||||
{{- if $port.appProtocol }}
|
||||
appProtocol: {{ $port.appProtocol }}
|
||||
{{- end }}
|
||||
{{- if $port.nodePort }}
|
||||
nodePort: {{ $port.nodePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Build the list of port for pod */}}
|
||||
{{- define "opentelemetry-collector.podPortsConfig" -}}
|
||||
{{- $ports := deepCopy .Values.ports }}
|
||||
{{- range $key, $port := $ports }}
|
||||
{{- if $port.enabled }}
|
||||
- name: {{ $key }}
|
||||
containerPort: {{ $port.containerPort }}
|
||||
protocol: {{ $port.protocol }}
|
||||
{{- if and $.isAgent $port.hostPort }}
|
||||
hostPort: {{ $port.hostPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyKubernetesEventsConfig" -}}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "logs" (dict "receivers" list)))) (include "opentelemetry-collector.kubernetesEventsConfig" .Values | fromYaml) .config }}
|
||||
{{- $_ := set $config.service.pipelines.logs "receivers" (append $config.service.pipelines.logs.receivers "k8sobjects" | uniq) }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.kubernetesEventsConfig" -}}
|
||||
receivers:
|
||||
k8sobjects:
|
||||
objects:
|
||||
- name: events
|
||||
mode: "watch"
|
||||
group: "events.k8s.io"
|
||||
exclude_watch_type:
|
||||
- "DELETED"
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyKubernetesObjectsConfig" -}}
|
||||
{{- $vals := .Values.Values -}}
|
||||
{{- $disableLeaderElection := false -}}
|
||||
{{- if and (hasKey $vals "presets") (hasKey $vals.presets "kubernetesObjects") -}}
|
||||
{{- $disableLeaderElection = $vals.presets.kubernetesObjects.disableLeaderElection -}}
|
||||
{{- end -}}
|
||||
{{- $useLeaderElection := and (eq $vals.mode "daemonset") (not $disableLeaderElection) -}}
|
||||
{{- $electorName := "k8s_objects" }}
|
||||
{{- $ctx := mustMerge (dict "namespace" (include "opentelemetry-collector.namespace" .Values) "useLeaderElection" $useLeaderElection "electorName" $electorName) .Values }}
|
||||
{{- $objectsYaml := include "opentelemetry-collector.kubernetesObjectsConfig" $ctx | fromYaml }}
|
||||
{{- $newObjects := (index $objectsYaml.receivers "k8sobjects").objects }}
|
||||
{{- $existingObjects := list }}
|
||||
{{- if .config.receivers }}
|
||||
{{- if index .config.receivers "k8sobjects" }}
|
||||
{{- if (index .config.receivers "k8sobjects").objects }}
|
||||
{{- $existingObjects = (index .config.receivers "k8sobjects").objects }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $allObjects := concat $newObjects $existingObjects }}
|
||||
{{- $config := mustMergeOverwrite (dict "service" (dict "pipelines" (dict "logs" (dict "receivers" list)))) $objectsYaml .config }}
|
||||
{{- $_ := set (index $config.receivers "k8sobjects") "objects" $allObjects }}
|
||||
{{- if $useLeaderElection }}
|
||||
{{- $configExtensions := mustMergeOverwrite (dict "service" (dict "extensions" list)) $config }}
|
||||
{{- $_ := set $config.service "extensions" (append $configExtensions.service.extensions (printf "k8s_leader_elector/%s" $electorName) | uniq) }}
|
||||
{{- end }}
|
||||
{{- $_ := set $config.service.pipelines.logs "receivers" (append $config.service.pipelines.logs.receivers "k8sobjects" | uniq) }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.kubernetesObjectsConfig" -}}
|
||||
{{- $preset := .Values.presets.kubernetesObjects -}}
|
||||
{{- if .useLeaderElection }}
|
||||
{{- include "opentelemetry-collector.leaderElectionConfig" (dict "name" .electorName "leaseName" "k8s.objects.receiver.opentelemetry.io" "leaseNamespace" .namespace) }}
|
||||
{{- end }}
|
||||
receivers:
|
||||
k8sobjects:
|
||||
{{- if .useLeaderElection }}
|
||||
k8s_leader_elector: k8s_leader_elector/{{ .electorName }}
|
||||
{{- end }}
|
||||
objects:
|
||||
{{- if $preset.core.enabled }}
|
||||
{{- range list "namespaces" "pods" "nodes" "services" "serviceaccounts" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range list "deployments" "replicasets" "daemonsets" "statefulsets" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
group: apps
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
group: apps
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range list "jobs" "cronjobs" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
group: batch
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
group: batch
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $preset.rbac.enabled }}
|
||||
{{- range list "roles" "rolebindings" "clusterroles" "clusterrolebindings" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
group: rbac.authorization.k8s.io
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
group: rbac.authorization.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $preset.storage.enabled }}
|
||||
{{- range list "storageclasses" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
group: storage.k8s.io
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
group: storage.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range list "persistentvolumes" "persistentvolumeclaims" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $preset.networking.enabled }}
|
||||
{{- range list "ingresses" "networkpolicies" }}
|
||||
- name: {{ . }}
|
||||
mode: pull
|
||||
group: networking.k8s.io
|
||||
{{- if $preset.watch }}
|
||||
- name: {{ . }}
|
||||
mode: watch
|
||||
group: networking.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $preset.autoscaling.enabled }}
|
||||
- name: horizontalpodautoscalers
|
||||
mode: pull
|
||||
group: autoscaling
|
||||
{{- if $preset.watch }}
|
||||
- name: horizontalpodautoscalers
|
||||
mode: watch
|
||||
group: autoscaling
|
||||
{{- end }}
|
||||
{{- if $preset.autoscaling.vpa.enabled }}
|
||||
- name: verticalpodautoscalers
|
||||
mode: pull
|
||||
group: autoscaling.k8s.io
|
||||
{{- if $preset.watch }}
|
||||
- name: verticalpodautoscalers
|
||||
mode: watch
|
||||
group: autoscaling.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $preset.policy.enabled }}
|
||||
- name: poddisruptionbudgets
|
||||
mode: pull
|
||||
group: policy
|
||||
{{- if $preset.watch }}
|
||||
- name: poddisruptionbudgets
|
||||
mode: watch
|
||||
group: policy
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $preset.apiExtensions.enabled }}
|
||||
- name: customresourcedefinitions
|
||||
mode: pull
|
||||
group: apiextensions.k8s.io
|
||||
{{- if $preset.watch }}
|
||||
- name: customresourcedefinitions
|
||||
mode: watch
|
||||
group: apiextensions.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.leaderElectionConfig" -}}
|
||||
extensions:
|
||||
k8s_leader_elector/{{ .name }}:
|
||||
auth_type: serviceAccount
|
||||
lease_name: {{ .leaseName }}
|
||||
lease_namespace: {{ .leaseNamespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.applyResourceDetectionConfig" -}}
|
||||
{{- $config := .config }}
|
||||
{{- $processors := get $config "processors" | default dict }}
|
||||
{{- $resourceDetectionProcessor := get $processors "resourcedetection/env" | default dict }}
|
||||
{{- $detectors := get $resourceDetectionProcessor "detectors" | default list }}
|
||||
{{- if .Values.Values.presets.resourceDetection.env.enabled }}
|
||||
{{- $detectors = append $detectors "env" | uniq }}
|
||||
{{- end }}
|
||||
{{- if .Values.Values.presets.resourceDetection.k8snode.enabled }}
|
||||
{{- $detectors = append $detectors "k8snode" | uniq }}
|
||||
{{- end }}
|
||||
{{- if .Values.Values.presets.resourceDetection.aks.enabled }}
|
||||
{{- $aksConfig := include "opentelemetry-collector.resourceDetectionAksDetectorConfig" . | fromYaml }}
|
||||
{{- $resourceDetectionProcessor = mustMergeOverwrite $resourceDetectionProcessor $aksConfig }}
|
||||
{{- $detectors = append $detectors "aks" | uniq }}
|
||||
{{- end }}
|
||||
{{- if .Values.Values.presets.resourceDetection.eks.enabled }}
|
||||
{{- $eksConfig := include "opentelemetry-collector.resourceDetectionEksDetectorConfig" . | fromYaml }}
|
||||
{{- $resourceDetectionProcessor = mustMergeOverwrite $resourceDetectionProcessor $eksConfig }}
|
||||
{{- $detectors = append $detectors "eks" | uniq }}
|
||||
{{- end }}
|
||||
{{- if .Values.Values.presets.resourceDetection.gcp.enabled }}
|
||||
{{- $gcpConfig := include "opentelemetry-collector.resourceDetectionGcpDetectorConfig" . | fromYaml }}
|
||||
{{- $resourceDetectionProcessor = mustMergeOverwrite $resourceDetectionProcessor $gcpConfig }}
|
||||
{{- $detectors = append $detectors "gcp" | uniq }}
|
||||
{{- end }}
|
||||
{{- $_ := set $resourceDetectionProcessor "detectors" $detectors }}
|
||||
{{- $_ := set $processors "resourcedetection/env" $resourceDetectionProcessor }}
|
||||
{{- $_ := set $config "processors" $processors }}
|
||||
{{- if $config.service.pipelines.logs }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "logs" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "resourcedetection/env" $config.service.pipelines.logs.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.logs "processors" (prepend $config.service.pipelines.logs.processors "resourcedetection/env" | uniq) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $config.service.pipelines.metrics }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "metrics" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "resourcedetection/env" $config.service.pipelines.metrics.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.metrics "processors" (prepend $config.service.pipelines.metrics.processors "resourcedetection/env" | uniq) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $config.service.pipelines.traces }}
|
||||
{{- $config = mustMergeOverwrite (dict "service" (dict "pipelines" (dict "traces" (dict "processors" list)))) $config }}
|
||||
{{- if not (has "resourcedetection/env" $config.service.pipelines.traces.processors) }}
|
||||
{{- $_ := set $config.service.pipelines.traces "processors" (prepend $config.service.pipelines.traces.processors "resourcedetection/env" | uniq) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $config | toYaml }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.resourceDetectionEksDetectorConfig" -}}
|
||||
timeout: 15s
|
||||
eks:
|
||||
resource_attributes:
|
||||
k8s.cluster.name:
|
||||
enabled: true
|
||||
{{- end -}}
|
||||
|
||||
{{- define "opentelemetry-collector.resourceDetectionAksDetectorConfig" -}}
|
||||
aks:
|
||||
resource_attributes:
|
||||
k8s.cluster.name:
|
||||
enabled: true
|
||||
{{- end -}}
|
||||
|
||||
{{- define "opentelemetry-collector.resourceDetectionGcpDetectorConfig" -}}
|
||||
gcp:
|
||||
resource_attributes:
|
||||
k8s.cluster.name:
|
||||
enabled: true
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,285 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.lowercase_chartname" -}}
|
||||
{{- default .Chart.Name | lower }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Get component name
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.component" -}}
|
||||
{{- if eq .Values.mode "deployment" -}}
|
||||
component: standalone-collector
|
||||
{{- end -}}
|
||||
{{- if eq .Values.mode "daemonset" -}}
|
||||
component: agent-collector
|
||||
{{- end -}}
|
||||
{{- if eq .Values.mode "statefulset" -}}
|
||||
component: statefulset-collector
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.labels" -}}
|
||||
helm.sh/chart: {{ include "opentelemetry-collector.chart" . }}
|
||||
{{ include "opentelemetry-collector.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/part-of: opentelemetry-collector
|
||||
{{- if eq .Values.mode "deployment" }}
|
||||
app.kubernetes.io/component: standalone-collector
|
||||
{{- end -}}
|
||||
{{- if eq .Values.mode "daemonset" }}
|
||||
app.kubernetes.io/component: agent-collector
|
||||
{{- end -}}
|
||||
{{- if eq .Values.mode "statefulset" }}
|
||||
app.kubernetes.io/component: statefulset-collector
|
||||
{{- end -}}
|
||||
{{- if .Values.additionalLabels }}
|
||||
{{ tpl (.Values.additionalLabels | toYaml) . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "opentelemetry-collector.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "opentelemetry-collector.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Create the name of the clusterRole to use
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.clusterRoleName" -}}
|
||||
{{- default (include "opentelemetry-collector.fullname" .) .Values.clusterRole.name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the clusterRoleBinding to use
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.clusterRoleBindingName" -}}
|
||||
{{- default (include "opentelemetry-collector.fullname" .) .Values.clusterRole.clusterRoleBinding.name }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.podAnnotations" -}}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- tpl (.Values.podAnnotations | toYaml) . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.podLabels" -}}
|
||||
{{- if .Values.podLabels }}
|
||||
{{- tpl (.Values.podLabels | toYaml) . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for podDisruptionBudget.
|
||||
*/}}
|
||||
{{- define "podDisruptionBudget.apiVersion" -}}
|
||||
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
|
||||
{{- print "policy/v1" -}}
|
||||
{{- else -}}
|
||||
{{- print "policy/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compute Service creation on mode
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.serviceEnabled" }}
|
||||
{{- $serviceEnabled := true }}
|
||||
{{- if not (eq (toString .Values.service.enabled) "<nil>") }}
|
||||
{{- $serviceEnabled = .Values.service.enabled -}}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.mode "daemonset") (not .Values.service.enabled) }}
|
||||
{{- $serviceEnabled = false -}}
|
||||
{{- end }}
|
||||
|
||||
{{- print $serviceEnabled }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Compute InternalTrafficPolicy on Service creation
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.serviceInternalTrafficPolicy" }}
|
||||
{{- if and (eq .Values.mode "daemonset") (eq .Values.service.enabled true) }}
|
||||
{{- print (.Values.service.internalTrafficPolicy | default "Local") -}}
|
||||
{{- else }}
|
||||
{{- print (.Values.service.internalTrafficPolicy | default "Cluster") -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Allow the release namespace to be overridden
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
{{- else -}}
|
||||
{{- .Release.Namespace -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
This helper converts the input value of memory to Bytes.
|
||||
Input needs to be a valid value as supported by k8s memory resource field.
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.convertMemToBytes" }}
|
||||
{{- $mem := lower . -}}
|
||||
{{- if hasSuffix "e" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "e" $mem | float64) 1e18 -}}
|
||||
{{- else if hasSuffix "ei" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "e" $mem | float64) 0x1p60 -}}
|
||||
{{- else if hasSuffix "p" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "p" $mem | float64) 1e15 -}}
|
||||
{{- else if hasSuffix "pi" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "pi" $mem | float64) 0x1p50 -}}
|
||||
{{- else if hasSuffix "t" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "t" $mem | float64) 1e12 -}}
|
||||
{{- else if hasSuffix "ti" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "ti" $mem | float64) 0x1p40 -}}
|
||||
{{- else if hasSuffix "g" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "g" $mem | float64) 1e9 -}}
|
||||
{{- else if hasSuffix "gi" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "gi" $mem | float64) 0x1p30 -}}
|
||||
{{- else if hasSuffix "m" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "m" $mem | float64) 1e6 -}}
|
||||
{{- else if hasSuffix "mi" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "mi" $mem | float64) 0x1p20 -}}
|
||||
{{- else if hasSuffix "k" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "k" $mem | float64) 1e3 -}}
|
||||
{{- else if hasSuffix "ki" $mem -}}
|
||||
{{- $mem = mulf (trimSuffix "ki" $mem | float64) 0x1p10 -}}
|
||||
{{- end }}
|
||||
{{- $mem }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.gomemlimit" }}
|
||||
{{- $memlimitBytes := include "opentelemetry-collector.convertMemToBytes" . | mulf 0.8 -}}
|
||||
{{- printf "%dMiB" (divf $memlimitBytes 0x1p20 | floor | int64) -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Get HPA kind from mode.
|
||||
The capitalization is important for StatefulSet.
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.hpaKind" -}}
|
||||
{{- if eq .Values.mode "deployment" -}}
|
||||
{{- print "Deployment" -}}
|
||||
{{- end -}}
|
||||
{{- if eq .Values.mode "statefulset" -}}
|
||||
{{- print "StatefulSet" -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Get ConfigMap name if existingName is defined, otherwise use default name for generated config.
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.configName" -}}
|
||||
{{- if .Values.configMap.existingName -}}
|
||||
{{- tpl (.Values.configMap.existingName | toYaml) . }}
|
||||
{{- else }}
|
||||
{{- printf "%s%s" (include "opentelemetry-collector.fullname" .) (.configmapSuffix) }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create ConfigMap checksum annotation if configMap.existingPath is defined, otherwise use default templates
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.configTemplateChecksumAnnotation" -}}
|
||||
{{- if .Values.configMap.existingPath -}}
|
||||
checksum/config: {{ include (print $.Template.BasePath "/" .Values.configMap.existingPath) . | sha256sum }}
|
||||
{{- else -}}
|
||||
{{- if eq .Values.mode "daemonset" -}}
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap-agent.yaml") . | sha256sum }}
|
||||
{{- else if eq .Values.mode "deployment" -}}
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
{{- else if eq .Values.mode "statefulset" -}}
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap-statefulset.yaml") . | sha256sum }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "opentelemetry-collector.deprecations" -}}
|
||||
{{- $warnings := list -}}
|
||||
{{- $renames := list
|
||||
(dict "old" "k8sattributes" "new" "k8s_attributes")
|
||||
-}}
|
||||
{{- range $rename := $renames }}
|
||||
{{- $oldName := index $rename "old" -}}
|
||||
{{- $newName := index $rename "new" -}}
|
||||
{{- if index $.Values.config.processors $oldName }}
|
||||
{{- $warnings = append $warnings (printf "[DEPRECATION] Processor '%s' has been renamed to '%s'. Update your values.yaml. See UPGRADING.md." $oldName $newName) -}}
|
||||
{{- end }}
|
||||
{{- range $signal, $pipeline := $.Values.config.service.pipelines }}
|
||||
{{- if and $pipeline $pipeline.processors (has $oldName $pipeline.processors) }}
|
||||
{{- $warnings = append $warnings (printf "[DEPRECATION] Pipeline '%s' references renamed processor '%s'. Use '%s' in your values.yaml. See UPGRADING.md." $signal $oldName $newName) -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- join "\n" $warnings -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
List of upstream community OpenTelemetry Collector distributions that do NOT include
|
||||
the profiling receiver. Among community images only `opentelemetry-collector-ebpf-profiler`
|
||||
ships the receiver; custom/vendor distributions pass through.
|
||||
Consumed by NOTES.txt to fail-fast when the profiling preset
|
||||
is enabled with an incompatible community image.
|
||||
See https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions
|
||||
*/}}
|
||||
{{- define "opentelemetry-collector.profilingUnsupportedImages" -}}
|
||||
- opentelemetry-collector
|
||||
- opentelemetry-collector-contrib
|
||||
- opentelemetry-collector-k8s
|
||||
- opentelemetry-collector-otlp
|
||||
{{- end }}
|
||||
@@ -0,0 +1,278 @@
|
||||
{{- define "opentelemetry-collector.pod" -}}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "opentelemetry-collector.serviceAccountName" . }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 2 }}
|
||||
{{- with .Values.hostAliases }}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.shareProcessNamespace }}
|
||||
shareProcessNamespace: true
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "opentelemetry-collector.lowercase_chartname" . }}
|
||||
{{- if .Values.command.name }}
|
||||
command:
|
||||
- /{{ .Values.command.name }}
|
||||
{{- end }}
|
||||
args:
|
||||
{{- if or .Values.configMap.create .Values.configMap.existingName }}
|
||||
- --config=/conf/relay.yaml
|
||||
{{- end }}
|
||||
{{- range .Values.command.extraArgs }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- if and (not (.Values.securityContext)) (.Values.presets.profiling.enabled) }}
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
privileged: true
|
||||
{{- else if and (not (.Values.securityContext)) (.Values.presets.logsCollection.storeCheckpoints) }}
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
{{- else -}}
|
||||
{{- toYaml .Values.securityContext | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.digest }}
|
||||
image: "{{ ternary "" (print (.Values.global).imageRegistry "/") (empty (.Values.global).imageRegistry) }}{{ .Values.image.repository }}@{{ .Values.image.digest }}"
|
||||
{{- else }}
|
||||
image: "{{ ternary "" (print (.Values.global).imageRegistry "/") (empty (.Values.global).imageRegistry) }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
|
||||
{{- $ports := include "opentelemetry-collector.podPortsConfig" . }}
|
||||
{{- if $ports }}
|
||||
ports:
|
||||
{{- $ports | nindent 6}}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MY_POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
- name: OTEL_K8S_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: OTEL_K8S_NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: OTEL_K8S_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: OTEL_K8S_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: OTEL_K8S_POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
{{- if or
|
||||
.Values.presets.kubeletMetrics.enabled
|
||||
(and .Values.presets.kubernetesAttributes.enabled (eq .Values.mode "daemonset"))
|
||||
(and (or .Values.presets.annotationDiscovery.logs.enabled .Values.presets.annotationDiscovery.metrics.enabled) (eq .Values.mode "daemonset"))
|
||||
(and .Values.presets.resourceDetection.enabled .Values.presets.resourceDetection.k8snode.enabled)
|
||||
}}
|
||||
- name: K8S_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: K8S_NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
{{- end }}
|
||||
{{- if and (.Values.useGOMEMLIMIT) ((((.Values.resources).limits).memory)) }}
|
||||
- name: GOMEMLIMIT
|
||||
value: {{ include "opentelemetry-collector.gomemlimit" .Values.resources.limits.memory | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraEnvs }}
|
||||
{{- . | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraEnvsFrom }}
|
||||
envFrom:
|
||||
{{- . | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle:
|
||||
{{- toYaml .Values.lifecycleHooks | nindent 6 }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
{{- if .Values.livenessProbe.initialDelaySeconds | empty | not }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.periodSeconds | empty | not }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.timeoutSeconds | empty | not }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.failureThreshold | empty | not }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.terminationGracePeriodSeconds | empty | not }}
|
||||
terminationGracePeriodSeconds: {{ .Values.livenessProbe.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
httpGet:
|
||||
path: {{ .Values.livenessProbe.httpGet.path }}
|
||||
port: {{ .Values.livenessProbe.httpGet.port }}
|
||||
readinessProbe:
|
||||
{{- if .Values.readinessProbe.initialDelaySeconds | empty | not }}
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.periodSeconds | empty | not }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.timeoutSeconds | empty | not }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.successThreshold | empty | not }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.failureThreshold | empty | not }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
httpGet:
|
||||
path: {{ .Values.readinessProbe.httpGet.path }}
|
||||
port: {{ .Values.readinessProbe.httpGet.port }}
|
||||
{{- if .Values.startupProbe }}
|
||||
startupProbe:
|
||||
{{- if .Values.startupProbe.initialDelaySeconds | empty | not }}
|
||||
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.startupProbe.periodSeconds | empty | not }}
|
||||
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.startupProbe.timeoutSeconds | empty | not }}
|
||||
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.startupProbe.failureThreshold | empty | not }}
|
||||
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.startupProbe.terminationGracePeriodSeconds | empty | not }}
|
||||
terminationGracePeriodSeconds: {{ .Values.startupProbe.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
httpGet:
|
||||
path: {{ .Values.startupProbe.httpGet.path }}
|
||||
port: {{ .Values.startupProbe.httpGet.port }}
|
||||
{{- end }}
|
||||
{{- with .Values.resizePolicy }}
|
||||
resizePolicy:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if or .Values.configMap.create .Values.configMap.existingName }}
|
||||
- mountPath: /conf
|
||||
name: {{ include "opentelemetry-collector.lowercase_chartname" . }}-configmap
|
||||
{{- end }}
|
||||
{{- if or .Values.presets.logsCollection.enabled .Values.presets.annotationDiscovery.logs.enabled }}
|
||||
- name: varlogpods
|
||||
mountPath: /var/log/pods
|
||||
readOnly: true
|
||||
- name: varlibdockercontainers
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
{{- if .Values.presets.logsCollection.storeCheckpoints}}
|
||||
- name: varlibotelcol
|
||||
mountPath: /var/lib/otelcol
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.hostMetrics.enabled }}
|
||||
- name: hostfs
|
||||
mountPath: /hostfs
|
||||
readOnly: true
|
||||
mountPropagation: HostToContainer
|
||||
{{- end }}
|
||||
{{- if .Values.presets.profiling.enabled }}
|
||||
- name: tracefs
|
||||
mountPath: /sys/kernel/tracing
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- tpl (toYaml .Values.extraVolumeMounts) . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraContainers }}
|
||||
{{- tpl (toYaml .Values.extraContainers) . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
initContainers:
|
||||
{{- tpl (toYaml .Values.initContainers) . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: {{ .Values.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.runtimeClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if or .Values.configMap.create .Values.configMap.existingName }}
|
||||
- name: {{ include "opentelemetry-collector.lowercase_chartname" . }}-configmap
|
||||
configMap:
|
||||
name: {{ include "opentelemetry-collector.configName" . }}
|
||||
items:
|
||||
- key: relay
|
||||
path: relay.yaml
|
||||
{{- end }}
|
||||
{{- if or .Values.presets.logsCollection.enabled .Values.presets.annotationDiscovery.logs.enabled }}
|
||||
- name: varlogpods
|
||||
hostPath:
|
||||
path: /var/log/pods
|
||||
{{- if .Values.presets.logsCollection.storeCheckpoints}}
|
||||
- name: varlibotelcol
|
||||
hostPath:
|
||||
path: /var/lib/otelcol
|
||||
type: DirectoryOrCreate
|
||||
{{- end }}
|
||||
- name: varlibdockercontainers
|
||||
hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
{{- end }}
|
||||
{{- if .Values.presets.hostMetrics.enabled }}
|
||||
- name: hostfs
|
||||
hostPath:
|
||||
path: /
|
||||
{{- end }}
|
||||
{{- if .Values.presets.profiling.enabled }}
|
||||
- name: tracefs
|
||||
hostPath:
|
||||
path: /sys/kernel/tracing
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- tpl (toYaml .Values.extraVolumes) . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,128 @@
|
||||
{{- if or (.Values.clusterRole.create) (.Values.presets.kubernetesAttributes.enabled) (.Values.presets.clusterMetrics.enabled) (.Values.presets.kubeletMetrics.enabled) (.Values.presets.kubernetesEvents.enabled) (.Values.presets.kubernetesObjects.enabled) (.Values.presets.annotationDiscovery.logs.enabled) (.Values.presets.annotationDiscovery.metrics.enabled) (and .Values.presets.resourceDetection.enabled .Values.presets.resourceDetection.k8snode.enabled) -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.clusterRoleName" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.clusterRole.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.clusterRole.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- $clusterMetricsEnabled := .Values.presets.clusterMetrics.enabled }}
|
||||
{{- $disableLeaderElectionForClusterMetrics := .Values.presets.clusterMetrics.disableLeaderElection}}
|
||||
{{- $useLeaderElectionForClusterMetrics := and (eq .Values.mode "daemonset") ( $clusterMetricsEnabled ) (not $disableLeaderElectionForClusterMetrics) }}
|
||||
{{- $kubernetesObjectsEnabled := .Values.presets.kubernetesObjects.enabled }}
|
||||
{{- $disableLeaderElectionForKubernetesObjects := .Values.presets.kubernetesObjects.disableLeaderElection }}
|
||||
{{- $useLeaderElectionForKubernetesObjects := and (eq .Values.mode "daemonset") ( $kubernetesObjectsEnabled ) (not $disableLeaderElectionForKubernetesObjects) }}
|
||||
{{- if or $useLeaderElectionForClusterMetrics $useLeaderElectionForKubernetesObjects }}
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get","list","watch","create","update","patch","delete"]
|
||||
{{- end }}
|
||||
{{- if .Values.clusterRole.rules -}}
|
||||
{{ toYaml .Values.clusterRole.rules | nindent 2 -}}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesAttributes.enabled}}
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "namespaces"]
|
||||
verbs: ["get", "watch", "list"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["extensions"]
|
||||
resources: ["replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.clusterMetrics.enabled}}
|
||||
- apiGroups: [""]
|
||||
resources: ["events", "namespaces", "namespaces/status", "nodes", "nodes/spec", "pods", "pods/status", "replicationcontrollers", "replicationcontrollers/status", "resourcequotas", "services" ]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["daemonsets", "deployments", "replicasets", "statefulsets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["extensions"]
|
||||
resources: ["daemonsets", "deployments", "replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs", "cronjobs"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["autoscaling"]
|
||||
resources: ["horizontalpodautoscalers"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end}}
|
||||
{{- if .Values.presets.kubeletMetrics.enabled}}
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes/stats"]
|
||||
verbs: ["get", "watch", "list"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesEvents.enabled }}
|
||||
- apiGroups: ["events.k8s.io"]
|
||||
resources: ["events"]
|
||||
verbs: ["watch", "list"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.enabled }}
|
||||
{{- if .Values.presets.kubernetesObjects.core.enabled }}
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces", "pods", "nodes", "services", "serviceaccounts"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "replicasets", "daemonsets", "statefulsets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs", "cronjobs"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.rbac.enabled }}
|
||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
||||
resources: ["roles", "rolebindings", "clusterroles", "clusterrolebindings"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.storage.enabled }}
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes", "persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.networking.enabled }}
|
||||
- apiGroups: ["networking.k8s.io"]
|
||||
resources: ["ingresses", "networkpolicies"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.autoscaling.enabled }}
|
||||
- apiGroups: ["autoscaling"]
|
||||
resources: ["horizontalpodautoscalers"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- if .Values.presets.kubernetesObjects.autoscaling.vpa.enabled }}
|
||||
- apiGroups: ["autoscaling.k8s.io"]
|
||||
resources: ["verticalpodautoscalers"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.policy.enabled }}
|
||||
- apiGroups: ["policy"]
|
||||
resources: ["poddisruptionbudgets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if .Values.presets.kubernetesObjects.apiExtensions.enabled }}
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.presets.annotationDiscovery.logs.enabled .Values.presets.annotationDiscovery.metrics.enabled }}
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- if and .Values.presets.resourceDetection.enabled .Values.presets.resourceDetection.k8snode.enabled }}
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- if or (.Values.clusterRole.create) (.Values.presets.kubernetesAttributes.enabled) (.Values.presets.clusterMetrics.enabled) (.Values.presets.kubeletMetrics.enabled) (.Values.presets.kubernetesEvents.enabled) (.Values.presets.kubernetesObjects.enabled) (.Values.presets.annotationDiscovery.logs.enabled) (.Values.presets.annotationDiscovery.metrics.enabled) (and .Values.presets.resourceDetection.enabled .Values.presets.resourceDetection.k8snode.enabled) -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.clusterRoleBindingName" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.clusterRole.clusterRoleBinding.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.clusterRole.clusterRoleBinding.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "opentelemetry-collector.clusterRoleName" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "opentelemetry-collector.serviceAccountName" . }}
|
||||
namespace: {{ include "opentelemetry-collector.namespace" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if and (eq .Values.mode "daemonset") (.Values.configMap.create) (not .Values.configMap.existingName) -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}-agent
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
data:
|
||||
relay: |
|
||||
{{- include "opentelemetry-collector.daemonsetConfig" . | nindent 4 -}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if and (eq .Values.mode "statefulset") (.Values.configMap.create) (not .Values.configMap.existingName) -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}-statefulset
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
data:
|
||||
relay: |
|
||||
{{- include "opentelemetry-collector.deploymentConfig" . | nindent 4 -}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if and (eq .Values.mode "deployment") (.Values.configMap.create) (not .Values.configMap.existingName) -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
data:
|
||||
relay: |
|
||||
{{- include "opentelemetry-collector.deploymentConfig" . | nindent 4 -}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{- if eq .Values.mode "daemonset" -}}
|
||||
apiVersion: {{ .Values.apiVersion }}
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}-agent
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 6 }}
|
||||
updateStrategy:
|
||||
{{- if eq .Values.rollout.strategy "RollingUpdate" }}
|
||||
{{- with .Values.rollout.rollingUpdate }}
|
||||
rollingUpdate:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
type: {{ .Values.rollout.strategy }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.enableConfigChecksumAnnotation }}
|
||||
{{- include "opentelemetry-collector.configTemplateChecksumAnnotation" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- include "opentelemetry-collector.podAnnotations" . | nindent 8 }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 8 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 8 }}
|
||||
{{- include "opentelemetry-collector.podLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- $podValues := deepCopy .Values }}
|
||||
{{- $podData := dict "Values" $podValues "configmapSuffix" "-agent" "isAgent" true }}
|
||||
{{- include "opentelemetry-collector.pod" ($podData | mustMergeOverwrite (deepCopy .)) | nindent 6 }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
hostPID: {{ or .Values.hostPID .Values.presets.profiling.enabled }}
|
||||
{{- with .Values.dnsPolicy }}
|
||||
dnsPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,59 @@
|
||||
{{- if eq .Values.mode "deployment" -}}
|
||||
apiVersion: {{ .Values.apiVersion }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and (not .Values.autoscaling.enabled) (.Values.replicaCount) }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 6 }}
|
||||
strategy:
|
||||
{{- if eq .Values.rollout.strategy "RollingUpdate" }}
|
||||
{{- with .Values.rollout.rollingUpdate }}
|
||||
rollingUpdate:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
type: {{ .Values.rollout.strategy }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.enableConfigChecksumAnnotation }}
|
||||
{{- include "opentelemetry-collector.configTemplateChecksumAnnotation" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- include "opentelemetry-collector.podAnnotations" . | nindent 8 }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 8 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 8 }}
|
||||
{{- include "opentelemetry-collector.podLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.dnsPolicy }}
|
||||
dnsPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.schedulerName }}
|
||||
schedulerName: {{ . }}
|
||||
{{- end }}
|
||||
{{- $podValues := deepCopy .Values }}
|
||||
{{- $podData := dict "Values" $podValues "configmapSuffix" "" "isAgent" false }}
|
||||
{{- include "opentelemetry-collector.pod" ($podData | mustMergeOverwrite (deepCopy .)) | nindent 6 }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
hostPID: {{ or .Values.hostPID .Values.presets.profiling.enabled }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if and .Values.externalSecret .Values.externalSecret.enabled -}}
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}-secret
|
||||
spec:
|
||||
dataFrom:
|
||||
- extract:
|
||||
conversionStrategy: Default
|
||||
key: {{ .Values.externalSecret.key }}
|
||||
refreshInterval: 15s
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: {{ .Values.externalSecret.secretStoreRef.name }}
|
||||
target:
|
||||
creationPolicy: Owner
|
||||
deletionPolicy: Retain
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}-secret
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{ range .Values.extraManifests }}
|
||||
---
|
||||
{{ tpl (toYaml .) $ }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,40 @@
|
||||
{{- if and .Values.autoscaling.enabled (or (eq .Values.mode "deployment") (eq .Values.mode "statefulset")) }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: {{ include "opentelemetry-collector.hpaKind" . }}
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
{{- if .Values.autoscaling.behavior }}
|
||||
behavior:
|
||||
{{- toYaml .Values.autoscaling.behavior | nindent 4 }}
|
||||
{{- end }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- with .Values.autoscaling.additionalMetrics }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,55 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $ingresses := prepend .Values.ingress.additionalIngresses .Values.ingress -}}
|
||||
{{- range $ingresses }}
|
||||
apiVersion: "networking.k8s.io/v1"
|
||||
kind: Ingress
|
||||
metadata:
|
||||
{{- if .name }}
|
||||
name: {{ printf "%s-%s" (include "opentelemetry-collector.fullname" $) .name }}
|
||||
{{- else }}
|
||||
name: {{ include "opentelemetry-collector.fullname" $ }}
|
||||
{{- end }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" $ }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" $ | nindent 4 }}
|
||||
{{- include "opentelemetry-collector.component" $ | nindent 4 }}
|
||||
{{- if .annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .ingressClassName }}
|
||||
ingressClassName: {{ .ingressClassName }}
|
||||
{{- end -}}
|
||||
{{- if .tls }}
|
||||
tls:
|
||||
{{- range .tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
{{- with .secretName }}
|
||||
secretName: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .hosts }}
|
||||
- host: {{ tpl .host $ | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "opentelemetry-collector.fullname" $ }}
|
||||
port:
|
||||
number: {{ .port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,39 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: networking.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.networkPolicy.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.networkPolicy.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 6 }}
|
||||
ingress:
|
||||
- ports:
|
||||
{{- range $port := .Values.ports }}
|
||||
{{- if $port.enabled }}
|
||||
- port: {{ $port.containerPort }}
|
||||
protocol: {{ $port.protocol }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.allowIngressFrom }}
|
||||
from:
|
||||
{{- toYaml .Values.networkPolicy.allowIngressFrom | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.extraIngressRules }}
|
||||
{{- toYaml .Values.networkPolicy.extraIngressRules | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.egressRules }}
|
||||
egress:
|
||||
{{- toYaml .Values.networkPolicy.egressRules | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if and .Values.podDisruptionBudget.enabled (or (eq .Values.mode "deployment") (eq .Values.mode "statefulset")) }}
|
||||
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Values.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if and .Values.podMonitor.enabled .Values.podMonitor.metricsEndpoints }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}-agent
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.podMonitor.extraLabels }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 6 }}
|
||||
podMetricsEndpoints:
|
||||
{{- toYaml .Values.podMonitor.metricsEndpoints | nindent 2 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,136 @@
|
||||
{{- if .Values.prometheusRule.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.prometheusRule.extraLabels }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
groups:
|
||||
{{- if .Values.prometheusRule.groups }}
|
||||
{{- toYaml .Values.prometheusRule.groups | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheusRule.defaultRules.enabled }}
|
||||
- name: collectorRules
|
||||
rules:
|
||||
- alert: ReceiverDroppedSpans
|
||||
expr: rate(otelcol_receiver_refused_spans_total[5m]) > 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: critical
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{`The {{ $labels.receiver }} receiver is dropping spans at a rate of {{ humanize $value }} per second `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#receive-failures'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- alert: ReceiverDroppedMetrics
|
||||
expr: rate(otelcol_receiver_refused_metric_points_total[5m]) > 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: critical
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{`The {{ $labels.receiver }} receiver is dropping metrics at a rate of {{ humanize $value }} per second `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#receive-failures'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- alert: ReceiverDroppedLogs
|
||||
expr: rate(otelcol_receiver_refused_log_records_total[5m]) > 0
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{` The {{ $labels.receiver }} is dropping logs at a rate of {{ humanize $value }} per second `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#receive-failures'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- alert: ExporterDroppedSpans
|
||||
expr: rate(otelcol_exporter_send_failed_spans_total[5m]) > 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: critical
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{`The {{ $labels.exporter }} exporter is dropping spans at a rate of {{ humanize $value }} per second `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#receive-failures'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- alert: ExporterDroppedMetrics
|
||||
expr: rate(otelcol_exporter_send_failed_metric_points_total[5m]) > 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: critical
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{`The {{ $labels.exporter }} exporter is dropping metrics at a rate of {{ humanize $value }} per second `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#receive-failures'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- alert: ExporterDroppedLogs
|
||||
expr: rate(otelcol_exporter_send_failed_log_records_total[5m]) > 0
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{` The {{ $labels.exporter }} is dropping logs at a rate of {{ humanize $value }} per second `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#receive-failures'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- alert: ExporterQueueSize
|
||||
expr: otelcol_exporter_queue_size > otelcol_exporter_queue_capacity * 0.8
|
||||
for: 1m
|
||||
labels:
|
||||
severity: warning
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{`The {{ $labels.exporter }} queue has reached a size of {{ $value }} `}}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#queue-length'
|
||||
{{- with .Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- $signals := list "spans" "metric_points" "log_records" }}
|
||||
{{- range $signal := $signals }}
|
||||
- alert: SendQueueFailed{{ $signal }}
|
||||
expr: rate(otelcol_exporter_enqueue_failed_{{ $signal }}_total[5m]) > 0
|
||||
for: 1m
|
||||
labels:
|
||||
severity: warning
|
||||
{{- with $.Values.prometheusRule.defaultRules.additionalRuleLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
description: '{{`The {{ $labels.exporter }} sending queue failed to accept {{ $value }} `}} {{ $signal }}'
|
||||
runbook_url: 'https://opentelemetry.io/docs/collector/internal-telemetry/#queue-length'
|
||||
{{- with $.Values.prometheusRule.defaultRules.additionalRuleAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: ResourceQuota
|
||||
metadata:
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
name: opentelemetry-critical-pods
|
||||
namespace: opentelemetry
|
||||
spec:
|
||||
hard:
|
||||
pods: "15000"
|
||||
scopeSelector:
|
||||
matchExpressions:
|
||||
- operator: In
|
||||
scopeName: PriorityClass
|
||||
values:
|
||||
- system-node-critical
|
||||
- system-cluster-critical
|
||||
@@ -0,0 +1,45 @@
|
||||
{{- if or (eq (include "opentelemetry-collector.serviceEnabled" .) "true") (.Values.ingress.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 4 }}
|
||||
{{- if .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.service.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if .Values.service.trafficDistribution }}
|
||||
trafficDistribution: {{ .Values.service.trafficDistribution }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and .Values.service.loadBalancerSourceRanges (eq .Values.service.type "LoadBalancer") }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- range .Values.service.loadBalancerSourceRanges }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $ports := include "opentelemetry-collector.servicePortsConfig" . }}
|
||||
{{- if $ports }}
|
||||
ports:
|
||||
{{- $ports | nindent 4}}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 4 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 4 }}
|
||||
internalTrafficPolicy: {{ include "opentelemetry-collector.serviceInternalTrafficPolicy" . }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.service.externalTrafficPolicy) }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if or (.Values.serviceAccount.create) (.Values.presets.kubeletMetrics.enabled) (.Values.presets.kubernetesObjects.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.serviceAccountName" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.serviceAccount.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{- if and (eq (include "opentelemetry-collector.serviceEnabled" .) "true") .Values.serviceMonitor.enabled .Values.serviceMonitor.metricsEndpoints }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.serviceMonitor.extraLabels }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.serviceMonitor.sampleLimit }}
|
||||
sampleLimit: {{ . }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 6 }}
|
||||
endpoints:
|
||||
{{- toYaml .Values.serviceMonitor.metricsEndpoints | nindent 4 }}
|
||||
{{- with .Values.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,67 @@
|
||||
{{- if eq .Values.mode "statefulset" -}}
|
||||
apiVersion: {{ .Values.apiVersion }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "opentelemetry-collector.fullname" . }}
|
||||
namespace: {{ template "opentelemetry-collector.namespace" . }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
|
||||
{{- if .Values.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceName: {{ include "opentelemetry-collector.fullname" . }}
|
||||
podManagementPolicy: {{ .Values.statefulset.podManagementPolicy }}
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.persistentVolumeClaimRetentionPolicy.enabled }}
|
||||
persistentVolumeClaimRetentionPolicy:
|
||||
whenDeleted: {{ .Values.statefulset.persistentVolumeClaimRetentionPolicy.whenDeleted }}
|
||||
whenScaled: {{ .Values.statefulset.persistentVolumeClaimRetentionPolicy.whenScaled }}
|
||||
{{- end }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 6 }}
|
||||
updateStrategy:
|
||||
{{- if eq .Values.rollout.strategy "RollingUpdate" }}
|
||||
{{- with .Values.rollout.rollingUpdate }}
|
||||
rollingUpdate:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
type: {{ .Values.rollout.strategy }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.enableConfigChecksumAnnotation }}
|
||||
{{- include "opentelemetry-collector.configTemplateChecksumAnnotation" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- include "opentelemetry-collector.podAnnotations" . | nindent 8 }}
|
||||
labels:
|
||||
{{- include "opentelemetry-collector.selectorLabels" . | nindent 8 }}
|
||||
{{- include "opentelemetry-collector.component" . | nindent 8 }}
|
||||
{{- include "opentelemetry-collector.podLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.dnsPolicy }}
|
||||
dnsPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- $podValues := deepCopy .Values }}
|
||||
{{- $podData := dict "Values" $podValues "configmapSuffix" "-statefulset" "isAgent" false }}
|
||||
{{- include "opentelemetry-collector.pod" ($podData | mustMergeOverwrite (deepCopy .)) | nindent 6 }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
hostPID: {{ or .Values.hostPID .Values.presets.profiling.enabled }}
|
||||
{{- with .Values.statefulset.volumeClaimTemplates }}
|
||||
volumeClaimTemplates:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,815 @@
|
||||
# Default values for opentelemetry-collector.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
# Valid values are "daemonset", "deployment", and "statefulset".
|
||||
mode: ""
|
||||
|
||||
# Override the default apiVersion for custom controllers or for testing new API versions.
|
||||
apiVersion: "apps/v1"
|
||||
|
||||
# Specify which namespace should be used to deploy the resources into
|
||||
namespaceOverride: ""
|
||||
|
||||
# Meesho customization: optionally provision an ExternalSecret (external-secrets.io)
|
||||
# rendered by templates/external-secret.yaml. Disabled by default so consumers that
|
||||
# do not need it (e.g. the daemonset) render without a nil-pointer error.
|
||||
externalSecret:
|
||||
enabled: false
|
||||
key: ""
|
||||
secretStoreRef:
|
||||
name: ""
|
||||
|
||||
# Handles basic configuration of components that
|
||||
# also require k8s modifications to work correctly.
|
||||
# .Values.config can be used to modify/add to a preset
|
||||
# component configuration, but CANNOT be used to remove
|
||||
# preset configuration. If you require removal of any
|
||||
# sections of a preset configuration, you cannot use
|
||||
# the preset. Instead, configure the component manually in
|
||||
# .Values.config and use the other fields supplied in the
|
||||
# values.yaml to configure k8s as necessary.
|
||||
presets:
|
||||
# Configures the collector to collect logs.
|
||||
# Adds the filelog receiver to the logs pipeline
|
||||
# and adds the necessary volumes and volume mounts.
|
||||
# Best used with mode = daemonset.
|
||||
# See https://opentelemetry.io/docs/kubernetes/collector/components/#filelog-receiver for details on the receiver.
|
||||
logsCollection:
|
||||
enabled: false
|
||||
includeCollectorLogs: false
|
||||
# Enabling this writes checkpoints in /var/lib/otelcol/ host directory.
|
||||
# Note this changes collector's user to root, so that it can write to host directory.
|
||||
storeCheckpoints: false
|
||||
# The maximum bytes size of the recombined field.
|
||||
# Once the size exceeds the limit, all received entries of the source will be combined and flushed.
|
||||
maxRecombineLogSize: 102400
|
||||
# Configures the collector to collect host metrics.
|
||||
# Adds the hostmetrics receiver to the metrics pipeline
|
||||
# and adds the necessary volumes and volume mounts.
|
||||
# Best used with mode = daemonset.
|
||||
# See https://opentelemetry.io/docs/kubernetes/collector/components/#host-metrics-receiver for details on the receiver.
|
||||
hostMetrics:
|
||||
enabled: false
|
||||
# Configures the Kubernetes Processor to add Kubernetes metadata.
|
||||
# Adds the k8sattributes processor to all the pipelines
|
||||
# and adds a preset of minimum required RBAC rules to ClusterRole.
|
||||
# Best used with mode = daemonset.
|
||||
# See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor for details on the receiver.
|
||||
kubernetesAttributes:
|
||||
enabled: false
|
||||
# When enabled the processor will extract all labels for an associated pod and add them as resource attributes.
|
||||
# The label's exact name will be the key.
|
||||
extractAllPodLabels: false
|
||||
# When enabled the processor will extract all annotations for an associated pod and add them as resource attributes.
|
||||
# The annotation's exact name will be the key.
|
||||
extractAllPodAnnotations: false
|
||||
# Configures the collector to collect node, pod, and container metrics from the API server on a kubelet.
|
||||
# Adds the kubeletstats receiver to the metrics pipeline
|
||||
# and adds the necessary rules to ClusterRole.
|
||||
# Best used with mode = daemonset.
|
||||
# See https://opentelemetry.io/docs/kubernetes/collector/components/#kubeletstats-receiver for details on the receiver.
|
||||
kubeletMetrics:
|
||||
enabled: false
|
||||
# Configures the collector to collect kubernetes events.
|
||||
# Adds the k8sobjects receiver to the logs pipeline
|
||||
# and collects kubernetes events by default.
|
||||
# Best used with mode = deployment or statefulset.
|
||||
# See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-objects-receiver for details on the receiver.
|
||||
kubernetesEvents:
|
||||
enabled: false
|
||||
# Collects Kubernetes objects via the k8sobjects receiver in pull mode (default interval: 1h).
|
||||
# Can be used with mode = deployment, statefulset, or daemonset.
|
||||
# Compatible with kubernetesEvents preset. Extra resources can be added via
|
||||
# config.receivers.k8sobjects.objects (ClusterRole rules must be added manually via clusterRole.rules).
|
||||
kubernetesObjects:
|
||||
enabled: false
|
||||
# When enabled with mode = daemonset, leader election is setup to prevent telemetry duplication.
|
||||
# disableLeaderElection: false
|
||||
# When enabled, watch mode is added alongside pull to stream real-time changes.
|
||||
watch: false
|
||||
# Core Kubernetes workload resources: pods, nodes, namespaces, services, serviceaccounts, deployments, replicasets, daemonsets, statefulsets, jobs, cronjobs
|
||||
core:
|
||||
enabled: true
|
||||
# RBAC resources: roles, rolebindings, clusterroles, clusterrolebindings
|
||||
rbac:
|
||||
enabled: true
|
||||
# Storage resources: storageclasses, persistentvolumes, persistentvolumeclaims
|
||||
storage:
|
||||
enabled: true
|
||||
# Networking resources: ingresses, networkpolicies
|
||||
networking:
|
||||
enabled: true
|
||||
# Autoscaling resources: horizontalpodautoscalers
|
||||
autoscaling:
|
||||
enabled: true
|
||||
# VPA resources: verticalpodautoscalers (requires VPA CRD to be installed)
|
||||
vpa:
|
||||
enabled: false
|
||||
# Policy resources: poddisruptionbudgets
|
||||
policy:
|
||||
enabled: true
|
||||
# API extensions resources: customresourcedefinitions
|
||||
apiExtensions:
|
||||
enabled: true
|
||||
# Configures the Kubernetes Cluster Receiver to collect cluster-level metrics.
|
||||
# Adds the k8s_cluster receiver to the metrics pipeline
|
||||
# and adds the necessary rules to ClusterRole.
|
||||
# Can be used with mode = deployment, statefulset, or daemonset.
|
||||
# When used as a daemonset, a leader election is setup to prevent duplication
|
||||
# See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-cluster-receiver for details on the receiver.
|
||||
clusterMetrics:
|
||||
enabled: false
|
||||
# When enabled with mode = daemonset, leader election is setup to prevent telemetry duplication.
|
||||
# disableLeaderElection: false
|
||||
# Configures the collector to collect logs and metrics from pods with specific annotations.
|
||||
# This preset can not be used together with the `logsCollection` preset.
|
||||
# Adds the receiver_creator receiver to the logs and metrics pipelines
|
||||
# and adds the necessary rules to ClusterRole.
|
||||
# Best used with mode = daemonset.
|
||||
# See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/receivercreator/README.md#generate-receiver-configurations-from-provided-hints for details on the receiver.
|
||||
annotationDiscovery:
|
||||
logs:
|
||||
enabled: false
|
||||
metrics:
|
||||
enabled: false
|
||||
# Configures the collector to collect profiling data.
|
||||
# Adds profiles pipeline with the profiling receiver,
|
||||
# and adds the necessary volumes, security context and host PID access.
|
||||
#
|
||||
# Warning: The profiling receiver requires privileged access and hostPID,
|
||||
# so it should be used with a dedicated collector distribution (e.g. otelcol-ebpf-profiler)
|
||||
# rather than the general-purpose k8s distribution. This avoids granting elevated privileges
|
||||
# to the same collector that handles metrics, traces, and logs.
|
||||
# See https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-ebpf-profiler for more details.
|
||||
profiling:
|
||||
enabled: false
|
||||
|
||||
# Configures the collector to detect resource attributes using the resourcedetection processor.
|
||||
# Adds the resourcedetection/env processor to all pipelines.
|
||||
# Each detector can be enabled individually. Base detectors 'env' and 'k8snode' are always included when any detector is enabled.
|
||||
# Typically used to resolve the 'k8s.cluster.name' resource attribute.
|
||||
# See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor for details.
|
||||
resourceDetection:
|
||||
enabled: false
|
||||
env:
|
||||
enabled: true
|
||||
k8snode:
|
||||
enabled: true
|
||||
eks:
|
||||
enabled: false
|
||||
aks:
|
||||
enabled: false
|
||||
gcp:
|
||||
enabled: false
|
||||
|
||||
configMap:
|
||||
# Specifies whether a configMap should be created (true by default)
|
||||
create: true
|
||||
# Specifies an existing ConfigMap to be mounted to the pod
|
||||
# The ConfigMap MUST include the collector configuration via a key named 'relay' or the collector will not start.
|
||||
# This also supports template content, which will eventually be converted to yaml.
|
||||
existingName: ""
|
||||
# Specifies the relative path to custom ConfigMap template file. This option SHOULD be used when bundling a custom
|
||||
# ConfigMap template, as it enables pod restart via a template checksum annotation.
|
||||
# existingPath: ""
|
||||
|
||||
# When enabled, the chart will configure the collector to emit its traces, metrics, and logs over http via the OTLP using the Otel Go SDK.
|
||||
# If internalTelemetryViaOTLP.metrics.enabled the chart will remove the default prometheus receiver (which was configured to scrape the Collector's metrics)
|
||||
# and the service.telemetry.metrics.address value.
|
||||
# Learn more about the Collector telemetry at https://opentelemetry.io/docs/collector/internal-telemetry/.
|
||||
#
|
||||
# THIS OPTION IS EXPERIMENTAL AND SUBJECT TO BREAKING CHANGES
|
||||
internalTelemetryViaOTLP:
|
||||
# The endpoint where the telemetry will be exported
|
||||
endpoint: ""
|
||||
# Optional headers to configure the exporters
|
||||
headers: []
|
||||
# - name: "x-dest-auth"
|
||||
# value: "some auth key"
|
||||
traces:
|
||||
enabled: false
|
||||
# overrides internalTelemetryViaOTLP.endpoint for traces
|
||||
endpoint: ""
|
||||
# overrides internalTelemetryViaOTLP.headers for traces
|
||||
headers: []
|
||||
metrics:
|
||||
enabled: false
|
||||
# overrides internalTelemetryViaOTLP.endpoint for metrics
|
||||
endpoint: ""
|
||||
# overrides internalTelemetryViaOTLP.headers for metrics
|
||||
headers: []
|
||||
logs:
|
||||
enabled: false
|
||||
# overrides internalTelemetryViaOTLP.endpoint for logs
|
||||
endpoint: ""
|
||||
# overrides internalTelemetryViaOTLP.headers for logs
|
||||
headers: []
|
||||
|
||||
# Base collector configuration.
|
||||
# Supports templating. To escape existing instances of {{ }}, use {{` <original content> `}}.
|
||||
# For example, {{ REDACTED_EMAIL }} becomes {{` {{ REDACTED_EMAIL }} `}}.
|
||||
config:
|
||||
exporters:
|
||||
debug: {}
|
||||
extensions:
|
||||
# The health_check extension is mandatory for this chart.
|
||||
# Without the health_check extension the collector will fail the readiness and liveness probes.
|
||||
# The health_check extension can be modified, but should never be removed.
|
||||
health_check:
|
||||
endpoint: ${env:MY_POD_IP}:13133
|
||||
processors:
|
||||
batch: {}
|
||||
# Default memory limiter configuration for the collector based on k8s resource limits.
|
||||
memory_limiter:
|
||||
# check_interval is the time between measurements of memory usage.
|
||||
check_interval: 5s
|
||||
# By default limit_mib is set to 80% of ".Values.resources.limits.memory"
|
||||
limit_percentage: 80
|
||||
# By default spike_limit_mib is set to 25% of ".Values.resources.limits.memory"
|
||||
spike_limit_percentage: 25
|
||||
receivers:
|
||||
jaeger:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: ${env:MY_POD_IP}:14250
|
||||
thrift_http:
|
||||
endpoint: ${env:MY_POD_IP}:14268
|
||||
thrift_compact:
|
||||
endpoint: ${env:MY_POD_IP}:6831
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: ${env:MY_POD_IP}:4317
|
||||
http:
|
||||
endpoint: ${env:MY_POD_IP}:4318
|
||||
# if internalTelemetryViaOTLP.metrics.enabled = true, prometheus receiver will be removed
|
||||
prometheus:
|
||||
config:
|
||||
scrape_configs:
|
||||
- job_name: opentelemetry-collector
|
||||
scrape_interval: 10s
|
||||
static_configs:
|
||||
- targets:
|
||||
- ${env:MY_POD_IP}:8888
|
||||
zipkin:
|
||||
endpoint: ${env:MY_POD_IP}:9411
|
||||
service:
|
||||
telemetry:
|
||||
resource:
|
||||
k8s.namespace.name: "${env:OTEL_K8S_NAMESPACE}"
|
||||
k8s.node.name: "${env:OTEL_K8S_NODE_NAME}"
|
||||
k8s.node.ip: "${env:OTEL_K8S_NODE_IP}"
|
||||
k8s.pod.name: "${env:OTEL_K8S_POD_NAME}"
|
||||
k8s.pod.ip: "${env:OTEL_K8S_POD_IP}"
|
||||
host.name: "${env:OTEL_K8S_NODE_NAME}"
|
||||
metrics:
|
||||
readers:
|
||||
- pull:
|
||||
exporter:
|
||||
prometheus:
|
||||
host: ${env:MY_POD_IP}
|
||||
port: 8888
|
||||
extensions:
|
||||
- health_check
|
||||
pipelines:
|
||||
logs:
|
||||
exporters:
|
||||
- debug
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
metrics:
|
||||
exporters:
|
||||
- debug
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
# if internalTelemetryViaOTLP.metrics.enabled = true, prometheus receiver will be removed
|
||||
- prometheus
|
||||
traces:
|
||||
exporters:
|
||||
- debug
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
- jaeger
|
||||
- zipkin
|
||||
|
||||
# Helm currently has an issue (https://github.com/helm/helm/pull/12879) when using null to remove
|
||||
# default configuration from a subchart. The result is that you cannot remove default configuration
|
||||
# from `config`, such as a specific receiver or a specific pipeline, when the chart is used as a
|
||||
# subchart.
|
||||
#
|
||||
# Until the helm bug is fixed, this field is provided as an alternative when using this chart as a subchart.
|
||||
# It is not recommended to use this field when installing the chart directly.
|
||||
#
|
||||
# When not empty, `alternateConfig` will be used to set the collector's configuration. It has NO default
|
||||
# values and IS NOT MERGED with config. Any configuration provided via `config` will be ignored when
|
||||
# `alternateConfig` is set. You MUST provide your own collector configuration.
|
||||
#
|
||||
# Reminder that the healthcheck extension (or something else that provides the same functionality) is required.
|
||||
#
|
||||
# Components configured by presets will be injected in the same way they are for `config`.
|
||||
alternateConfig: {}
|
||||
|
||||
image:
|
||||
# If you want to use the core image `otel/opentelemetry-collector`, you also need to change `command.name` value to `otelcol`.
|
||||
repository: ""
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
# When digest is set to a non-empty value, images will be pulled by digest (regardless of tag value).
|
||||
digest: ""
|
||||
imagePullSecrets: []
|
||||
|
||||
# OpenTelemetry Collector executable
|
||||
command:
|
||||
name: ""
|
||||
extraArgs: []
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
# Automatically mount a ServiceAccount's API credentials?
|
||||
automountServiceAccountToken: true
|
||||
|
||||
clusterRole:
|
||||
# Specifies whether a clusterRole should be created
|
||||
# Some presets also trigger the creation of a cluster role and cluster role binding.
|
||||
# If using one of those presets, this field is no-op.
|
||||
create: false
|
||||
# Annotations to add to the clusterRole
|
||||
# Can be used in combination with presets that create a cluster role.
|
||||
annotations: {}
|
||||
# The name of the clusterRole to use.
|
||||
# If not set a name is generated using the fullname template
|
||||
# Can be used in combination with presets that create a cluster role.
|
||||
name: ""
|
||||
# A set of rules as documented here : https://kubernetes.io/docs/reference/access-authn-authz/rbac/
|
||||
# Can be used in combination with presets that create a cluster role to add additional rules.
|
||||
rules: []
|
||||
# - apiGroups:
|
||||
# - ''
|
||||
# resources:
|
||||
# - 'pods'
|
||||
# - 'nodes'
|
||||
# verbs:
|
||||
# - 'get'
|
||||
# - 'list'
|
||||
# - 'watch'
|
||||
|
||||
clusterRoleBinding:
|
||||
# Annotations to add to the clusterRoleBinding
|
||||
# Can be used in combination with presets that create a cluster role binding.
|
||||
annotations: {}
|
||||
# The name of the clusterRoleBinding to use.
|
||||
# If not set a name is generated using the fullname template
|
||||
# Can be used in combination with presets that create a cluster role binding.
|
||||
name: ""
|
||||
|
||||
podSecurityContext: {}
|
||||
securityContext: {}
|
||||
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
topologySpreadConstraints: []
|
||||
|
||||
# Allows for pod scheduler prioritisation
|
||||
priorityClassName: ""
|
||||
|
||||
# Allows for pod to use a specific runtime class, e.g. gvisor, kata-containers
|
||||
# Also useful for the pod security admissions plugins that rely on runtimeClassName
|
||||
runtimeClassName: ""
|
||||
|
||||
terminationGracePeriodSeconds: 30
|
||||
|
||||
extraEnvs: []
|
||||
extraEnvsFrom: []
|
||||
# This also supports template content, which will eventually be converted to yaml.
|
||||
extraVolumes: []
|
||||
|
||||
# This also supports template content, which will eventually be converted to yaml.
|
||||
extraVolumeMounts: []
|
||||
|
||||
# This also supports template content, which will eventually be converted to yaml.
|
||||
extraManifests: []
|
||||
|
||||
# Configuration for ports
|
||||
# nodePort is also allowed
|
||||
ports:
|
||||
otlp:
|
||||
enabled: true
|
||||
containerPort: 4317
|
||||
servicePort: 4317
|
||||
hostPort: 4317
|
||||
protocol: TCP
|
||||
# nodePort: 30317
|
||||
appProtocol: grpc
|
||||
otlp-http:
|
||||
enabled: true
|
||||
containerPort: 4318
|
||||
servicePort: 4318
|
||||
hostPort: 4318
|
||||
protocol: TCP
|
||||
jaeger-compact:
|
||||
enabled: true
|
||||
containerPort: 6831
|
||||
servicePort: 6831
|
||||
hostPort: 6831
|
||||
protocol: UDP
|
||||
jaeger-thrift:
|
||||
enabled: true
|
||||
containerPort: 14268
|
||||
servicePort: 14268
|
||||
hostPort: 14268
|
||||
protocol: TCP
|
||||
jaeger-grpc:
|
||||
enabled: true
|
||||
containerPort: 14250
|
||||
servicePort: 14250
|
||||
hostPort: 14250
|
||||
protocol: TCP
|
||||
zipkin:
|
||||
enabled: true
|
||||
containerPort: 9411
|
||||
servicePort: 9411
|
||||
hostPort: 9411
|
||||
protocol: TCP
|
||||
metrics:
|
||||
# The metrics port is disabled by default. However you need to enable the port
|
||||
# in order to use the ServiceMonitor (serviceMonitor.enabled) or PodMonitor (podMonitor.enabled).
|
||||
enabled: false
|
||||
containerPort: 8888
|
||||
servicePort: 8888
|
||||
protocol: TCP
|
||||
|
||||
# When enabled, the chart will set the GOMEMLIMIT env var to 80% of the configured resources.limits.memory.
|
||||
# If no resources.limits.memory are defined then enabling does nothing.
|
||||
# It is HIGHLY recommend to enable this setting and set a value for resources.limits.memory.
|
||||
useGOMEMLIMIT: true
|
||||
|
||||
# Container resize policy for in-place resource resize (Kubernetes >= 1.27).
|
||||
# https://kubernetes.io/docs/concepts/workloads/autoscaling/#in-place-resizing
|
||||
resizePolicy: []
|
||||
# resizePolicy:
|
||||
# - resourceName: cpu
|
||||
# restartPolicy: NotRequired
|
||||
# - resourceName: memory
|
||||
# restartPolicy: RestartContainer
|
||||
|
||||
# Resource limits & requests.
|
||||
# It is HIGHLY recommended to set resource limits.
|
||||
resources: {}
|
||||
# resources:
|
||||
# limits:
|
||||
# cpu: 250m
|
||||
# memory: 512Mi
|
||||
|
||||
enableConfigChecksumAnnotation: true
|
||||
podAnnotations: {}
|
||||
|
||||
podLabels: {}
|
||||
|
||||
# Common labels to add to all otel-collector resources. Evaluated as a template.
|
||||
additionalLabels: {}
|
||||
# app.kubernetes.io/part-of: my-app
|
||||
|
||||
# Host networking requested for this pod. Use the host's network namespace.
|
||||
hostNetwork: false
|
||||
|
||||
# Enable sharing the host's PID namespace with the pod.
|
||||
# WARNING: This grants visibility into all host processes and should only be enabled when required.
|
||||
hostPID: false
|
||||
|
||||
# Adding entries to Pod /etc/hosts with HostAliases
|
||||
# https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/
|
||||
hostAliases: []
|
||||
# - ip: "1.2.3.4"
|
||||
# hostnames:
|
||||
# - "my.host.com"
|
||||
|
||||
# Pod DNS policy ClusterFirst, ClusterFirstWithHostNet, None, Default, None
|
||||
dnsPolicy: ""
|
||||
|
||||
# Custom DNS config. Required when DNS policy is None.
|
||||
dnsConfig: {}
|
||||
|
||||
# Custom kube scheduler name.
|
||||
schedulerName: ""
|
||||
|
||||
# only used with deployment mode
|
||||
replicaCount: 1
|
||||
|
||||
revisionHistoryLimit: 10
|
||||
|
||||
annotations: {}
|
||||
|
||||
# List of extra sidecars to add.
|
||||
# This also supports template content, which will eventually be converted to yaml.
|
||||
extraContainers: []
|
||||
# extraContainers:
|
||||
# - name: test
|
||||
# command:
|
||||
# - cp
|
||||
# args:
|
||||
# - /bin/sleep
|
||||
# - /test/sleep
|
||||
# image: busybox:latest
|
||||
# volumeMounts:
|
||||
# - name: test
|
||||
# mountPath: /test
|
||||
|
||||
# List of init container specs, e.g. for copying a binary to be executed as a lifecycle hook.
|
||||
# This also supports template content, which will eventually be converted to yaml.
|
||||
# Another usage of init containers is e.g. initializing filesystem permissions to the OTLP Collector user `10001` in case you are using persistence and the volume is producing a permission denied error for the OTLP Collector container.
|
||||
initContainers: []
|
||||
# initContainers:
|
||||
# - name: test
|
||||
# image: busybox:latest
|
||||
# command:
|
||||
# - cp
|
||||
# args:
|
||||
# - /bin/sleep
|
||||
# - /test/sleep
|
||||
# volumeMounts:
|
||||
# - name: test
|
||||
# mountPath: /test
|
||||
# - name: init-fs
|
||||
# image: busybox:latest
|
||||
# command:
|
||||
# - sh
|
||||
# - '-c'
|
||||
# - 'chown -R 10001: /var/lib/storage/otc' # use the path given as per `extensions.file_storage.directory` & `extraVolumeMounts[x].mountPath`
|
||||
# volumeMounts:
|
||||
# - name: opentelemetry-collector-data # use the name of the volume used for persistence
|
||||
# mountPath: /var/lib/storage/otc # use the path given as per `extensions.file_storage.directory` & `extraVolumeMounts[x].mountPath`
|
||||
|
||||
# Pod lifecycle policies.
|
||||
lifecycleHooks: {}
|
||||
# lifecycleHooks:
|
||||
# preStop:
|
||||
# exec:
|
||||
# command:
|
||||
# - /test/sleep
|
||||
# - "5"
|
||||
|
||||
# liveness probe configuration
|
||||
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
||||
##
|
||||
livenessProbe:
|
||||
# Number of seconds after the container has started before startup, liveness or readiness probes are initiated.
|
||||
# initialDelaySeconds: 1
|
||||
# How often in seconds to perform the probe.
|
||||
# periodSeconds: 10
|
||||
# Number of seconds after which the probe times out.
|
||||
# timeoutSeconds: 1
|
||||
# Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
||||
# failureThreshold: 1
|
||||
# Duration in seconds the pod needs to terminate gracefully upon probe failure.
|
||||
# terminationGracePeriodSeconds: 10
|
||||
httpGet:
|
||||
port: 13133
|
||||
path: /
|
||||
|
||||
# readiness probe configuration
|
||||
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
||||
##
|
||||
readinessProbe:
|
||||
# Number of seconds after the container has started before startup, liveness or readiness probes are initiated.
|
||||
# initialDelaySeconds: 1
|
||||
# How often (in seconds) to perform the probe.
|
||||
# periodSeconds: 10
|
||||
# Number of seconds after which the probe times out.
|
||||
# timeoutSeconds: 1
|
||||
# Minimum consecutive successes for the probe to be considered successful after having failed.
|
||||
# successThreshold: 1
|
||||
# Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
||||
# failureThreshold: 1
|
||||
httpGet:
|
||||
port: 13133
|
||||
path: /
|
||||
|
||||
# startup probe configuration
|
||||
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
||||
##
|
||||
startupProbe: {}
|
||||
# Number of seconds after the container has started before startup probes are initiated.
|
||||
# initialDelaySeconds: 1
|
||||
# How often in seconds to perform the probe.
|
||||
# periodSeconds: 10
|
||||
# Number of seconds after which the probe times out.
|
||||
# timeoutSeconds: 1
|
||||
# Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
||||
# failureThreshold: 1
|
||||
# Duration in seconds the pod needs to terminate gracefully upon probe failure.
|
||||
# terminationGracePeriodSeconds: 10
|
||||
# httpGet:
|
||||
# port: 13133
|
||||
# path: /
|
||||
|
||||
service:
|
||||
# Enable the creation of a Service.
|
||||
# By default, it's enabled on mode != daemonset.
|
||||
# However, to enable it on mode = daemonset, its creation must be explicitly enabled
|
||||
# enabled: true
|
||||
|
||||
type: ClusterIP
|
||||
# Supported values: PreferClose (deprecated in K8s 1.33+), PreferSameZone, PreferSameNode
|
||||
# trafficDistribution: PreferClose
|
||||
# type: LoadBalancer
|
||||
# loadBalancerIP: 1.2.3.4
|
||||
# loadBalancerSourceRanges: []
|
||||
|
||||
# By default, Service of type 'LoadBalancer' will be created setting 'externalTrafficPolicy: Cluster'
|
||||
# unless other value is explicitly set.
|
||||
# Possible values are Cluster or Local (https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip)
|
||||
# externalTrafficPolicy: Cluster
|
||||
|
||||
annotations: {}
|
||||
|
||||
# By default, Service will be created setting 'internalTrafficPolicy: Local' on mode = daemonset
|
||||
# unless other value is explicitly set.
|
||||
# Setting 'internalTrafficPolicy: Cluster' on a daemonset is not recommended
|
||||
# internalTrafficPolicy: Cluster
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
# annotations: {}
|
||||
# ingressClassName: nginx
|
||||
# hosts:
|
||||
# - host: collector.example.com
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# port: 4318
|
||||
# tls:
|
||||
# - secretName: collector-tls
|
||||
# hosts:
|
||||
# - collector.example.com
|
||||
|
||||
# Additional ingresses - only created if ingress.enabled is true
|
||||
# Useful for when differently annotated ingress services are required
|
||||
# Each additional ingress needs key "name" set to something unique
|
||||
additionalIngresses: []
|
||||
# - name: cloudwatch
|
||||
# ingressClassName: nginx
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - host: collector.example.com
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# port: 4318
|
||||
# tls:
|
||||
# - secretName: collector-tls
|
||||
# hosts:
|
||||
# - collector.example.com
|
||||
|
||||
podMonitor:
|
||||
# The pod monitor by default scrapes the metrics port.
|
||||
# The metrics port needs to be enabled as well.
|
||||
enabled: false
|
||||
metricsEndpoints:
|
||||
- port: metrics
|
||||
# interval: 15s
|
||||
|
||||
# additional labels for the PodMonitor
|
||||
extraLabels: {}
|
||||
# release: kube-prometheus-stack
|
||||
|
||||
serviceMonitor:
|
||||
# The service monitor by default scrapes the metrics port.
|
||||
# The metrics port needs to be enabled as well.
|
||||
enabled: false
|
||||
metricsEndpoints:
|
||||
- port: metrics
|
||||
# interval: 15s
|
||||
|
||||
# additional labels for the ServiceMonitor
|
||||
extraLabels: {}
|
||||
# release: kube-prometheus-stack
|
||||
# Used to set relabeling and metricRelabeling configs on the ServiceMonitor
|
||||
# https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
|
||||
relabelings: []
|
||||
metricRelabelings: []
|
||||
# Sets a sample limit on the ServiceMonitor
|
||||
sampleLimit: 0
|
||||
|
||||
# PodDisruptionBudget is used only if mode is "deployment" or "statefulset"
|
||||
podDisruptionBudget:
|
||||
enabled: false
|
||||
# minAvailable: 2
|
||||
# maxUnavailable: 1
|
||||
|
||||
# autoscaling is used only if mode is "deployment" or "statefulset"
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
behavior: {}
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
# Supply an array of custom metrics to be used for autoscaling. It includes externalMetrics, objectMetrics, and podsMetrics.
|
||||
additionalMetrics: []
|
||||
|
||||
rollout:
|
||||
rollingUpdate: {}
|
||||
# When 'mode: daemonset', maxSurge cannot be used when hostPort is set for any of the ports
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 0
|
||||
strategy: RollingUpdate
|
||||
|
||||
prometheusRule:
|
||||
enabled: false
|
||||
groups: []
|
||||
# Create default rules for monitoring the collector
|
||||
defaultRules:
|
||||
enabled: false
|
||||
## Additional labels for PrometheusRule alerts
|
||||
additionalRuleLabels: {}
|
||||
## Additional annotations for PrometheusRule alerts
|
||||
additionalRuleAnnotations: {}
|
||||
|
||||
# additional labels for the PrometheusRule
|
||||
extraLabels: {}
|
||||
|
||||
statefulset:
|
||||
# volumeClaimTemplates for a statefulset
|
||||
volumeClaimTemplates: []
|
||||
podManagementPolicy: "Parallel"
|
||||
# Controls if and how PVCs created by the StatefulSet are deleted. Available in Kubernetes 1.23+.
|
||||
persistentVolumeClaimRetentionPolicy:
|
||||
enabled: false
|
||||
whenDeleted: Retain
|
||||
whenScaled: Retain
|
||||
|
||||
networkPolicy:
|
||||
enabled: false
|
||||
|
||||
# Annotations to add to the NetworkPolicy
|
||||
annotations: {}
|
||||
|
||||
# Configure the 'from' clause of the NetworkPolicy.
|
||||
# By default this will restrict traffic to ports enabled for the Collector. If
|
||||
# you wish to further restrict traffic to other hosts or specific namespaces,
|
||||
# see the standard NetworkPolicy 'spec.ingress.from' definition for more info:
|
||||
# https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/
|
||||
allowIngressFrom: []
|
||||
# # Allow traffic from any pod in any namespace, but not external hosts
|
||||
# - namespaceSelector: {}
|
||||
# # Allow external access from a specific cidr block
|
||||
# - ipBlock:
|
||||
# cidr: 192.168.1.64/32
|
||||
# # Allow access from pods in specific namespaces
|
||||
# - namespaceSelector:
|
||||
# matchExpressions:
|
||||
# - key: kubernetes.io/metadata.name
|
||||
# operator: In
|
||||
# values:
|
||||
# - "cats"
|
||||
# - "dogs"
|
||||
|
||||
# Add additional ingress rules to specific ports
|
||||
# Useful to allow external hosts/services to access specific ports
|
||||
# An example is allowing an external prometheus server to scrape metrics
|
||||
#
|
||||
# See the standard NetworkPolicy 'spec.ingress' definition for more info:
|
||||
# https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/
|
||||
extraIngressRules: []
|
||||
# - ports:
|
||||
# - port: metrics
|
||||
# protocol: TCP
|
||||
# from:
|
||||
# - ipBlock:
|
||||
# cidr: 192.168.1.64/32
|
||||
|
||||
# Restrict egress traffic from the OpenTelemetry collector pod
|
||||
# See the standard NetworkPolicy 'spec.egress' definition for more info:
|
||||
# https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/
|
||||
egressRules: []
|
||||
# - to:
|
||||
# - namespaceSelector: {}
|
||||
# - ipBlock:
|
||||
# cidr: 192.168.10.10/24
|
||||
# ports:
|
||||
# - port: 1234
|
||||
# protocol: TCP
|
||||
|
||||
# Allow containers to share processes across pod namespace
|
||||
shareProcessNamespace: false
|
||||
Reference in New Issue
Block a user