Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Interim fix accepting self-signed tls certs in postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasK33 committed Feb 12, 2021
1 parent 9025e41 commit 50bfcd4
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 23 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ jobs:
- run: mkdir -p ~/.kube/ && touch ~/.kube/config && echo ${{ secrets.KUBECONFIG }} | base64 --decode > ~/.kube/config
- run: touch .env && echo ${{ secrets.K8S_DOTENV }} | base64 --decode > .env
- run: npm ci
- run: npm run record
- run: npm run build
# - run: npm run record
# - run: npm run build
- run: npm run synth
- run: kubectl apply -f dist/fortify.k8s.yaml
- uses: sarisia/actions-status-discord@v1
if: always()
Expand Down
1 change: 0 additions & 1 deletion devops/kubernetes/src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
KafkaTopic,
KafkaTopicProps,
} from "../imports/kafka.strimzi.io";
import { Postgres } from "../imports/kubedb.com";
import { RedisFailover } from "../imports/databases.spotahome.com";
import { Elasticsearch } from "../imports/elasticsearch.k8s.elastic.co";
import { Kibana } from "../imports/kibana.k8s.elastic.co";
Expand Down
4 changes: 2 additions & 2 deletions services/17kmmrbot/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/17kmmrbot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "17kmmrbot",
"version": "1.5.3",
"version": "1.5.4",
"description": "Fortify twitch bot",
"private": "true",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions services/backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend",
"version": "1.6.4",
"version": "1.6.5",
"private": true,
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions services/fsm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/fsm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fsm",
"version": "1.11.1",
"version": "1.11.2",
"description": "Finite State Machine",
"author": {
"name": "Thomas Kosiewski"
Expand Down
4 changes: 2 additions & 2 deletions services/historization/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/historization/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "historization",
"version": "1.8.2",
"version": "1.8.3",
"description": "A historization service responsible for persisting info",
"author": {
"name": "Thomas Kosiewski"
Expand Down
4 changes: 2 additions & 2 deletions services/jobs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/jobs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jobs",
"version": "1.5.1",
"version": "1.5.2",
"description": "Job scripts and one off scripts",
"author": {
"name": "Thomas Kosiewski"
Expand Down
4 changes: 2 additions & 2 deletions services/shared/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shared",
"version": "1.15.2",
"version": "1.15.3",
"description": "Shared library for fortify micro services",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down
8 changes: 6 additions & 2 deletions services/shared/src/connectors/postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const {
POSTGRES_PORT,
POSTGRES_DATABASE,
POSTGRES_SSL = "false",
// NODE_ENV,
DB_LOG,
} = process.env;

Expand Down Expand Up @@ -71,7 +70,6 @@ export class PostgresConnector implements HealthCheckable, Connector {

const connection = createConnection({
type: "postgres",
ssl: POSTGRES_SSL === "true",
host: POSTGRES_HOST,
port: parseInt(POSTGRES_PORT ?? "5432"),
username: POSTGRES_USER,
Expand All @@ -83,6 +81,12 @@ export class PostgresConnector implements HealthCheckable, Connector {
// synchronize: NODE_ENV === "development",
synchronize: false,
logging: DB_LOG === "true",
ssl:
POSTGRES_SSL === "true"
? {
rejectUnauthorized: false,
}
: undefined,
poolErrorHandler: (e) => {
this.logger.error("Postgres pool connection error occurred", {
e,
Expand Down

0 comments on commit 50bfcd4

Please sign in to comment.