Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: enable forwarder daemonset by default #313

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ permissions:
env:
TF_VAR_observe_url: ${{secrets.OBSERVE_URL}}
TF_VAR_observe_token: ${{secrets.OBSERVE_TOKEN}}
TF_VAR_trace_token: ${{secrets.OBSERVE_TOKEN}}
TF_VAR_helm_chart_agent_test_release_name: helm-charts-agent-gha-integration-tests


Expand Down
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: agent
description: Chart to install K8s collection stack based on Observe Agent
type: application
version: 0.40.0
version: 0.41.0
appVersion: "1.1.0"
dependencies:
- name: opentelemetry-collector
Expand Down
4 changes: 2 additions & 2 deletions charts/agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agent

![Version: 0.40.0](https://img.shields.io/badge/Version-0.40.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
![Version: 0.41.0](https://img.shields.io/badge/Version-0.41.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)

> [!CAUTION]
> This chart is under active development and is not meant to be installed yet.
Expand Down Expand Up @@ -439,7 +439,7 @@ Chart to install K8s collection stack based on Observe Agent
| node.containers.metrics.enabled | bool | `true` | |
| node.containers.metrics.interval | string | `"60s"` | |
| node.enabled | bool | `true` | |
| node.forwarder.enabled | bool | `false` | |
| node.forwarder.enabled | bool | `true` | |
| node.forwarder.logs.enabled | bool | `true` | |
| node.forwarder.metrics.enabled | bool | `true` | |
| node.forwarder.traces.enabled | bool | `true` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ node:
enabled: true
interval: 60s
forwarder:
enabled: false
enabled: true
traces:
enabled: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion examples/agent/additionalOTELConfiguration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This example shows how to inject additional OTEL Config to the Observe Agent(s) that are running in the deployments and daemonsets. The additional config can add new instances of components such as receivers, processors, and exporters as well as to define new pipelines using those components. In addition, new pipelines can also use existing components from the default config.

## Values.yaml
In the helm chart, there are 3 deployments of Observe Agent and 1 daemonset. Each of these can have additional config injected. Each service has a corresponding field `agent.config.<service>` where the additional config can be added. The value of this field is a valid OTEL configuration in yaml format. The example values.yaml provided shows where custom OTEL config can be added for each of the four services.
In the helm chart, there are 3 deployments of Observe Agent and 2 daemonsets. Each of these can have additional config injected. Each service has a corresponding field `agent.config.<service>` where the additional config can be added. The value of this field is a valid OTEL configuration in yaml format. The example values.yaml provided shows where custom OTEL config can be added for each of the four services.

## Config Overriding
When provided, the custom config for each service will be merged with the existing default config with precedence given to the custom config. This means that if a component is defined in both the default and custom config, the instance defined in the custom config will override the default instance. Otherwise, the two configs are merged and all components and pipelines defined in either will be present in the final resolved config. Generally, the existing default components shouldn't need to be overwritten as they can be disabled from the top level `values.yaml` config as well.
Expand Down
1 change: 1 addition & 0 deletions integration/modules/deploy_helm/helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resource "helm_release" "observe-agent" {
{
observe_url = var.observe_url,
observe_token = var.observe_token,
trace_token = var.observe_token,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If trace token is now becoming part of default helm deployment, it needs to be defined in this file
https://github.com/observeinc/helm-charts/blob/main/integration/modules/deploy_helm/variables.tf

Not sure why its specifically showing the "observe" namespace error but my guess is that it has to do something with this variable (or default) not being defined. Terraform plan is probably borked and the tftests don't really do plan/apply verbose like regular terraform

helm_chart_agent_test_namespace = var.helm_chart_agent_test_namespace
})
]
Expand Down
5 changes: 5 additions & 0 deletions integration/modules/deploy_helm/values/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ observe:
token:
create: true
value: ${observe_token}
traceToken:
create: true
value: ${trace_token}
cluster:
namespaceOverride:
value: ${helm_chart_agent_test_namespace}
Expand All @@ -25,3 +28,5 @@ node-logs-metrics:
namespaceOverride: ${helm_chart_agent_test_namespace}
monitor:
namespaceOverride: ${helm_chart_agent_test_namespace}
forwarder:
namespaceOverride: ${helm_chart_agent_test_namespace}
5 changes: 5 additions & 0 deletions integration/modules/deploy_helm/values/node_affinity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ observe:
token:
create: true
value: ${observe_token}
traceToken:
create: true
value: ${trace_token}
cluster:
namespaceOverride:
value: ${helm_chart_agent_test_namespace}
Expand All @@ -38,3 +41,5 @@ node-logs-metrics:
namespaceOverride: ${helm_chart_agent_test_namespace}
monitor:
namespaceOverride: ${helm_chart_agent_test_namespace}
forwarder:
namespaceOverride: ${helm_chart_agent_test_namespace}
5 changes: 5 additions & 0 deletions integration/modules/deploy_helm/values/node_taint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ observe:
token:
create: true
value: ${observe_token}
traceToken:
create: true
value: ${trace_token}
cluster:
namespaceOverride:
value: ${helm_chart_agent_test_namespace}
Expand All @@ -30,3 +33,5 @@ node-logs-metrics:
namespaceOverride: ${helm_chart_agent_test_namespace}
monitor:
namespaceOverride: ${helm_chart_agent_test_namespace}
forwarder:
namespaceOverride: ${helm_chart_agent_test_namespace}
4 changes: 2 additions & 2 deletions integration/scripts/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"node_taint.yaml")
def test_helm_correctness(apps_client, helm_config):
"""
Test to verify there are 3 deployments and 1 daemonset in the cluster.
Test to verify there are 3 deployments and 2 daemonsets in the cluster.
"""
# Retrieve the deployments in the specified namespace
print(f"Checking Deployments in namespace: {helm_config['namespace']}")
Expand All @@ -21,7 +21,7 @@ def test_helm_correctness(apps_client, helm_config):
# Retrieve the daemonsets in the specified namespace
print(f"Checking Daemonsets in namespace: {helm_config['namespace']}")
daemonsets = apps_client.list_namespaced_daemon_set(namespace=helm_config['namespace']).items
assert len(daemonsets) == 1, f"Expected 1 daemonset in namespace '{helm_config['namespace']}', but found {len(daemonsets)}"
assert len(daemonsets) == 2, f"Expected 2 daemonsets in namespace '{helm_config['namespace']}', but found {len(daemonsets)}"

print("All expected deployments and daemonsets found.")

Expand Down