Skip to content

No annotations for helm-loki chart read StatefulSet #11688

@YogevLevy93

Description

@YogevLevy93

Describe the bug
There is no annotations argument for helm-loki chart in the read chart for StatefulSet kind yaml file.
In values.yaml file there is an argument for the annotation, but without any use.

To Reproduce
Steps to reproduce the behavior:

  1. Read helm-loki -> templates -> read -> statefulset-read.yaml file.

Expected behavior
The same behavior as the write chart StatefulSet kind yaml file, a merge of the "global" annotations, and the specific annotations for the relevant component in the values.yaml file.

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm

Screenshots, Promtail config, or terminal output
statefulset-read.yaml file: (missing the annotations use)

/apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: {{ include "loki.readFullname" . }}
  namespace: {{ $.Release.Namespace }}
  labels:
    app.kubernetes.io/part-of: memberlist
    {{- include "loki.readLabels" . | nindent 4 }}
spec:
...

On the other hand, this is how it's handled for write's statefulset-write.yaml file: (the proposal solution)

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: {{ include "loki.writeFullname" . }}
  namespace: {{ $.Release.Namespace }}
  labels:
    {{- include "loki.writeLabels" . | nindent 4 }}
    app.kubernetes.io/part-of: memberlist
  {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}}
  annotations:
    {{- with .Values.loki.annotations }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
    {{- with .Values.write.annotations }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  {{- end }}
spec:
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/helmtype/bugSomehing is not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions