Skip to content

Commit

Permalink
feat: add slack trigger (#576)
Browse files Browse the repository at this point in the history
* first draft of slack trigger

* remove plaintext slack token

* revisted slack trigger and added tests

* added slack tirgger tutorial

* updating docs for slack trigger

* making namespace optional for slack trigger

* making namespace optional for slack trigger, removing unneccesary code

* adding comments
  • Loading branch information
chaseterry authored Apr 7, 2020
1 parent b1925a6 commit 244bb21
Show file tree
Hide file tree
Showing 15 changed files with 803 additions and 24 deletions.
4 changes: 2 additions & 2 deletions api/event-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ <h3 id="argoproj.io/v1alpha1.EventSourceSpec">EventSourceSpec
<td>
<code>type</code></br>
<em>
Argo Events common.EventSourceType
github.com/argoproj/argo-events/pkg/apis/common.EventSourceType
</em>
</td>
<td>
Expand Down Expand Up @@ -2474,5 +2474,5 @@ <h3 id="argoproj.io/v1alpha1.StripeEventSource">StripeEventSource
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>739f169</code>.
on git commit <code>7021110</code>.
</em></p>
5 changes: 3 additions & 2 deletions api/event-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,8 @@ Generic event source

<td>

<code>type</code></br> <em> Argo Events common.EventSourceType </em>
<code>type</code></br> <em>
github.com/argoproj/argo-events/pkg/apis/common.EventSourceType </em>

</td>

Expand Down Expand Up @@ -4903,6 +4904,6 @@ all types of events will be processed. More info at
<p>

<em> Generated with <code>gen-crd-api-reference-docs</code> on git
commit <code>739f169</code>. </em>
commit <code>7021110</code>. </em>

</p>
10 changes: 5 additions & 5 deletions api/gateway.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h3 id="argoproj.io/v1alpha1.Gateway">Gateway
<td>
<code>type</code></br>
<em>
Argo Events common.EventSourceType
github.com/argoproj/argo-events/pkg/apis/common.EventSourceType
</em>
</td>
<td>
Expand Down Expand Up @@ -186,7 +186,7 @@ <h3 id="argoproj.io/v1alpha1.Gateway">Gateway
<td>
<code>eventProtocol</code></br>
<em>
Argo Events common.EventProtocol
github.com/argoproj/argo-events/pkg/apis/common.EventProtocol
</em>
</td>
<td>
Expand Down Expand Up @@ -304,7 +304,7 @@ <h3 id="argoproj.io/v1alpha1.GatewaySpec">GatewaySpec
<td>
<code>type</code></br>
<em>
Argo Events common.EventSourceType
github.com/argoproj/argo-events/pkg/apis/common.EventSourceType
</em>
</td>
<td>
Expand Down Expand Up @@ -354,7 +354,7 @@ <h3 id="argoproj.io/v1alpha1.GatewaySpec">GatewaySpec
<td>
<code>eventProtocol</code></br>
<em>
Argo Events common.EventProtocol
github.com/argoproj/argo-events/pkg/apis/common.EventProtocol
</em>
</td>
<td>
Expand Down Expand Up @@ -671,5 +671,5 @@ <h3 id="argoproj.io/v1alpha1.Subscribers">Subscribers
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>739f169</code>.
on git commit <code>7021110</code>.
</em></p>
16 changes: 9 additions & 7 deletions api/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ configurations for the gateway

<td>

<code>type</code></br> <em> Argo Events common.EventSourceType </em>
<code>type</code></br> <em>
github.com/argoproj/argo-events/pkg/apis/common.EventSourceType </em>

</td>

Expand Down Expand Up @@ -357,8 +358,8 @@ Port on which the gateway event source processor is running on.

<td>

<code>eventProtocol</code></br> <em> Argo Events common.EventProtocol
</em>
<code>eventProtocol</code></br> <em>
github.com/argoproj/argo-events/pkg/apis/common.EventProtocol </em>

</td>

Expand Down Expand Up @@ -600,7 +601,8 @@ configurations for the gateway

<td>

<code>type</code></br> <em> Argo Events common.EventSourceType </em>
<code>type</code></br> <em>
github.com/argoproj/argo-events/pkg/apis/common.EventSourceType </em>

</td>

Expand Down Expand Up @@ -687,8 +689,8 @@ Port on which the gateway event source processor is running on.

<td>

<code>eventProtocol</code></br> <em> Argo Events common.EventProtocol
</em>
<code>eventProtocol</code></br> <em>
github.com/argoproj/argo-events/pkg/apis/common.EventProtocol </em>

</td>

Expand Down Expand Up @@ -1321,6 +1323,6 @@ NATS refers to the subscribers over NATS protocol.
<p>

<em> Generated with <code>gen-crd-api-reference-docs</code> on git
commit <code>739f169</code>. </em>
commit <code>7021110</code>. </em>

</p>
106 changes: 102 additions & 4 deletions api/sensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h3 id="argoproj.io/v1alpha1.ArtifactLocation">ArtifactLocation
<td>
<code>s3</code></br>
<em>
Argo Events common.S3Artifact
github.com/argoproj/argo-events/pkg/apis/common.S3Artifact
</em>
</td>
<td>
Expand Down Expand Up @@ -816,7 +816,7 @@ <h3 id="argoproj.io/v1alpha1.EventDependencyFilter">EventDependencyFilter
<td>
<code>context</code></br>
<em>
Argo Events common.EventContext
github.com/argoproj/argo-events/pkg/apis/common.EventContext
</em>
</td>
<td>
Expand Down Expand Up @@ -1704,7 +1704,7 @@ <h3 id="argoproj.io/v1alpha1.NodeStatus">NodeStatus
<td>
<code>event</code></br>
<em>
Argo Events common.Event
github.com/argoproj/argo-events/pkg/apis/common.Event
</em>
</td>
<td>
Expand Down Expand Up @@ -2345,6 +2345,89 @@ <h3 id="argoproj.io/v1alpha1.SensorStatus">SensorStatus
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.SlackTrigger">SlackTrigger
</h3>
<p>
(<em>Appears on:</em>
<a href="#argoproj.io/v1alpha1.TriggerTemplate">TriggerTemplate</a>)
</p>
<p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>parameters</code></br>
<em>
<a href="#argoproj.io/v1alpha1.TriggerParameter">
[]TriggerParameter
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Parameters is the list of key-value extracted from event&rsquo;s payload that are applied to
the trigger resource.</p>
</td>
</tr>
<tr>
<td>
<code>slackToken</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#secretkeyselector-v1-core">
Kubernetes core/v1.SecretKeySelector
</a>
</em>
</td>
<td>
<p>SlackToken refers to the Kubernetes secret that holds the slack token required to send messages.</p>
</td>
</tr>
<tr>
<td>
<code>namespace</code></br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Namespace to read the password secret from.
This is required if the password secret selector is specified.</p>
</td>
</tr>
<tr>
<td>
<code>channel</code></br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Channel refers to which Slack channel to send slack message.</p>
</td>
</tr>
<tr>
<td>
<code>message</code></br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Message refers to the message to send to the Slack channel.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.StandardK8sTrigger">StandardK8sTrigger
</h3>
<p>
Expand Down Expand Up @@ -2679,6 +2762,7 @@ <h3 id="argoproj.io/v1alpha1.TriggerParameter">TriggerParameter
<a href="#argoproj.io/v1alpha1.KafkaTrigger">KafkaTrigger</a>,
<a href="#argoproj.io/v1alpha1.NATSTrigger">NATSTrigger</a>,
<a href="#argoproj.io/v1alpha1.OpenFaasTrigger">OpenFaasTrigger</a>,
<a href="#argoproj.io/v1alpha1.SlackTrigger">SlackTrigger</a>,
<a href="#argoproj.io/v1alpha1.StandardK8sTrigger">StandardK8sTrigger</a>,
<a href="#argoproj.io/v1alpha1.Trigger">Trigger</a>)
</p>
Expand Down Expand Up @@ -3085,6 +3169,20 @@ <h3 id="argoproj.io/v1alpha1.TriggerTemplate">TriggerTemplate
<p>NATS refers to the trigger designed to place message on NATS subject.</p>
</td>
</tr>
<tr>
<td>
<code>slack</code></br>
<em>
<a href="#argoproj.io/v1alpha1.SlackTrigger">
SlackTrigger
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Slack refers to the trigger designed to send slack notification message.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.URLArtifact">URLArtifact
Expand Down Expand Up @@ -3131,5 +3229,5 @@ <h3 id="argoproj.io/v1alpha1.URLArtifact">URLArtifact
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>739f169</code>.
on git commit <code>7021110</code>.
</em></p>
Loading

0 comments on commit 244bb21

Please sign in to comment.