Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Include ports for networkpolicy or ciliumnetworkpolicy for OTLP ingest #1550

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Datadog changelog

## 3.73.4
* Added ports for gRPC and HTTP OTLP ingest in NetworkPolicy and CiliumNetworkPolicy when `datadog.networkPolicy.create` and `datadog.networkPolicy.flavor` are configured respectively as `"kubernetes"` or `"cilium"`.

## 3.73.3

* Fix a few typos on OTel Agent configs.
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 3.73.3
version: 3.73.4
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.73.3](https://img.shields.io/badge/Version-3.73.3-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.73.4](https://img.shields.io/badge/Version-3.73.4-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)

[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).

Expand Down
32 changes: 32 additions & 0 deletions charts/datadog/templates/agent-cilium-network-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,38 @@ specs:
- port: "{{ $.Values.datadog.apm.port }}"
protocol: TCP
{{- end }}
{{- if .Values.datadog.otlp.receiver.protocols.grpc.enabled }}
- description: "Ingress for gRPC OTLP"
endpointSelector:
matchLabels:
app: {{ template "datadog.fullname" . }}
{{- if .Values.agents.podLabels }}
{{ toYaml .Values.agents.podLabels | indent 8 }}
{{- end }}
ingress:
- fromEndpoints:
- {}
toPorts:
- ports:
- port: "{{ .Values.datadog.otlp.receiver.protocols.grpc.endpoint | regexFind ":[0-9]+$" | trimPrefix ":" }}"
protocol: TCP
{{- end }}
{{- if .Values.datadog.otlp.receiver.protocols.http.enabled }}
- description: "Ingress for HTTP OTLP"
endpointSelector:
matchLabels:
app: {{ template "datadog.fullname" . }}
{{- if .Values.agents.podLabels }}
{{ toYaml .Values.agents.podLabels | indent 8 }}
{{- end }}
ingress:
- fromEndpoints:
- {}
toPorts:
- ports:
- port: "{{ .Values.datadog.otlp.receiver.protocols.http.endpoint | regexFind ":[0-9]+$" | trimPrefix ":" }}"
protocol: TCP
{{- end }}
# The agents are susceptible to an issue connecting to any pod that
# is annotated with auto-discovery annotations.
#
Expand Down
12 changes: 12 additions & 0 deletions charts/datadog/templates/agent-network-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ spec:
ports:
- port: {{ $.Values.datadog.apm.port }}
protocol: TCP
{{- end }}
{{- if .Values.datadog.otlp.receiver.protocols.grpc.enabled }}
- # Ingress for gRPC OTLP
ports:
- port: {{ .Values.datadog.otlp.receiver.protocols.grpc.endpoint | regexFind ":[0-9]+$" | trimPrefix ":" }}
protocol: TCP
{{- end }}
{{- if .Values.datadog.otlp.receiver.protocols.http.enabled }}
- # Ingress for HTTP OTLP
ports:
- port: {{ .Values.datadog.otlp.receiver.protocols.http.endpoint | regexFind ":[0-9]+$" | trimPrefix ":" }}
protocol: TCP
{{- end }}
egress:
- # Egress to
Expand Down
Loading