diff --git a/charts/hsp-observability-agent/Chart.yaml b/charts/hsp-observability-agent/Chart.yaml index 97d35f7..d574042 100644 --- a/charts/hsp-observability-agent/Chart.yaml +++ b/charts/hsp-observability-agent/Chart.yaml @@ -1,3 +1,3 @@ apiVersion: v2 name: hsp-observability-agent -version: 0.1.9 +version: 0.2.0 diff --git a/charts/hsp-observability-agent/README.md b/charts/hsp-observability-agent/README.md index 94c4984..14543d3 100644 --- a/charts/hsp-observability-agent/README.md +++ b/charts/hsp-observability-agent/README.md @@ -1,6 +1,6 @@ # hsp-observability-agent -![Version: 0.1.9](https://img.shields.io/badge/Version-0.1.9-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) Grafana Alloy is a vendor-neutral distribution of the OpenTelemetry (OTel) Collector. Alloy uniquely combines the very best OSS observability signals in the community. @@ -26,8 +26,7 @@ This helm chart should be deployed using kustomize. | api_key.secret | string | `"hsp-observability"` | Secret containing a `key` field with your API key | | awsAccountId | string | `""` | | | awsRegion | string | `""` | | -| cluster.name | string | `"fake"` | Cluster Name | -| cluster.namespace | string | `"hsp-observability"` | Namespace in which to deploy manifests | +| clusterName | string | `"changeme"` | | | controller.autoscaling | object | `{"enabled":true,"max_replicas":6,"min_replicas":1,"scaledownwindow":300,"scaleupwindow":10,"utilization":{"cpu":80,"memory":80}}` | Configure Horizontal Pod Autoscaler(HPA) for Alloy | | controller.autoscaling.enabled | bool | `true` | Enable/disable autoscaling | | controller.autoscaling.utilization | object | `{"cpu":80,"memory":80}` | Criteria for autoscaling - CPU or Memory. By default it uses 80% memory utilization as the trigger to autoscale | diff --git a/charts/hsp-observability-agent/config/config.alloy b/charts/hsp-observability-agent/config/config.alloy index 2088f7e..99efd5e 100644 --- a/charts/hsp-observability-agent/config/config.alloy +++ b/charts/hsp-observability-agent/config/config.alloy @@ -254,7 +254,7 @@ prometheus.relabel "local" { action = "replace" source_labels = ["service"] target_label = "cluster" - replacement = {{ .Values.cluster.name | quote }} + replacement = {{ .Values.clusterName | quote }} } rule { action = "replace" @@ -281,13 +281,13 @@ otelcol.processor.transform {{ .name | quote }} { log_statements { context = "log" statements = [ - "set(resource.attributes[\"k8s.cluster.name\"], \"{{ $.Values.cluster.name }}\")", // Label + "set(resource.attributes[\"k8s.clusterName\"], \"{{ $.Values.clusterName }}\")", // Label "set(resource.attributes[\"k8s.container.name\"], attributes[\"pod_container_name\"])", // Label "set(resource.attributes[\"service.namespace\"], attributes[\"namespace\"])", // Label "set(resource.attributes[\"service.name\"], attributes[\"service_name\"])", // Label - "set(resource.attributes[\"cluster\"], \"{{ $.Values.cluster.name }}\")", // Label + "set(resource.attributes[\"cluster\"], \"{{ $.Values.clusterName }}\")", // Label "set(resource.attributes[\"namespace\"], attributes[\"namespace\"])", // Label - "set(attributes[\"cluster_name\"], \"{{ $.Values.cluster.name }}\")", + "set(attributes[\"clusterName\"], \"{{ $.Values.clusterName }}\")", "set(resource.attributes[\"k8s.pod.name\"], attributes[\"pod_name\"])", "set(attributes[\"component\"], attributes[\"app_kubernetes_io_component\"])", ] @@ -295,7 +295,7 @@ otelcol.processor.transform {{ .name | quote }} { metric_statements { context = "datapoint" statements = [ - "set(attributes[\"cluster\"], \"{{ $.Values.cluster.name }}\")", + "set(attributes[\"cluster\"], \"{{ $.Values.clusterName }}\")", ] } output { diff --git a/charts/hsp-observability-agent/templates/alloy-helm.yaml b/charts/hsp-observability-agent/templates/alloy-helm.yaml index 022cbe4..59701fc 100644 --- a/charts/hsp-observability-agent/templates/alloy-helm.yaml +++ b/charts/hsp-observability-agent/templates/alloy-helm.yaml @@ -19,7 +19,7 @@ spec: {{- (tpl (.Files.Get "config/alloy-values.yaml") .) | nindent 8 }} destination: server: "https://kubernetes.default.svc" - namespace: {{ .Values.cluster.namespace | quote }} + namespace: hsp-observability syncPolicy: automated: prune: true diff --git a/charts/hsp-observability-agent/values.yaml b/charts/hsp-observability-agent/values.yaml index 273c965..f7db9b7 100644 --- a/charts/hsp-observability-agent/values.yaml +++ b/charts/hsp-observability-agent/values.yaml @@ -2,6 +2,7 @@ resourcePrefix: "" awsRegion: "" awsAccountId: "" +clusterName: "changeme" logging: level: info @@ -14,12 +15,6 @@ otlp: # -- Use API key for authn use_api_key: true -cluster: - # -- Cluster Name - name: fake - # -- Namespace in which to deploy manifests - namespace: hsp-observability - # -- API key for OTLP authn api_key: # -- Secret containing a `key` field with your API key