glooctl install kube
kubectl apply -f \
https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/kube-deploy.yaml
glooctl route create --sort \
--path-exact /github-webhooks \
--upstream default-nats-streaming-4222 \
--function github-webhooks
glooctl route create --sort \
--path-prefix=/ \
--header "User-Agent:Minio.*" \
--upstream default-minio-service-9000
wget https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/
brew install minio/stable/mc
mc config host add gloo http://idit.aws.solo.io:8080 \
gloo.solo.io \
gloo.solo.io
kubectl apply -f \
https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/image-pusher/deploy.yaml
mkdir -p images
mc mirror gloo/bucket ./images -w
browse to ./images in your file browser
unstar/star the git repo to see images appear
export TWITTER_CONSUMER_KEY=<your-twitter-consumer-key>
export TWITTER_CONSUMER_SECRET=<your-twitter-consumer-secret>
export TWITTER_ACCESS_TOKEN=<your-twitter-access-token>
export TWITTER_ACCESS_SECRET=<your-twitter-access-secret>
kubectl create secret -n default generic \
twitter-secret \
--from-literal=TWITTER_CONSUMER_KEY=${TWITTER_CONSUMER_KEY} \
--from-literal=TWITTER_CONSUMER_SECRET=${TWITTER_CONSUMER_SECRET} \
--from-literal=TWITTER_ACCESS_TOKEN=${TWITTER_ACCESS_TOKEN} \
--from-literal=TWITTER_ACCESS_SECRET=${TWITTER_ACCESS_SECRET}
kubectl apply -f \
https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/star-tweeter/deploy.yaml
unstar/star the git repo to see tweets appear
export SLACK_TOKEN=<your-slack-api-token>
kubectl create secret -n default generic slack-secret \
--from-literal=SLACK_TOKEN=${SLACK_TOKEN}
kubectl apply -f \
https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/slack-bot/deploy.yaml
unstar/star the git repo to see slack messages
kubectl delete virtualservice default
kubectl delete -f https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/kube-deploy.yaml
kubectl delete -f https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/image-pusher/deploy.yaml
kubectl delete -f https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/slack-bot/deploy.yaml
kubectl delete -f https://raw.githubusercontent.com/solo-io/gloo/master/example/source_events_from_github/star-tweeter/deploy.yaml