Skip to content

Commit

Permalink
Merge branch 'release-gh-workflow' of https://github.com/mickkael/arg…
Browse files Browse the repository at this point in the history
…o-events into release-gh-workflow
  • Loading branch information
mickkael committed Jun 5, 2021
2 parents 262bd8b + fa57838 commit 2956ff0
Show file tree
Hide file tree
Showing 26 changed files with 1,243 additions and 439 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ eval $(minikube docker-env)

#### 5. Build the project
```
make all
make build
```

Follow [README](README.md#install) to install components.
Expand Down
4 changes: 3 additions & 1 deletion USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Organizations below are **officially** using Argo Events. Please send a PR with your organization name if you are using Argo Events.

1. [3Rein](https://www.3rein.com)
1. [7shifts](https://www.7shifts.com)
1. [BioBox Analytics](https://biobox.io)
1. [BlackRock](https://www.blackrock.com/)
1. [Canva](https://www.canva.com/)
Expand All @@ -13,8 +14,9 @@ Organizations below are **officially** using Argo Events. Please send a PR with
1. [Intuit](https://www.intuit.com/)
1. [OneCause](https://www.onecause.com/)
1. [Produvar](https://www.produvar.com/)
1. [ProPoint Solutions](https://supersalon.com)
1. [PwC Labs](https://www.pwc.com/us/en/careers/why-pwc/what-we-do/what-we-do-pwc-labs.html)
1. [Rakuten](https://www.rakuten.com)
1. [RTL Nederland](https://www.rtl.nl)
1. [Viaduct](https://www.viaduct.ai/)
1. [Woolworths Group](https://www.woolworthsgroup.com.au/)
1. [7shifts](https://www.7shifts.com)
36 changes: 34 additions & 2 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions api/sensor.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions api/sensor.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions docs/sensors/triggers/http-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,14 @@ The `Status` holds a list of response statuses that are considered valid.
contextKey: type
dest: type
method: POST // GET, DELETE, POST, PUT, HEAD, etc.
policy:
status:
allow:
- 200
- 201
retryStrategy:
steps: 3
duration: 3s
policy:
status:
allow:
- 200
- 201

The above HTTP trigger will be treated successful only if the HTTP request returns with either 200 or 201 status.

Expand Down
2 changes: 1 addition & 1 deletion eventsources/common/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewController() *Controller {
func NewRoute(hookContext *v1alpha1.WebhookContext, logger *zap.SugaredLogger, eventSourceName, eventName string, metrics *metrics.Metrics) *Route {
return &Route{
Context: hookContext,
Logger: logger.With(logging.LabelEventSourceName, eventSourceName, logging.LabelEventName, eventName),
Logger: logger,
EventSourceName: eventSourceName,
EventName: eventName,
Active: false,
Expand Down
4 changes: 2 additions & 2 deletions eventsources/sources/kafka/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,14 @@ func getSaramaConfig(kafkaEventSource *v1alpha1.KafkaEventSource, log *zap.Sugar

config.Net.SASL.Mechanism = sarama.SASLMechanism(kafkaEventSource.SASL.GetMechanism())

user, err := common.GetSecretFromVolume(kafkaEventSource.SASL.User)
user, err := common.GetSecretFromVolume(kafkaEventSource.SASL.UserSecret)
if err != nil {
log.Errorf("Error getting user value from secret: %v", err)
return nil, err
}
config.Net.SASL.User = user

password, err := common.GetSecretFromVolume(kafkaEventSource.SASL.Password)
password, err := common.GetSecretFromVolume(kafkaEventSource.SASL.PasswordSecret)
if err != nil {
log.Errorf("Error getting password value from secret: %v", err)
return nil, err
Expand Down
16 changes: 11 additions & 5 deletions examples/event-sources/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ spec:
# limitEventsPerSecond: 1
# version: "2.5.0"

# example-tls:
# url: "kafka.argo-events:9092"
# topic: "topic-2"
# jsonBody: true
# partition: "1"
## Enable TLS authentication ( not to be used with SASL)
# tls:
# caCertSecret:
# name: my-secret
Expand All @@ -48,3 +44,13 @@ spec:
# clientKeySecret:
# name: my-secret
# key: client-key-key

## Enable SASL authentication (not to be used with TLS)
# sasl:
# mechanism: PLAIN
# passwordSecret:
# key: password
# name: my-user
# userSecret:
# key: user
# name: my-user
29 changes: 29 additions & 0 deletions examples/sensors/http-trigger-secure-headers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: http-trigger
spec:
dependencies:
- name: test-dep
eventSourceName: webhook
eventName: example
triggers:
- template:
name: http-trigger
http:
secureHeaders:
- name: serviceToken
valueFrom:
secretKeyRef:
name: dev-services-secret
key: serviceToken
url: http://http-server.default.svc.cluster.local:8080/hello
method: GET
retryStrategy:
steps: 3
duration: 3s
policy:
status:
allow:
- 200
- 201
17 changes: 15 additions & 2 deletions pkg/apis/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ type BasicAuth struct {
Password *corev1.SecretKeySelector `json:"password,omitempty" protobuf:"bytes,2,opt,name=password"`
}

// SecureHeader refers to HTTP Headers with auth tokens as values
type SecureHeader struct {
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
// Values can be read from either secrets or configmaps
ValueFrom *ValueFromSource `json:"valueFrom,omitempty" protobuf:"bytes,2,opt,name=valueFrom"`
}

// ValueFromSource allows you to reference keys from either a Configmap or Secret
type ValueFromSource struct {
SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,1,opt,name=secretKeyRef"`
ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,2,opt,name=configMapKeyRef"`
}

// TLSConfig refers to TLS configuration for a client.
type TLSConfig struct {
// CACertSecret refers to the secret that contains the CA cert
Expand Down Expand Up @@ -136,9 +149,9 @@ type SASLConfig struct {
Mechanism string `json:"mechanism,omitempty" protobuf:"bytes,1,opt,name=mechanism"`
// User is the authentication identity (authcid) to present for
// SASL/PLAIN or SASL/SCRAM authentication
User *corev1.SecretKeySelector `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
UserSecret *corev1.SecretKeySelector `json:"userSecret,omitempty" protobuf:"bytes,2,opt,name=user"`
// Password for SASL/PLAIN authentication
Password *corev1.SecretKeySelector `json:"password,omitempty" protobuf:"bytes,3,opt,name=password"`
PasswordSecret *corev1.SecretKeySelector `json:"passwordSecret,omitempty" protobuf:"bytes,3,opt,name=password"`
}

// Backoff for an operation
Expand Down
55 changes: 51 additions & 4 deletions pkg/apis/common/deepcopy_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2956ff0

Please sign in to comment.