Skip to content

Conversation

estenrye
Copy link
Owner

Proposed changes

This change refactors pod annotations to allow a user to add arbitrary annotations to pods.

Problem: The helm chart provided no means to annotate pods to allow them to be meshed in a LinkerD service mesh.

Solution: Added a new helm value that allows the user to provide arbitrary pod annotations

Testing:

Template with default values.yaml manifest

helm template foo . | yq 'select(.kind == "Deployment") | .spec.template.metadata'

Result

labels:
  app.kubernetes.io/name: nginx-gateway-fabric
  app.kubernetes.io/instance: foo
annotations:
  prometheus.io/scrape: "true"
  prometheus.io/port: "9113"

Template with default values and set pod annotations.

helm template foo . --set nginxGateway.podAnnotations."linkerd\.io/inject"="enabled" | yq 'select(.kind == "Deployment") | .spec.template.metadata'

Result

labels:
  app.kubernetes.io/name: nginx-gateway-fabric
  app.kubernetes.io/instance: foo
annotations:
  linkerd.io/inject: enabled
  prometheus.io/scrape: "true"
  prometheus.io/port: "9113"

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@estenrye estenrye merged commit 5f42377 into integration Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant