diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fb147b..502b997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add grafana-agent-secret in the chart to store logging write credentials. + +### Changed + +- Upgrade upstream chart to 0.27.0 and agent to 0.37.0. + ## [0.2.0] - 2023-10-03 ### Changed diff --git a/helm/grafana-agent/Chart.yaml b/helm/grafana-agent/Chart.yaml index 31d337e..5661a99 100644 --- a/helm/grafana-agent/Chart.yaml +++ b/helm/grafana-agent/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: "v0.36.2" +appVersion: "v0.37.0" name: grafana-agent description: Giant Swarm's Grafana Agent Deployment icon: https://s.giantswarm.io/app-icons/grafana/1/light.svg diff --git a/helm/grafana-agent/templates/logging-credentials-secret.yaml b/helm/grafana-agent/templates/logging-credentials-secret.yaml new file mode 100644 index 0000000..b911e32 --- /dev/null +++ b/helm/grafana-agent/templates/logging-credentials-secret.yaml @@ -0,0 +1,14 @@ +{{- if .Values.loggingSecret.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.loggingSecret.secretName | default "grafana-agent-secret" }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "grafana-agent.labels" . | nindent 4 }} +stringData: + logging-url: {{ .Values.loggingSecret.url }} + logging-tenant-id: {{ .Values.loggingSecret.tenantId }} + logging-username: {{ .Values.loggingSecret.username }} + logging-password: {{ .Values.loggingSecret.password }} +{{- end }} diff --git a/helm/grafana-agent/values.schema.json b/helm/grafana-agent/values.schema.json index 2aee644..c843f81 100644 --- a/helm/grafana-agent/values.schema.json +++ b/helm/grafana-agent/values.schema.json @@ -5,14 +5,32 @@ "global": { "type": "object", "properties": { - "imageRegistry": { - "type": "string" + "image": { + "type": "object", + "properties": { + "registry": { + "type": "string" + } + } } } }, "grafana-agent": { "type": "object", "properties": { + "configReloader": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "repository": { + "type": "string" + } + } + } + } + }, "image": { "type": "object", "properties": { @@ -20,14 +38,48 @@ "type": "string" } } + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "kyvernoPolicyExceptions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "namespace": { + "type": "string" } } }, - "serviceMonitor": { + "loggingSecret": { "type": "object", "properties": { "enabled": { "type": "boolean" + }, + "password": { + "type": "string" + }, + "secretName": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "username": { + "type": "string" } } } diff --git a/helm/grafana-agent/values.yaml b/helm/grafana-agent/values.yaml index 105a2e0..46114f7 100644 --- a/helm/grafana-agent/values.yaml +++ b/helm/grafana-agent/values.yaml @@ -7,6 +7,16 @@ kyvernoPolicyExceptions: enabled: true namespace: giantswarm +# Block to manage a secret with logging credentials in order to push data to logging system +loggingSecret: + enabled: false + ## Those values are set by the logging-operator because there are related to the cluster + # secretName: + # url: + # tenantId: + # username: + # password: + grafana-agent: image: # -- Grafana Agent image repository.