Skip to content

Commit

Permalink
add pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirianni committed Apr 16, 2024
1 parent 0c4c4c8 commit 03ac056
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- name: Deploy Postgres
run: kubectl apply -f test/helper/postgres/postgres.yaml

- name: Deploy PubSub Emulator
run: kubectl apply -f test/helper/pubsub/pubsub.yaml

- name: Wait For Ingress Pods
run: |
sleep 5
Expand All @@ -74,4 +77,16 @@ jobs:
if: always()
run: |
kubectl -n default get all
kubectl -n default logs pod/release-name-bindplane-0
kubectl -n default logs sts/release-name-bindplane || kubectl -n default logs deploy/release-name-bindplane
- name: "Debug: Get postgres status and logs"
if: always()
run: |
kubectl -n postgres get all
kubectl -n postgres logs pod/postgres-0
- name: "Debug: Get pubsub status and logs"
if: always()
run: |
kubectl -n pubsub get all
kubectl -n pubsub logs pod/pubsub-emulator-0
59 changes: 59 additions & 0 deletions test/helper/pubsub/pubsub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
kind: Namespace
apiVersion: v1
metadata:
name: pubsub
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pubsub-emulator
namespace: pubsub
spec:
serviceName: pubsub-emulator
selector:
matchLabels:
app: pubsub-emulator
template:
metadata:
labels:
app: pubsub-emulator
spec:
containers:
- image: messagebird/gcloud-pubsub-emulator:latest
name: emulator
ports:
- containerPort: 8681
- containerPort: 8682
resources:
requests:
cpu: 100m
memory: 512Mi
limits:
memory: 512Mi
env:
- name: PUBSUB_PROJECT1
value: bindplane-local-dev,test-topic:test-subscription
livenessProbe:
tcpSocket:
port: 8681
readinessProbe:
tcpSocket:
port: 8682
---
apiVersion: v1
kind: Service
metadata:
labels:
app: pubsub-emulator
name: pubsub-emulator
namespace: pubsub
spec:
ports:
- port: 8681
protocol: TCP
targetPort: 8681
name: emulator
selector:
app: pubsub-emulator
sessionAffinity: None
type: ClusterIP

0 comments on commit 03ac056

Please sign in to comment.