From 28cfb06370556ccfd45b28f0aaeaa06fbdae5b4e Mon Sep 17 00:00:00 2001 From: David Cohan Date: Tue, 19 Nov 2024 11:25:13 -0300 Subject: [PATCH] [BAC-579-separate-metrics-exporter] added metrics-exporter --- charts/base/Chart.yaml | 4 ++-- charts/base/templates/clusterrolebindings.yaml | 6 ------ charts/base/templates/clusterroles.yaml | 6 ------ charts/base/templates/daemonset.yaml | 3 +++ charts/base/values.yaml | 2 ++ charts/cert-manager-config/Chart.yaml | 4 ++-- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index 1ca8126..bf6a0e6 100644 --- a/charts/base/Chart.yaml +++ b/charts/base/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: nullplatform-base description: A Helm chart for deploying the nullplatform base dependencies applications using Kubernetes type: application -version: 0.0.5 -appVersion: "0.0.5" +version: 0.0.6 +appVersion: "0.0.6" dependencies: - name: metrics-server version: ^3.12.0 # Use the appropriate version you need diff --git a/charts/base/templates/clusterrolebindings.yaml b/charts/base/templates/clusterrolebindings.yaml index e3e6fda..1b7d301 100644 --- a/charts/base/templates/clusterrolebindings.yaml +++ b/charts/base/templates/clusterrolebindings.yaml @@ -1,4 +1,3 @@ -{{- if not (lookup "rbac.authorization.k8s.io/v1" "ClusterRoleBinding" "" "nullplatform-pod-metadata-reader-binding") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -11,9 +10,7 @@ roleRef: kind: ClusterRole name: nullplatform-pod-metadata-reader apiGroup: rbac.authorization.k8s.io -{{- end }} --- -{{- if not (lookup "rbac.authorization.k8s.io/v1" "ClusterRoleBinding" "" "nullplatform-leases-pod-metadata-reader-binding") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -26,9 +23,7 @@ roleRef: kind: ClusterRole name: nullplatform-leases apiGroup: rbac.authorization.k8s.io -{{- end }} --- -{{- if not (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "np:pod-reader-role") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -43,4 +38,3 @@ subjects: - kind: Group name: np:pod-reader apiGroup: rbac.authorization.k8s.io -{{- end }} diff --git a/charts/base/templates/clusterroles.yaml b/charts/base/templates/clusterroles.yaml index 9a3bce0..a5727c0 100644 --- a/charts/base/templates/clusterroles.yaml +++ b/charts/base/templates/clusterroles.yaml @@ -1,4 +1,3 @@ -{{- if not (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "nullplatform-pod-metadata-reader") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -7,9 +6,7 @@ rules: - apiGroups: ["", "metrics.k8s.io"] resources: ["pods", "nodes", "configmaps"] verbs: ["get", "list", "watch"] -{{- end }} --- -{{- if not (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "nullplatform-leases") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -18,9 +15,7 @@ rules: - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "list", "create", "patch"] -{{- end }} --- -{{- if not (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "np:pod-reader-role") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -34,4 +29,3 @@ rules: - apiGroups: [""] resources: ["pods/log"] verbs: ["get"] -{{- end }} diff --git a/charts/base/templates/daemonset.yaml b/charts/base/templates/daemonset.yaml index a7a9497..a476cee 100644 --- a/charts/base/templates/daemonset.yaml +++ b/charts/base/templates/daemonset.yaml @@ -13,6 +13,7 @@ spec: name: nullplatform-log-controller spec: serviceAccountName: nullplatform-pod-metadata-reader-sa + restartPolicy: Always containers: - name: nullplatform-log-controller image: {{ .Values.logging.controller.image }} @@ -90,6 +91,8 @@ spec: key: LOKI_BEARER_TOKEN {{- end}} {{- end}} + - name: nullplatform-logging-metrics-exporter + image: {{ .Values.logging.metricsExporter.image }} volumes: - name: host-logs hostPath: diff --git a/charts/base/values.yaml b/charts/base/values.yaml index a55df2f..f8b8c5c 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -45,6 +45,8 @@ logging: datadog: enabled: false apiKey: "" + metricsExporter: + image: "public.ecr.aws/nullplatform/k8s-metrics-exporter:latest" # CloudWatch configuration cloudwatch: enabled: false diff --git a/charts/cert-manager-config/Chart.yaml b/charts/cert-manager-config/Chart.yaml index b36563d..88f6312 100644 --- a/charts/cert-manager-config/Chart.yaml +++ b/charts/cert-manager-config/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: nullplatform-cert-manager-config description: A Helm chart for cert-manager configurations type: application -version: 0.0.5 -appVersion: "0.0.5" +version: 0.0.6 +appVersion: "0.0.6"