forked from argoproj/argo-events
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: File Watcher gateway as core gateway, notification filters to st…
…orage grid gateway, k8 configmap as trigger artifact location. (argoproj#117) * Added notification filters to storage grid gateway * Added file watcher as core gateway. Added readiness probe to gateway transformer to ensure correct ordering of gateway containers startup * Added K8 configmaps as artifact location for triggers * Started adding validation for gateway configurations * Adding validation for gateways, adding gateway type openapi specs * Validation continued
- Loading branch information
1 parent
c9d7d0c
commit 02780f9
Showing
47 changed files
with
1,918 additions
and
662 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: file-watcher-gateway-configmap | ||
data: | ||
fileWatcher.defaultConfig: |- | ||
directory: "/bin/" | ||
type: CREATE | ||
path: x.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Gateway | ||
metadata: | ||
name: file-watcher-gateway | ||
labels: | ||
gateways.argoproj.io/gateway-controller-instanceid: argo-events | ||
gateway-name: "file-watcher-gateway" | ||
spec: | ||
deploySpec: | ||
containers: | ||
- name: "file-watcher-events" | ||
image: "argoproj/file-watcher-gateway" | ||
imagePullPolicy: "Always" | ||
command: ["/bin/file-watcher-gateway"] | ||
serviceAccountName: "argo-events-sa" | ||
configMap: "file-watcher-gateway-configmap" | ||
version: "1.0" | ||
type: "file-watcher" | ||
dispatchMechanism: "HTTP" | ||
watchers: | ||
sensors: | ||
- name: "file-watcher-sensor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: storage-grid-gateway-configmap | ||
data: | ||
storage-grid.defaultConfig: |- | ||
port: "8080" | ||
endpoint: "/" | ||
events: | ||
- "ObjectCreated:Put" | ||
filter: | ||
suffix: ".txt" | ||
prefix: "hello-" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Gateway | ||
metadata: | ||
name: storage-grid-gateway | ||
labels: | ||
gateways.argoproj.io/gateway-controller-instanceid: argo-events | ||
gateway-name: "storage-grid-gateway" | ||
spec: | ||
configMap: "storage-grid-gateway-configmap" | ||
type: "storage-grid" | ||
dispatchMechanism: "HTTP" | ||
version: "1.0" | ||
deploySpec: | ||
containers: | ||
- name: "storage-grid-events" | ||
image: "argoproj/storage-grid-gateway" | ||
imagePullPolicy: "Always" | ||
serviceAccountName: "argo-events-sa" | ||
serviceSpec: | ||
selector: | ||
gateway-name: "storage-grid-gateway" | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
type: LoadBalancer | ||
watchers: | ||
sensors: | ||
- name: "storage-grid-watcher-sensor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Sensor | ||
metadata: | ||
name: file-watcher-sensor | ||
labels: | ||
sensors.argoproj.io/sensor-controller-instanceid: argo-events | ||
spec: | ||
serviceAccountName: argo-events-sa | ||
repeat: true | ||
signals: | ||
- name: file-watcher-gateway/fileWatcher.defaultConfig | ||
triggers: | ||
- name: file-watcher-workflow-trigger | ||
resource: | ||
namespace: argo-events | ||
group: argoproj.io | ||
version: v1alpha1 | ||
kind: Workflow | ||
source: | ||
inline: | | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: file-watcher- | ||
spec: | ||
entrypoint: whalesay | ||
templates: | ||
- | ||
container: | ||
args: | ||
- "hello world" | ||
command: | ||
- cowsay | ||
image: "docker/whalesay:latest" | ||
name: whalesay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Sensor | ||
metadata: | ||
name: storage-grid-watcher-sensor | ||
labels: | ||
sensors.argoproj.io/sensor-controller-instanceid: argo-events | ||
spec: | ||
repeat: true | ||
serviceAccountName: argo-events-sa | ||
signals: | ||
- name: storage-grid-gateway/storage-grid.defaultConfig | ||
triggers: | ||
- name: argo-workflow | ||
resource: | ||
namespace: argo-events | ||
group: argoproj.io | ||
version: v1alpha1 | ||
kind: Workflow | ||
parameters: | ||
- src: | ||
signal: storage-grid-gateway/storage-grid.defaultConfig | ||
path: | ||
value: hello world | ||
dest: spec.templates.0.container.args.0 | ||
source: | ||
inline: | | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: hello-world- | ||
spec: | ||
entrypoint: whalesay | ||
templates: | ||
- name: whalesay | ||
container: | ||
args: | ||
- "hello world" | ||
image: "metalgearsolid/args-printer:latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Integration Test", | ||
"version": "1.0" | ||
}, | ||
"paths": {}, | ||
"definitions": { | ||
"argo-events.S3EventConfig": { | ||
"description": "S3EventConfig contains configuration for bucket notification", | ||
"properties": { | ||
"bucket": { | ||
"type": "string" | ||
}, | ||
"endpoint": { | ||
"type": "string" | ||
}, | ||
"event": { | ||
"type": "string" | ||
}, | ||
"filter": { | ||
"$ref": "#/definitions/argo-events.S3Filter" | ||
}, | ||
"region": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"argo-events.S3Filter": { | ||
"description": "S3Filter represents filters to apply to bucket nofifications for specifying constraints on objects", | ||
"required": [ | ||
"prefix", | ||
"suffix" | ||
], | ||
"properties": { | ||
"prefix": { | ||
"type": "string" | ||
}, | ||
"suffix": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"argo-events.s3Artifact": { | ||
"description": "S3Artifact contains information about an artifact in S3", | ||
"required": [ | ||
"s3EventConfig" | ||
], | ||
"properties": { | ||
"insecure": { | ||
"description": "Mode of operation for s3 client", | ||
"type": "boolean" | ||
}, | ||
"s3EventConfig": { | ||
"description": "S3EventConfig contains configuration for bucket notification", | ||
"$ref": "#/definitions/argo-events.S3EventConfig" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.