generator-webhook.yaml 667 B

12345678910111213141516171819202122232425262728
  1. {% raw %}
  2. apiVersion: generators.external-secrets.io/v1alpha1
  3. kind: Webhook
  4. metadata:
  5. name: webhook
  6. spec:
  7. url: "http://httpbin.org/get?parameter={{ .auth.param }}"
  8. result:
  9. jsonPath: "$.args"
  10. headers:
  11. Content-Type: application/json
  12. Authorization: Basic {{ print .auth.username ":" .auth.password | b64enc }}
  13. secrets:
  14. - name: auth
  15. secretRef:
  16. name: webhook-credentials
  17. ---
  18. apiVersion: v1
  19. kind: Secret
  20. metadata:
  21. name: webhook-credentials
  22. labels:
  23. external-secrets.io/type: webhook #Needed to allow webhook to use this secret
  24. data:
  25. username: dGVzdA== # "test"
  26. password: dGVzdA== # "test"
  27. param: dGVzdA== # "test"
  28. {% endraw %}