From 008eb01a10fafc88adfb67c56ca3f10dfd7ff226 Mon Sep 17 00:00:00 2001 From: beegiik Date: Mon, 16 Dec 2024 19:14:48 +0000 Subject: [PATCH 1/6] fix(bug): Fix invalid helm value rendering for windows manifest --- windows/kubeconfigtemplate.yaml | 2 +- windows/manifests/windows.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/windows/kubeconfigtemplate.yaml b/windows/kubeconfigtemplate.yaml index 21a6c054f2..49e6c8ad50 100644 --- a/windows/kubeconfigtemplate.yaml +++ b/windows/kubeconfigtemplate.yaml @@ -9,7 +9,7 @@ contexts: - name: azure-retina-windows@kubernetes context: cluster: kubernetes - namespace: {{ .Values.namespace }} + namespace: kube-system user: azure-retina-windows current-context: azure-retina-windows@kubernetes users: diff --git a/windows/manifests/windows.yaml b/windows/manifests/windows.yaml index 4fd7cb2d5a..62c78ba49c 100644 --- a/windows/manifests/windows.yaml +++ b/windows/manifests/windows.yaml @@ -4,7 +4,7 @@ metadata: labels: app: retina name: retina-win - namespace: {{ .Values.namespace }} + namespace: kube-system annotations: prometheus.io/port: "10093" prometheus.io/scrape: "true" @@ -62,7 +62,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: retina-config-win - namespace: {{ .Values.namespace }} + namespace: kube-system data: config.yaml: |- apiServer: From 82f7b7a4ae6dc83bcc4fcdd2cf2389d018040bc5 Mon Sep 17 00:00:00 2001 From: beegiik Date: Mon, 16 Dec 2024 19:15:19 +0000 Subject: [PATCH 2/6] fix(bug): Fix RBAC issue with metrics configuration when operator is enabled --- .../controller/helm/retina/templates/agent/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml b/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml index 704cf5a9c5..0dd67890c4 100644 --- a/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml +++ b/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml @@ -132,7 +132,7 @@ data: metricsInterval: {{ .Values.metricsInterval }} metricsIntervalDuration: {{ .Values.metricsIntervalDuration }} enableTelemetry: {{ .Values.enableTelemetry }} - enablePodLevel: {{ .Values.enablePodLevel }} + enablePodLevel: false remoteContext: {{ .Values.remoteContext }} bypassLookupIPOfInterest: {{ .Values.bypassLookupIPOfInterest }} {{- end}} From 4296b298051011712020629abfa7b3a52cceb29d Mon Sep 17 00:00:00 2001 From: beegiik Date: Mon, 16 Dec 2024 19:15:42 +0000 Subject: [PATCH 3/6] fix(bug): Disbale telemetry for windows agent in hubble path --- .../controller/helm/retina/templates/agent/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml b/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml index 0dd67890c4..4dd4e03bb2 100644 --- a/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml +++ b/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml @@ -131,7 +131,7 @@ data: enabledPlugin: {{ .Values.enabledPlugin_win }} metricsInterval: {{ .Values.metricsInterval }} metricsIntervalDuration: {{ .Values.metricsIntervalDuration }} - enableTelemetry: {{ .Values.enableTelemetry }} + enableTelemetry: false enablePodLevel: false remoteContext: {{ .Values.remoteContext }} bypassLookupIPOfInterest: {{ .Values.bypassLookupIPOfInterest }} From b59b9cd4f1a6d6da8062b00ffea4cf8a7d6c8731 Mon Sep 17 00:00:00 2001 From: beegiik Date: Mon, 16 Dec 2024 19:16:21 +0000 Subject: [PATCH 4/6] fix(bug): Run setting kubeconfig path for legacy manifest on windows --- .../manifests/controller/helm/retina/templates/daemonset.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml b/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml index f4e44332e0..7667aac279 100644 --- a/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml +++ b/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml @@ -203,7 +203,9 @@ spec: containerPort: {{ .Values.retinaPort }} workingDir: $env:CONTAINER_SANDBOX_MOUNT_POINT command: - - controller.exe --config ./retina/config.yaml + - powershell.exe + - -command + - .\setkubeconfigpath.ps1; ./controller.exe --config ./retina/config.yaml --kubeconfig ./kubeconfig env: - name: POD_NAME valueFrom: From 548352e54fd623b04456b43732a230b3b6e02a0d Mon Sep 17 00:00:00 2001 From: beegiik Date: Mon, 16 Dec 2024 19:16:50 +0000 Subject: [PATCH 5/6] fix(bug): Update windows legacy powershell command --- .../manifests/controller/helm/retina/templates/daemonset.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml b/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml index 7667aac279..f222ccc2fa 100644 --- a/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml +++ b/deploy/legacy/manifests/controller/helm/retina/templates/daemonset.yaml @@ -205,7 +205,11 @@ spec: command: - powershell.exe - -command + {{- if semverCompare ">=1.28" .Capabilities.KubeVersion.GitVersion }} + - $env:CONTAINER_SANDBOX_MOUNT_POINT/controller.exe --config ./retina/config.yaml + {{- else }} - .\setkubeconfigpath.ps1; ./controller.exe --config ./retina/config.yaml --kubeconfig ./kubeconfig + {{- end }} env: - name: POD_NAME valueFrom: From e8ea7bad0652b646df7638c076be4a7759e1c9b7 Mon Sep 17 00:00:00 2001 From: beegiik Date: Fri, 3 Jan 2025 10:31:01 +0000 Subject: [PATCH 6/6] Address PR comments --- .../controller/helm/retina/templates/agent/configmap.yaml | 2 +- deploy/hubble/manifests/controller/helm/retina/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml b/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml index 4dd4e03bb2..0dd67890c4 100644 --- a/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml +++ b/deploy/hubble/manifests/controller/helm/retina/templates/agent/configmap.yaml @@ -131,7 +131,7 @@ data: enabledPlugin: {{ .Values.enabledPlugin_win }} metricsInterval: {{ .Values.metricsInterval }} metricsIntervalDuration: {{ .Values.metricsIntervalDuration }} - enableTelemetry: false + enableTelemetry: {{ .Values.enableTelemetry }} enablePodLevel: false remoteContext: {{ .Values.remoteContext }} bypassLookupIPOfInterest: {{ .Values.bypassLookupIPOfInterest }} diff --git a/deploy/hubble/manifests/controller/helm/retina/values.yaml b/deploy/hubble/manifests/controller/helm/retina/values.yaml index 0717e0b500..5d93b8e6e3 100644 --- a/deploy/hubble/manifests/controller/helm/retina/values.yaml +++ b/deploy/hubble/manifests/controller/helm/retina/values.yaml @@ -90,7 +90,7 @@ logLevel: info enabledPlugin_linux: '["linuxutil","packetforward","packetparser","dns", "dropreason"]' enabledPlugin_win: '["hnsstats"]' -enableTelemetry: true +enableTelemetry: false # Interval, in duration, to scrape/publish metrics. metricsIntervalDuration: "10s"