Skip to content

webhook source in configurations create new servers per config #242

@pepordev

Description

@pepordev

I've been testing the solution with several webhooks configurations we have and the actual solution creates a new server for each config which could cause some issues.

  • Port colissions
  • Port not being accesible as those need to be exposed

Proposal

I would suggest that reloader does only expose 1 server for the webhook sources and then based on the path for each config reloader process or skip configurations.

The webhook configuration would only require the secretIdentifierOnPayload and use a configurable path and port

Example

---
apiVersion: reloader.external-secrets.io/v1alpha1
kind: Config
metadata:
  name: webhook-to-external-secrets-from-keeper
spec:
  notificationSources:
    - type: Webhook
      webhook:
        secretIdentifierOnPayload: record_uid

---
apiVersion: reloader.external-secrets.io/v1alpha1
kind: Config
metadata:
  name: webhook-to-external-secrets-from-xxx
spec:
  notificationSources:
    - type: Webhook
      webhook:
        secretIdentifierOnPayload: data.0.uid

if a payload comes in with an existing path record_uid then it only process the webhook-to-external-secrets-from-keeper and skip the other one.

What do you think? let me know your thoughts, i'm willing on contribute to it...

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