From 29982d6d8c407c5d133faf6737d1479325dde512 Mon Sep 17 00:00:00 2001 From: mw Date: Thu, 1 Aug 2024 10:35:32 +0200 Subject: [PATCH] feat(base-cluster/tetragon): set component to kube-system --- .../_prometheus-stack-config.yaml | 2 +- .../base-cluster/templates/tetragon/tetragon.yaml | 10 ++++++---- charts/base-cluster/values.schema.json | 15 --------------- charts/base-cluster/values.yaml | 7 ------- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_prometheus-stack-config.yaml b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_prometheus-stack-config.yaml index b68e5eabab..d605526fef 100644 --- a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_prometheus-stack-config.yaml +++ b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_prometheus-stack-config.yaml @@ -1,7 +1,7 @@ {{- define "base-cluster.prometheus.config" -}} {{- if .Values.global.imageRegistry }} global: - imageRegistry: {{ .Values.global.imageRegistry }} + imageRegistry: {{ .Values.global.imageRegistry }} {{- end }} prometheusOperator: secretFieldSelector: 'type!=helm.sh/release.v1' diff --git a/charts/base-cluster/templates/tetragon/tetragon.yaml b/charts/base-cluster/templates/tetragon/tetragon.yaml index aac1ef4b5e..f2f0969df8 100644 --- a/charts/base-cluster/templates/tetragon/tetragon.yaml +++ b/charts/base-cluster/templates/tetragon/tetragon.yaml @@ -3,7 +3,9 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: tetragon - namespace: tetragon + namespace: kube-system + labels: {{- include "common.labels.standard" $ | nindent 4 }} + app.kubernetes.io/component: tetragon spec: chart: spec: {{- include "base-cluster.helm.chartSpec" (dict "repo" "tetragon" "chart" "tetragon" "context" $) | nindent 6 }} @@ -19,7 +21,7 @@ spec: export: stdout: image: - repository: {{ printf "%s/cilium/hubble-export-stdout" ($.Values.global.imageRegistry | default (include "base-cluster.defaultRegistry" (dict))) }} + repository: {{ .Values.global.imageRegistry }} securityContext: capabilities: drop: @@ -30,13 +32,13 @@ spec: enabled: false tetragon: image: - repository: {{ printf "%s/cilium/tetragon" ($.Values.global.imageRegistry | default (include "base-cluster.defaultRegistry" (dict))) }} + repository: {{ .Values.global.imageRegistry }} enableProcessCred: true enableProcessNs: true {{- if .Values.monitoring.prometheus.enabled }} prometheus: serviceMonitor: enabled: true - labelsOverride: {{- toYaml .Values.tetragon.serviceMonitor.labelsOverride | nindent 12 }} + labelsOverride: {{- toYaml .Values.monitoring.labels | nindent 12 }} {{- end }} {{- end }} diff --git a/charts/base-cluster/values.schema.json b/charts/base-cluster/values.schema.json index ddb44d5c5e..6b1ca67a1b 100644 --- a/charts/base-cluster/values.schema.json +++ b/charts/base-cluster/values.schema.json @@ -554,21 +554,6 @@ "properties": { "enabled": { "type": "boolean" - }, - "serviceMonitor": { - "type": "object", - "properties": { - "serviceMonitor": { - "type": "object", - "properties": { - "labelsOverride": { - "additionalProperties": { - "type": "string" - } - } - } - } - } } }, "additionalProperties": false diff --git a/charts/base-cluster/values.yaml b/charts/base-cluster/values.yaml index a1e3588af2..8daf462391 100644 --- a/charts/base-cluster/values.yaml +++ b/charts/base-cluster/values.yaml @@ -28,10 +28,6 @@ global: condition: "{{ .Values.ingress.enabled }}" additionalLabels: app.kubernetes.io/component: ingress - tetragon: - condition: "{{ .Values.tetragon.enabled }}" - additionalLabels: - app.kubernetes.io/component: tetragon kyverno: condition: "{{ .Values.kyverno.enabled }}" additionalLabels: @@ -468,6 +464,3 @@ kube-janitor: tetragon: enabled: true - serviceMonitor: - labelsOverride: - managed.by/monitoring: teutonet