Skip to content

A bug when 2+ Podpreset are trying to apply presets, only the last one will be applied #1

@mahmoudcb

Description

@mahmoudcb

I have 2 PodPresets that should be applied to the Pod. Here are the logs

{"level":"info","ts":1591409049.4927325,"logger":"podpreset_webhook_handler","msg":"PodPreset matches pod labels","PodPreset":"chartboost-config-repo","Pod":""}
{"level":"info","ts":1591409049.4928012,"logger":"podpreset_webhook_handler","msg":"PodPreset matches pod labels","PodPreset":"datadog-agent-host","Pod":""}
{"level":"info","ts":1591409049.4928439,"logger":"podpreset_webhook_handler","msg":"applied podpresets","Names":"datadog-agent-host,datadog-agent-host","Pod Name":"test-deployment-7f7f79757f-"}

It's clear from the logs that it is somehow trying to apply datadog-agent-host 2 times.

I'm suspecting mutatePodsFn and filterPodPresets functions aren't returning the correct lists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions