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

Add support for http(s) proxy when sending alerts #62

Merged
merged 3 commits into from
Oct 19, 2020

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Oct 17, 2020

Changes:

  • Add Proxy optional field to Provider API
  • Add URL prefix validation to CRDs
  • Implement http(s) proxy for alerts

Proxy example:

apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
  name: slack
  namespace: default
spec:
  type: slack
  channel: general
  address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
  proxy: https://proxy.corp:8080

Fix: #61

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan added area/docs Documentation related issues and pull requests enhancement New feature or request area/alerting Alerting related issues and PRs labels Oct 17, 2020
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Given the existence of some other (low level) proxy protocols than HTTP/S (e.g. SOCKS5), I would prefix the field names with the protocol to guarantee we are not shooting ourselves in the foot right now, and leave room for other implementations later (if any).

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

On second thoughts, we can require a protocol to be defined and make decisions based on that, if it ever gets to supporting other things.

api/v1beta1/provider_types.go Outdated Show resolved Hide resolved
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan merged commit 127ecc1 into main Oct 19, 2020
@stefanprodan stefanprodan deleted the provider-http-proxy branch October 19, 2020 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Alerting related issues and PRs area/docs Documentation related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add http(s) proxy support
2 participants