Skip to content

Commit

Permalink
Enable to add annotations to vmanomaly configMap (#1490)
Browse files Browse the repository at this point in the history
* Enable to add annotations to vmaonmaly configMap

* For better consistency , add the configMap annotations to the root level like podAnnotations

* Update the change log
  • Loading branch information
mohamedragab2024 authored Sep 13, 2024
1 parent 3246850 commit ebee26d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/victoria-metrics-anomaly/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Next release

- TODO
- Added the ability to add annotations to the configMap using `values.configMapAnnotations`

## 1.4.5

Expand Down
10 changes: 10 additions & 0 deletions charts/victoria-metrics-anomaly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,16 @@ vm
</pre>
</td>
<td><p>For VictoriaMetrics Cluster version only, tenants are identified by accountID or accountID:projectID. See VictoriaMetrics Cluster multitenancy docs</p>
</td>
</tr>
<tr>
<td>configMapAnnotations</td>
<td>object</td>
<td><pre lang="plaintext">
{}
</pre>
</td>
<td><p>Annotations to be added to configMap</p>
</td>
</tr>
<tr>
Expand Down
3 changes: 3 additions & 0 deletions charts/victoria-metrics-anomaly/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ metadata:
name: {{ include "chart.fullname" . }}
namespace: {{ include "vm.namespace" . }}
labels: {{- include "chart.labels" . | nindent 4 }}
{{- with .Values.configMapAnnotations }}
annotations: {{ toYaml . | nindent 10 }}
{{- end }}
data:
config.yml: |{{ toYaml (.Values.config | default dict) | nindent 4 }}
3 changes: 3 additions & 0 deletions charts/victoria-metrics-anomaly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ annotations: {}
# -- Annotations to be added to pod
podAnnotations: {}

# -- Annotations to be added to configMap
configMapAnnotations: {}

# -- NodeSelector configurations. Details are [here](https://kubernetes.io/docs/user-guide/node-selection/)
nodeSelector: {}

Expand Down

0 comments on commit ebee26d

Please sign in to comment.