Skip to content

[Bug]: podAnnotations not rendered by Helm #6431

Closed
@jDmacD

Description

@jDmacD

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Debian
  • Remote OS: Debian
  • Remote Architecture: arm64
  • code-server --version: 1.80.2

Steps to Reproduce

  1. Create a Helm values file setting the podAnnotations key
podAnnotations:
  foo: bar
  bar: baz
  1. Run helm template -f values.yaml code-server ./helm-chart
  2. Examine the output

Expected

Annotations should be present in rendered manifest

Actual

Annotations are not present

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

While there is a podAnnotations key in ci/helm-chart/values.yaml , there is nothing in ci/helm-chart/templates/deployment.yaml to actually render them out. Something like this should work:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "code-server.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "code-server.name" . }}
    helm.sh/chart: {{ include "code-server.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ include "code-server.name" . }}
      app.kubernetes.io/instance: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app.kubernetes.io/name: {{ include "code-server.name" . }}
        app.kubernetes.io/instance: {{ .Release.Name }}
      {{- if .Values.podAnnotations }}
      annotations: {{- toYaml .Values.podAnnotations | nindent 8 }}
      {{- end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions