Skip to content

Commit ee8786d

Browse files
Application topology (#114)
1 parent 093aafd commit ee8786d

24 files changed

+1106
-37
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
# 2025-06-17
4+
### Added
5+
- Introduced a new DaemonSet that uses eBPF (Extended Berkeley Packet Filter) to capture TCP connection logs and builds application/network topology representing workload to workload relationships within the Kubernetes cluster.
6+
- To be able to run the required eBPF program, the pods needs to run in privileged mode but restricting to CAP_BPF capability only.
7+
- New helm variable to control the resource limits at individual logan workloads.
8+
- Enables OKE infra discovery and service logs collection (default)
9+
- OCI Console integration supporting new features:
10+
- Topology : New Views (Infra and Network) along with Platform.
11+
- View Insights for Workloads including capabilities to view the detailed spec of a workload, monitor the changes to the spec of a workload, create in-line labels for issues etc.
12+
13+
### Changed
14+
- `kubernetesClusterID` (in the Helm chart) is now a mandatory field. *(This is not backward compatible.)*
315

416
## 2025-03-19
517
### Added

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ It does extensive enrichment of logs, metrics and object information to enable c
3636

3737
## Get Started :rocket:
3838

39-
:stop_sign: Upgrading to a major version (like 2.x to 3.x)? See [upgrade](#upgrading-to-a-major-version) section below for details. :warning:
39+
:stop_sign: Upgrading to a major version (like 3.x to 4.x)? See [upgrade](#upgrading-to-a-major-version) section below for details. :warning:
4040

4141
### Pre-requisites
4242

@@ -367,6 +367,34 @@ Refer [here](#3c-import-dashboards).
367367
368368
### Upgrading to a major version
369369
370+
#### 3.6.0 to 4.0.0
371+
372+
For changes in this release, refer to [CHANGELOG.md](CHANGELOG.md)
373+
374+
##### Upgrade instructions
375+
376+
1. Update IAM Policies:
377+
* This version requires additional policy statements for infrastructure discovery.
378+
* See the pre-requisites section in the [README](../README.md#0-pre-requisites) for details.
379+
380+
1. As mentioned in the change log, this version introduces a new DaemonSet that uses eBPF (Extended Berkeley Packet Filter) to capture TCP connection logs and builds application/network topology representing workload to workload relationships within the Kubernetes cluster.
381+
* To be able to run the required eBPF program, the pods needs to run in privileged mode but restricting to CAP_BPF capability only.
382+
* In your environment, if you have any restrictions with respect to running pods in privileged mode, you may need to adjust your cluster configuration accordingly.
383+
384+
2. Upgrade the Helm chart:
385+
386+
```sh
387+
# fetch latest (4.x) helm repo for oci
388+
helm repo update oci-onm
389+
390+
# fetch the current release configuration
391+
helm get values <release-name> -n <namespace> > override_values.yaml
392+
393+
# Upgrade the helm chart
394+
helm upgrade <release-name> oci/oci-onm -n <namespace> -f override_values.yaml
395+
```
396+
397+
370398
#### 2.x to 3.x
371399
372400
One of the major changes introduced in 3.0.0 is refactoring of helm chart where major features of the solution got split into separate sub-charts. 2.x has only support for logs and objects collection using Fluentd and OCI Logging Analytics and this is now moved into a separate chart oci-onm-logan and included as a sub-chart to the main chart oci-onm. This is a breaking change w.r.t the values.yaml and any customisations that you might have done on top of it. There is no breaking change w.r.t functionality offered in 2.x. For full list of changes in 3.x, refer to [changelog](CHANGELOG.md).

charts/logan/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: v2
55
name: oci-onm-logan
66
description: Charts for sending Kubernetes platform logs, compute logs, and Kubernetes Objects information to OCI Logging Analytics.
77
type: application
8-
version: 3.6.0
8+
version: 4.0.0
99
appVersion: "3.0.0"
1010

1111
dependencies:

charts/logan/templates/_helpers.tpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
44

55
# tpl render function
@@ -43,6 +43,11 @@
4343
{{- end -}}
4444
{{- end -}}
4545

46+
#ociLAClusterEntityID
47+
{{- define "logan.ociLAClusterEntityID" -}}
48+
{{ include "common.tplvalues.render" ( dict "value" .Values.ociLAClusterEntityID "context" .) }}
49+
{{- end -}}
50+
4651
#kubernetesClusterName
4752
{{- define "logan.kubernetesClusterName" -}}
4853
{{- if .Values.kubernetesClusterName -}}

charts/logan/templates/discovery-cronjob.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
13
{{- $authtype := .Values.authtype | lower }}
24
{{- $resourceNamePrefix := .Values.global.resourceNamePrefix }}
35
{{- $kubernetesClusterName := (include "logan.kubernetesClusterName" .) }}

charts/logan/templates/fluentd-daemonset.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
1+
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
---
@@ -69,7 +69,9 @@ spec:
6969
{{- if .Values.extraEnv }}
7070
{{- toYaml .Values.extraEnv | nindent 10 }}
7171
{{- end }}
72-
{{- if .Values.resources }}
72+
{{- if .Values.resourceOverrides.fluentdDaemonset }}
73+
resources: {{- toYaml .Values.resourceOverrides.fluentdDaemonset | nindent 10 }}
74+
{{- else if .Values.resources }}
7375
resources: {{- toYaml .Values.resources | nindent 10 }}
7476
{{- end }}
7577
volumeMounts:

charts/logan/templates/fluentd-deployment.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
1+
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
---
@@ -61,7 +61,9 @@ spec:
6161
{{- if .Values.extraEnv }}
6262
{{- toYaml .Values.extraEnv | nindent 10 }}
6363
{{- end }}
64-
{{- if .Values.resources }}
64+
{{- if .Values.resourceOverrides.fluentdDeployment }}
65+
resources: {{- toYaml .Values.resourceOverrides.fluentdDeployment | nindent 10 }}
66+
{{- else if .Values.resources }}
6567
resources: {{- toYaml .Values.resources | nindent 10 }}
6668
{{- end }}
6769
volumeMounts:

charts/logan/templates/logs-configmap.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
1+
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
3-
3+
---
44
{{- $kubernetesClusterName := (include "logan.kubernetesClusterName" .) }}
55
{{- $kubernetesClusterId := (include "logan.kubernetesClusterId" .) }}
6+
{{- $ociLAClusterEntityID := (include "logan.ociLAClusterEntityID" .) }}
67
apiVersion: v1
78
kind: ConfigMap
89
metadata:
@@ -86,12 +87,16 @@ data:
8687
@type record_transformer
8788
enable_ruby true
8889
<record>
90+
{{- if eq $name "tcpconnect" }}
91+
oci_la_metadata ${{"{{"}}"Kubernetes Cluster Name":"{{ $kubernetesClusterName }}", "Kubernetes Cluster ID": "{{ $kubernetesClusterId }}", "Kubernetes Cluster Entity ID": "{{ $ociLAClusterEntityID }}" {{- range $k, $v := $logDefinition.metadata }},{{ $k | quote }}: {{ $v | quote -}} {{- end }}{{"}}"}}
92+
{{- else }}
8993
{{- if $logDefinition.metadata }}
9094
oci_la_metadata ${{"{{"}}"Kubernetes Cluster Name":"{{ $kubernetesClusterName }}", "Kubernetes Cluster ID": "{{ $kubernetesClusterId }}" {{- range $k, $v := $logDefinition.metadata }},{{ $k | quote }}: {{ $v | quote -}} {{- end }}{{"}}"}}
9195
{{- else if $.Values.fluentd.kubernetesSystem.metadata }}
9296
oci_la_metadata ${{"{{"}}"Kubernetes Cluster Name":"{{ $kubernetesClusterName }}", "Kubernetes Cluster ID": "{{ $kubernetesClusterId }}" {{- range $k, $v := $.Values.fluentd.kubernetesSystem.metadata }},{{ $k | quote }}: {{ $v | quote -}} {{- end }}{{"}}"}}
9397
{{- else }}
9498
oci_la_metadata ${{"{{"}}"Kubernetes Cluster Name":"{{ $kubernetesClusterName }}", "Kubernetes Cluster ID": "{{ $kubernetesClusterId }}" {{- range $k, $v := $.Values.metadata }},{{ $k | quote }}: {{ $v | quote -}} {{- end }}{{"}}"}}
99+
{{- end -}}
95100
{{- end }}
96101
{{- if $logDefinition.ociLALogGroupID }}
97102
oci_la_log_group_id "{{ $logDefinition.ociLALogGroupID }}"
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
---
5+
{{- if .Values.enableTCPConnectLogs }}
6+
{{- $authtype := .Values.authtype | lower }}
7+
{{- $imagePullSecrets := .Values.image.imagePullSecrets }}
8+
{{- $resourceNamePrefix := (include "logan.resourceNamePrefix" .) }}
9+
apiVersion: apps/v1
10+
kind: DaemonSet
11+
metadata:
12+
name: {{ $resourceNamePrefix }}-logan-tcpconnect
13+
namespace: {{ include "logan.namespace" . }}
14+
labels:
15+
app: {{ $resourceNamePrefix }}-logan-tcpconnect
16+
version: v1
17+
spec:
18+
selector:
19+
matchLabels:
20+
app: {{ $resourceNamePrefix }}-logan-tcpconnect
21+
version: v1
22+
template:
23+
metadata:
24+
labels:
25+
app: {{ $resourceNamePrefix }}-logan-tcpconnect
26+
version: v1
27+
spec:
28+
serviceAccountName: {{ include "logan.serviceAccount" . }}
29+
tolerations:
30+
- key: node-role.kubernetes.io/master
31+
effect: NoSchedule
32+
- key: node-role.kubernetes.io/control-plane
33+
effect: NoSchedule
34+
{{- if $imagePullSecrets }}
35+
imagePullSecrets:
36+
- name: {{ .Values.image.imagePullSecrets }}
37+
{{- end}}
38+
containers:
39+
- name: {{ $resourceNamePrefix }}-logan-tcpconnect
40+
image: {{ .Values.image.url }}
41+
command:
42+
- /bin/bash
43+
- -c
44+
- --
45+
args:
46+
- /usr/bin/tcpconnect -e
47+
- -i 30
48+
env:
49+
- name: K8S_NODE_NAME
50+
valueFrom:
51+
fieldRef:
52+
apiVersion: v1
53+
fieldPath: spec.nodeName
54+
{{- if .Values.resourceOverrides.tcpconnectDaemonset }}
55+
resources: {{- toYaml .Values.resourceOverrides.tcpconnectDaemonset | nindent 10 }}
56+
{{- else if .Values.resources }}
57+
resources: {{- toYaml .Values.resources | nindent 10 }}
58+
{{- end }}
59+
imagePullPolicy: {{ default "IfNotPresent" .Values.image.imagePullPolicy }}
60+
# The container runs in privileged mode, but with only the CAP_BPF capability enabled.
61+
# This allows it to execute the required BPF programs while maintaining a minimal security footprint.
62+
securityContext:
63+
capabilities:
64+
add:
65+
- CAP_BPF
66+
privileged: true
67+
terminationMessagePath: /dev/termination-log
68+
terminationMessagePolicy: File
69+
tty: true
70+
dnsPolicy: ClusterFirst
71+
restartPolicy: Always
72+
schedulerName: default-scheduler
73+
securityContext: {}
74+
terminationGracePeriodSeconds: 30
75+
{{- end }}

charts/logan/values.schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"image",
88
"ociLANamespace",
99
"ociLALogGroupID",
10-
"fluentd"
10+
"fluentd",
11+
"ociLAClusterEntityID"
1112
],
1213
"properties": {
1314
"image": {
@@ -64,6 +65,9 @@
6465
"type": "string",
6566
"minLength": 3,
6667
"maxLength": 63
68+
},
69+
"ociLAClusterEntityID": {
70+
"type": "string"
6771
}
6872
}
6973
}

0 commit comments

Comments
 (0)