Twitter event source implementation for Knative Eventing using ContainerSource
.
Add your Twitter API keys in secrets.yaml
file in deploy/templates
.
Check secrets.yaml.example
file in deploy/templates
for reference
All the secrets should be in base64
format in the secrets.yaml
P.S. your secrets file should always be gitignored and dockerignored to avoid leaking secrets
Add your Twitter search query as QUERY
parameter in configmap.yaml
QUERY
is taken as an environment variable in the application.
By default QUERY
is set to google
in the configmap
make docker-build
make docker-run
The default entrypoint while running the docker image on local machine is /bin/sh
make docker-push
make docker
Make sure you have knative installed on the cluster
make staging
It creates a docker image from your current working directory and uploads it to docker hub before depolying the image \
If you are looking to deploy to staging without building and pushing docker image, use
make staging-rollout
make production
Takes the latest production
image from docker hub to deploy
Make sure you have github webhooks
configured on dockerhub
- To change the default namespace and docker repository see
Makefile
- In order to run the application properly, make sure to set
knative-eventing-injection=enabled
as alabel
on yournamespace
--sink
is taken as a commandline argument in the GoLang app