Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pod annotations to Helm templates for injecting user-specified pod annotations. #1588

Open
oniku-2929 opened this issue Aug 20, 2023 · 2 comments · May be fixed by #1589
Open

Add pod annotations to Helm templates for injecting user-specified pod annotations. #1588

oniku-2929 opened this issue Aug 20, 2023 · 2 comments · May be fixed by #1589

Comments

@oniku-2929
Copy link

Is your feature request related to a problem? Please describe.
Some Service Mesh OSS products require pod annotations for controlling their functions.
e.g.
Istio:https://istio.io/latest/docs/reference/config/annotations/
Consul:https://developer.hashicorp.com/consul/docs/k8s/annotations-and-labels

It would be helpful if we can inject our specified pod annotations during the chart installation process.

Describe the solution you'd like
Add podAnnotations to Helm templates for injecting user-specified pod annotations.

e.g.

# use --set 
helm install open-match --create-namespace --namespace open-match open-match/open-match \
  --set open-match-customize.enabled=true \
  --set open-match-customize.evaluator.enabled=true \
  --set open-match-override.enabled=true \
  --set query.podAnnotations.test\\.sh/component=query

or

#values.yaml
query:
  podAnnotations:
    test.sh/component: query
	
# use values.yaml
helm install open-match --create-namespace --namespace open-match open-match/open-match -f values.yaml \
  --set open-match-customize.enabled=true \
  --set open-match-customize.evaluator.enabled=true \
  --set open-match-override.enabled=true

=>
pod "open-match-query-***" has an annotation "test.sh/component=query"

Describe alternatives you've considered
The user can use "kubectl annotate" to annotate the pod after the chart installation process.
But, It's more declarative.

Additional context
Nothing.

@ashutosji
Copy link

Hey @oniku-2929, Thanks for filling the PR. Once, PR 1587 will merge then I will try to rebuild this PR. Meanwhile, if you could let use know did you try user-specified pod annotations? Is it working as expected?

@oniku-2929
Copy link
Author

oniku-2929 commented Aug 21, 2023

Hi, @ashutosji
Thank you for your reply.

Once, PR #1587 will merge then I will try to rebuild this PR.

I got it.

if you could let use know did you try user-specified pod annotations? Is it working as expected?

Sure, I tested it with yaml file on "Special notes for your reviewer" section:
(#1589)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants