Skip to content

Commit

Permalink
feat: make sensor deployment template spec optional. Closes #599 (#613)
Browse files Browse the repository at this point in the history
* feat: make sensor deployment template spec optional

* user mergo

* spec change
  • Loading branch information
whynowy authored Apr 30, 2020
1 parent e7ecad2 commit ce9ae25
Show file tree
Hide file tree
Showing 19 changed files with 657 additions and 170 deletions.
4 changes: 2 additions & 2 deletions api/event-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,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 @@ -2649,5 +2649,5 @@ <h3 id="argoproj.io/v1alpha1.TLSConfig">TLSConfig
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>2bedd9d</code>.
on git commit <code>8c611e5</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 @@ -1491,7 +1491,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 @@ -5235,6 +5236,6 @@ ClientKeyPath refers the file path that contains client key.
<p>

<em> Generated with <code>gen-crd-api-reference-docs</code> on git
commit <code>2bedd9d</code>. </em>
commit <code>8c611e5</code>. </em>

</p>
6 changes: 3 additions & 3 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 @@ -292,7 +292,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 @@ -647,5 +647,5 @@ <h3 id="argoproj.io/v1alpha1.Subscribers">Subscribers
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>2bedd9d</code>.
on git commit <code>8c611e5</code>.
</em></p>
8 changes: 5 additions & 3 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 @@ -577,7 +578,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 @@ -1275,6 +1277,6 @@ NATS refers to the subscribers over NATS protocol.
<p>

<em> Generated with <code>gen-crd-api-reference-docs</code> on git
commit <code>2bedd9d</code>. </em>
commit <code>8c611e5</code>. </em>

</p>
43 changes: 36 additions & 7 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@
"required": [
"serverURL",
"secure",
"triggerBody",
"spec",
"payload"
],
"properties": {
Expand Down Expand Up @@ -1138,9 +1138,12 @@
"description": "ServerURL is the url of the gRPC server that executes custom trigger",
"type": "string"
},
"triggerBody": {
"description": "TriggerBody is the custom trigger resource specification that custom trigger gRPC server knows how to interpret.",
"type": "string"
"spec": {
"description": "Spec is the custom trigger resource specification that custom trigger gRPC server knows how to interpret.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -1801,7 +1804,6 @@
"required": [
"dependencies",
"triggers",
"template",
"subscription"
],
"properties": {
Expand Down Expand Up @@ -1848,8 +1850,8 @@
"$ref": "#/definitions/io.argoproj.sensor.v1alpha1.Subscription"
},
"template": {
"description": "Template contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core.",
"$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec"
"description": "Template is the pod specification for the sensor",
"$ref": "#/definitions/io.argoproj.sensor.v1alpha1.Template"
},
"triggers": {
"description": "Triggers is a list of the things that this sensor evokes. These are the outputs from this sensor.",
Expand Down Expand Up @@ -2026,6 +2028,33 @@
}
}
},
"io.argoproj.sensor.v1alpha1.Template": {
"description": "Template holds the information of a sensor deployment template",
"type": "object",
"properties": {
"container": {
"description": "Container is the main container image to run in the gateway pod",
"$ref": "#/definitions/io.k8s.api.core.v1.Container"
},
"securityContext": {
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.",
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"serviceAccountName": {
"description": "ServiceAccountName is the name of the ServiceAccount to use to run gateway pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
"type": "string"
},
"volumes": {
"description": "Volumes is a list of volumes that can be mounted by containers in a workflow.",
"type": "array",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.Volume"
},
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge"
}
}
},
"io.argoproj.sensor.v1alpha1.TimeFilter": {
"description": "TimeFilter describes a window in time. DataFilters out event events that occur outside the time limits. In other words, only events that occur after Start and before Stop will pass this filter.",
"type": "object",
Expand Down
95 changes: 85 additions & 10 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 @@ -2079,14 +2079,14 @@ <h3 id="argoproj.io/v1alpha1.Sensor">Sensor
<td>
<code>template</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#podtemplatespec-v1-core">
Kubernetes core/v1.PodTemplateSpec
<a href="#argoproj.io/v1alpha1.Template">
Template
</a>
</em>
</td>
<td>
<p>Template contains sensor pod specification. For more information,
read <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core</a>.</p>
<em>(Optional)</em>
<p>Template is the pod specification for the sensor</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2272,14 +2272,14 @@ <h3 id="argoproj.io/v1alpha1.SensorSpec">SensorSpec
<td>
<code>template</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#podtemplatespec-v1-core">
Kubernetes core/v1.PodTemplateSpec
<a href="#argoproj.io/v1alpha1.Template">
Template
</a>
</em>
</td>
<td>
<p>Template contains sensor pod specification. For more information,
read <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core</a>.</p>
<em>(Optional)</em>
<p>Template is the pod specification for the sensor</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2782,6 +2782,81 @@ <h3 id="argoproj.io/v1alpha1.TLSConfig">TLSConfig
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.Template">Template
</h3>
<p>
(<em>Appears on:</em>
<a href="#argoproj.io/v1alpha1.SensorSpec">SensorSpec</a>)
</p>
<p>
<p>Template holds the information of a sensor deployment template</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>serviceAccountName</code></br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>ServiceAccountName is the name of the ServiceAccount to use to run gateway pod.
More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/">https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/</a></p>
</td>
</tr>
<tr>
<td>
<code>container</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#container-v1-core">
Kubernetes core/v1.Container
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Container is the main container image to run in the gateway pod</p>
</td>
</tr>
<tr>
<td>
<code>volumes</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#volume-v1-core">
[]Kubernetes core/v1.Volume
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Volumes is a list of volumes that can be mounted by containers in a workflow.</p>
</td>
</tr>
<tr>
<td>
<code>securityContext</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#podsecuritycontext-v1-core">
Kubernetes core/v1.PodSecurityContext
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>SecurityContext holds pod-level security attributes and common container settings.
Optional: Defaults to empty. See type description for default values of each field.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.TimeFilter">TimeFilter
</h3>
<p>
Expand Down Expand Up @@ -3375,5 +3450,5 @@ <h3 id="argoproj.io/v1alpha1.URLArtifact">URLArtifact
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>2bedd9d</code>.
on git commit <code>8c611e5</code>.
</em></p>
Loading

0 comments on commit ce9ae25

Please sign in to comment.