Skip to content

Commit

Permalink
Align messages with renaming (#596)
Browse files Browse the repository at this point in the history
Co-authored-by: Vaibhav <vaibhav.page@gmail.com>
  • Loading branch information
hobti01 and VaibhavPage authored Apr 17, 2020
1 parent d8e2b00 commit a20f6be
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 24 deletions.
20 changes: 17 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Open an issue. Please include descriptions of the following:
Argo Events is native to Kubernetes so you'll need a running Kubernetes cluster. This guide includes steps for `Minikube` for local development, but if you have another cluster you can ignore the Minikube specific step 3.

### Requirements
- Golang 1.11
- Golang 1.12
- Docker
- dep

Expand Down Expand Up @@ -49,7 +49,21 @@ make all
Follow [README](README.md#install) to install components.

## Changing Types
If you're making a change to the `pkg/apis` package, please ensure you re-run the K8 code-generator scripts found in the `/hack` folder. First, ensure you have the `generate-groups.sh` script at the path: `vendor/k8s.io/code-generator/`. Next run the following commands in order:
If you're making a change to the `pkg/apis` package, please ensure you re-run the K8 code-generator scripts found in the `/hack` folder.

* Ensure you have the `generate-groups.sh` script at the path: `vendor/k8s.io/code-generator/`.
* Install `gen-crd-api-reference-docs`

```
go get github.com/ahmetb/gen-crd-api-reference-docs
cd $GOPATH/github.com/ahmetb/gen-crd-api-reference-docs
go build
```

* [install pandoc](https://pandoc.org/installing.html)

* Regenerate the code and documentation

```
$ make codegen
make codegen
```
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 @@ -2636,5 +2636,5 @@ <h3 id="argoproj.io/v1alpha1.TLSConfig">TLSConfig
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>81d8555</code>.
on git commit <code>4559972</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 @@ -5210,6 +5211,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>81d8555</code>. </em>
commit <code>4559972</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>81d8555</code>.
on git commit <code>4559972</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>81d8555</code>. </em>
commit <code>4559972</code>. </em>

</p>
6 changes: 3 additions & 3 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 @@ -2929,7 +2929,7 @@ <h3 id="argoproj.io/v1alpha1.TriggerParameter">TriggerParameter
</em>
</td>
<td>
<p>Src contains a source reference to the value of the parameter from a event event</p>
<p>Src contains a source reference to the value of the parameter from a dependency</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -3371,5 +3371,5 @@ <h3 id="argoproj.io/v1alpha1.URLArtifact">URLArtifact
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>81d8555</code>.
on git commit <code>4559972</code>.
</em></p>
7 changes: 4 additions & 3 deletions api/sensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ Description

<td>

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

</td>

Expand Down Expand Up @@ -5821,7 +5822,7 @@ TriggerParameterSource </a> </em>
<p>

Src contains a source reference to the value of the parameter from a
event event
dependency

</p>

Expand Down Expand Up @@ -6698,6 +6699,6 @@ VerifyCert decides whether the connection is secure or not
<p>

<em> Generated with <code>gen-crd-api-reference-docs</code> on git
commit <code>81d8555</code>. </em>
commit <code>4559972</code>. </em>

</p>
2 changes: 1 addition & 1 deletion controllers/sensor/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (ctx *sensorContext) createSensorResources() error {
return err
}

ctx.logger.WithField("name", service.Name).Infoln("generating deployment specification for the sensor")
ctx.logger.WithField("name", service.Name).Infoln("creating the service resource for the sensor")
service, err = ctx.createService(service)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion controllers/sensor/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (ctx *sensorContext) updateDeployment() (*appv1.Deployment, error) {

currentMetadata := ctx.sensor.Status.Resources.Deployment
if currentMetadata == nil {
return nil, errors.New("deployment metadata is expected to be set in gateway object")
return nil, errors.New("deployment metadata is expected to be set in sensor object")
}

currentDeployment, err := ctx.controller.k8sClient.AppsV1().Deployments(currentMetadata.Namespace).Get(currentMetadata.Name, metav1.GetOptions{})
Expand Down
4 changes: 2 additions & 2 deletions controllers/sensor/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func validateTriggerParameter(parameter *v1alpha1.TriggerParameter) error {
return errors.Errorf("parameter source can't be empty")
}
if parameter.Src.DependencyName == "" {
return errors.Errorf("parameter source event can't be empty")
return errors.Errorf("parameter dependency name can't be empty")
}
if parameter.Dest == "" {
return errors.Errorf("parameter destination can't be empty")
Expand Down Expand Up @@ -549,7 +549,7 @@ func validateK8sTriggerPolicy(policy *v1alpha1.K8sResourcePolicy) error {
return nil
}

// validateStatusPolicy validates a http trigger policy
// validateStatusPolicy validates a http trigger policy
func validateStatusPolicy(policy *v1alpha1.StatusPolicy) error {
if policy == nil {
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/sensor/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ const (

// TriggerParameter indicates a passed parameter to a service template
type TriggerParameter struct {
// Src contains a source reference to the value of the parameter from a event event
// Src contains a source reference to the value of the parameter from a dependency
Src *TriggerParameterSource `json:"src" protobuf:"bytes,1,name=src"`
// Dest is the JSONPath of a resource key.
// A path is a series of keys separated by a dot. The colon character can be escaped with '.'
Expand Down

0 comments on commit a20f6be

Please sign in to comment.