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

feat: 💥 deployment.podannotations support interpolation with tpl #972

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Nov 24, 2023

What does this PR do?

Give users the ability to set up annotations with dynamic values, a handy feature to cut down on repetition. This comes in handy, especially when dealing with annotations that have extensive configurations and are crucial for autodiscovery.

Before

  deployment:
    podAnnotations:
      ad.datadoghq.com/traefik-internal.logs: |-
        [{
            "env" : "dev"
            "type": "exclude_at_match",
            "name": "exclude_traefik_subset_not_found_error",
            "pattern" : "Error while building TraefikService: subset not found for .*"
        }]

With the feature

  deployment:
    podAnnotations:
      ad.datadoghq.com/{{ template "traefik.name" . }}.logs: |-
        [{
            "env" : "{{ .Values.env }}"
            "type": "exclude_at_match",
            "name": "exclude_traefik_subset_not_found_error",
            "pattern" : "Error while building TraefikService: subset not found for .*"
        }]

Motivation

Issue #971

More

  • Yes, I updated the tests accordingly
  • Yes, I ran make test and all the tests passed

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk ivankatliarchuk changed the title feat: deployment.podannotations support tpl interpolation feat: 💥 deployment.podannotations support tpl interpolation Nov 24, 2023
@ivankatliarchuk ivankatliarchuk changed the title feat: 💥 deployment.podannotations support tpl interpolation feat: 💥 deployment.podannotations support interpolation with tpl Nov 24, 2023
Copy link
Contributor

@darkweaver87 darkweaver87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

traefik/values.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivankatliarchuk Once linter test is fixedt, we should be able to merge it. See my suggestion.

ivankatliarchuk and others added 2 commits November 27, 2023 07:29
linter fixes

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
@ivankatliarchuk
Copy link
Contributor Author

Linter is resolved, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants