-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): Test pubsub and postgres in CI (#116)
* Deploy test postgres * add pubsub * support pubsub dev options * test postgres and pubsub * rename labels test case to pubsub, implement pubsub and postgres, add to ci * bump chart version * set resource req and limits * remove max parallel
- Loading branch information
Showing
10 changed files
with
227 additions
and
22 deletions.
There are no files selected for viewing
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
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Required options | ||
config: | ||
username: bpuser | ||
password: bppass | ||
secret_key: 12D8FB6E-1532-4A4C-97AF-95A430BE5E6E | ||
sessions_secret: 4484766F-5016-4077-B8E0-0DE1D637854B | ||
licenseUseSecret: true | ||
|
||
extraPodLabels: | ||
extraKey: extraValue | ||
extraKey2: extraValue2 | ||
|
||
prometheus: | ||
extraPodLabels: | ||
extraKeyProm: extraValueProm | ||
extraKeyProm2: extraValueProm2 | ||
|
||
backend: | ||
type: postgres | ||
postgres: | ||
host: postgres.postgres.svc.cluster.local | ||
database: bindplane | ||
username: postgres | ||
password: password | ||
maxConnections: 20 | ||
|
||
eventbus: | ||
type: 'pubsub' | ||
pubsub: | ||
projectid: 'my-project' | ||
topic: 'bindplane' | ||
insecure: true | ||
endpoint: "pubsub-emulator.pubsub.svc.cluster.local:8681" | ||
|
||
replicas: 3 | ||
|
||
resources: | ||
requests: | ||
memory: 100Mi | ||
cpu: 100m | ||
limits: | ||
memory: 100Mi | ||
cpu: 100m |
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,75 @@ | ||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: postgres | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: postgres | ||
namespace: postgres | ||
spec: | ||
serviceName: postgres | ||
selector: | ||
matchLabels: | ||
app: postgres | ||
template: | ||
metadata: | ||
labels: | ||
app: postgres | ||
spec: | ||
initContainers: | ||
- name: take-data-dir-ownership | ||
image: alpine:3 | ||
command: | ||
- chown | ||
- -R | ||
- 70:70 | ||
- /data | ||
volumeMounts: | ||
- name: database | ||
mountPath: /data | ||
containers: | ||
- image: postgres:14.7-alpine3.17 | ||
name: postgres | ||
ports: | ||
- containerPort: 5432 | ||
name: postgres | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
limits: | ||
memory: 100Mi | ||
env: | ||
- name: POSTGRES_PASSWORD | ||
value: password | ||
- name: PGDATA | ||
value: /data/postgresql | ||
volumeMounts: | ||
- mountPath: /data | ||
name: database | ||
livenessProbe: | ||
tcpSocket: | ||
port: 5432 | ||
volumes: | ||
- name: database | ||
emptyDir: {} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: postgres | ||
name: postgres | ||
namespace: postgres | ||
spec: | ||
ports: | ||
- port: 5432 | ||
protocol: TCP | ||
targetPort: postgres | ||
name: postgres | ||
selector: | ||
app: postgres | ||
sessionAffinity: None | ||
type: ClusterIP |
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,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 |