Add Proxy field to Provider API

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2020-10-17 14:19:54 +03:00
parent 5f7a8da8a9
commit 2f14e4b74b
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF
4 changed files with 37 additions and 0 deletions

View File

@ -42,6 +42,10 @@ type ProviderSpec struct {
// +optional
Address string `json:"address,omitempty"`
// HTTP(S) address of the proxy
// +optional
Proxy string `json:"proxy,omitempty"`
// Secret reference containing the provider webhook URL
// +optional
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`

View File

@ -52,6 +52,9 @@ spec:
channel:
description: Alert channel for this provider
type: string
proxy:
description: HTTP(S) address of the proxy
type: string
secretRef:
description: Secret reference containing the provider webhook URL
properties:

View File

@ -249,6 +249,18 @@ string
</tr>
<tr>
<td>
<code>proxy</code><br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>HTTP(S) address of the proxy</p>
</td>
</tr>
<tr>
<td>
<code>secretRef</code><br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core">
@ -663,6 +675,18 @@ string
</tr>
<tr>
<td>
<code>proxy</code><br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>HTTP(S) address of the proxy</p>
</td>
</tr>
<tr>
<td>
<code>secretRef</code><br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core">

View File

@ -25,6 +25,10 @@ type ProviderSpec struct {
// +optional
Address string `json:"address,omitempty"`
// HTTP(S) address of the proxy
// +optional
Proxy string `json:"proxy,omitempty"`
// Secret reference containing the provider webhook URL
// +optional
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
@ -79,6 +83,8 @@ spec:
channel: general
# webhook address (ignored if secretRef is specified)
address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
# HTTP(S) proxy (optional)
proxy: https://proxy.corp:8080
# secret containing the webhook address (optional)
secretRef:
name: webhook-url