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 ability to customise pod annotations #170

Open
artemiyplotnikov opened this issue Apr 16, 2024 · 2 comments
Open

Add ability to customise pod annotations #170

artemiyplotnikov opened this issue Apr 16, 2024 · 2 comments

Comments

@artemiyplotnikov
Copy link

Please add ability to customise pod annotations for deployment k8s-image-availability-exporter
for example:

  template:
    metadata:
      {{- if .Values.k8sImageAvailabilityExporter.annotations }}
      annotations:
       {{- include .Values.k8sImageAvailabilityExporter.annotations . | nindent 8 }}
@nabokihms
Copy link
Member

@artemiyplotnikov sure, but can you elaborate on why you need this? (This is important to know usescases for features).

@artemiyplotnikov
Copy link
Author

artemiyplotnikov commented Apr 17, 2024

First of all we use annotations for filtering and configuring scraping options.
For example:

      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: "{{ .Values.env.PROMETHEUS_PORT }}"

I know that there is another options to configure Prometheus scrape but it would multiply configuring options and hardenes

now we use patch for deployment to workaround this problem

kubectl patch deployment k8s-image-availability-exporter -p '{"spec": {"template":{"metadata":{"annotations":{"prometheus.io/scrape":"true","prometheus.io/port":"8080" }}}} }'

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

No branches or pull requests

2 participants