-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support for .namespace parameter in webhook provider (extension of referent auth) #4207
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomerskind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Hi,
Is there any way to inject the namespace (of the ExternalSecret) into the headers of the webhook call?
I would like to be able to have X-Kubernetes-Namespace set to mynamespace in this example.
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
name: webhook-backend
spec:
provider:
webhook:
url: "https://mywebhookserver?parameter={{ .remoteRef.key }}"
result:
jsonPath: "$.args.parameter"
headers:
Content-Type: application/json
Authorization: Basic {{ print .auth.username ":" .auth.password | b64enc }}
X-Kubernetes-Namespace: {{ .namespace }}
secrets:
- name: auth
secretRef:
name: webhook-credentials
namespace: addon-eso
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: webhook-example
namespace: mynamespace
spec:
refreshInterval: "15s"
secretStoreRef:
name: webhook-backend
kind: ClusterSecretStore
target:
name: example-sync
data:
- secretKey: foobar
remoteRef:
key: secret
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerskind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Type
Projects
Status
Done