Skip to content

Instantly share code, notes, and snippets.

@bskaggs
Created December 3, 2018 22:49
Show Gist options
  • Save bskaggs/37372bb589f281a68c395d5feddc93c7 to your computer and use it in GitHub Desktop.
Save bskaggs/37372bb589f281a68c395d5feddc93c7 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: example-calendar
data:
calendar.jobConfig: |-
interval: "60s"
---
apiVersion: argoproj.io/v1alpha1
kind: Gateway
metadata:
name: example-calendar-gateway
labels:
gateways.argoproj.io/gateway-controller-instanceid: argo-events
spec:
deploySpec:
containers:
- name: "calendar-events"
image: "argoproj/calendar-gateway:v0.6"
imagePullPolicy: "Always"
command: ["/bin/calendar-gateway"]
serviceAccountName: argo-bootstrap
configMap: example-calendar
type: "calendar"
dispatchMechanism: "HTTP"
eventVersion: "1.0"
imageVersion: "v0.6"
watchers:
sensors:
- name: example-calendar-sensor
---
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: example-calendar-sensor
labels:
sensors.argoproj.io/sensor-controller-instanceid: argo-events
spec:
deploySpec:
containers:
- name: sensor
image: "argoproj/sensor:v0.6"
imagePullPolicy: "Always"
command: ["/bin/sensor"]
serviceAccountName: argo-bootstrap
repeat: true
signals:
- name: example-calendar-gateway/calendar.jobConfig
triggers:
- name: example-trigger
resource:
namespace: argo
group: argoproj.io
version: v1alpha1
kind: Workflow
source:
inline: |
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: example
generateName: example-
labels:
workflows.argoproj.io/controller-instanceid: argo
spec:
entrypoint: example
templates:
- name: example
container:
image: docker/whalesay
command: ["cowsay"]
args:
- hello there
{"level":"info","sensor-name":"example-calendar-sensor","port":"9300","message":"sensor started listening"}
{"level":"info","sensor-name":"example-calendar-sensor","message":"watching sensor updates"}
{"level":"info","sensor-name":"example-calendar-sensor","signal-src":"example-calendar-gateway/calendar.jobConfig","message":"signal source"}
{"level":"info","sensor-name":"example-calendar-sensor","signal-name":"example-calendar-gateway/calendar.jobConfig","message":"processing the signal"}
2018/12/03 22:42:51 http: multiple response.WriteHeader calls
{"level":"info","sensor-name":"example-calendar-sensor","message":"sensor updated successfully"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0xfa039f]
goroutine 114 [running]:
github.com/argoproj/argo-events/controllers/sensor.(*sensorExecutionCtx).processSignal(0xc4205e09c0, 0xc42063c180)
/Users/vpage/go/src/github.com/argoproj/argo-events/controllers/sensor/notification-handler.go:187 +0x28f
github.com/argoproj/argo-events/controllers/sensor.(*sensorExecutionCtx).processQueue(0xc4205e09c0)
/Users/vpage/go/src/github.com/argoproj/argo-events/controllers/sensor/notification-handler.go:214 +0x5d
created by github.com/argoproj/argo-events/controllers/sensor.(*sensorExecutionCtx).WatchSignalNotifications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment