Skip to content

Commit

Permalink
fix: dial tcp connect: connection refused
Browse files Browse the repository at this point in the history
  • Loading branch information
DPS0340 committed Jan 12, 2022
1 parent 788da2b commit 780929f
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 48 deletions.
17 changes: 0 additions & 17 deletions build/postgres/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion k8s/backend-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
name: backend
spec:
ports:
- name: "8000"
- name: http
port: 8000
targetPort: 8000
selector:
Expand Down
16 changes: 2 additions & 14 deletions k8s/database-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ spec:
io.kompose.service: database
spec:
containers:
- command:
- /bin/sh
- -c
- >
sleep 20s;
postgres
env:
- env:
- name: ELASTIC_PASSWORD
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -108,7 +102,7 @@ spec:
configMapKeyRef:
key: POSTGRES_USER
name: production-env-env
image: a891/deepmush_postgres:latest
image: bitnami/postgresql:latest
name: database
ports:
- containerPort: 5432
Expand All @@ -117,15 +111,9 @@ spec:
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: database-data
volumeMounts:
- mountPath: /scripts
name: database-scripts
restartPolicy: Always
volumes:
- hostPath:
path: /var/local/deepmush/db
name: database-data
- hostPath:
path: /var/local/deepmush/scripts
name: database-scripts
status: {}
2 changes: 1 addition & 1 deletion k8s/elk-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
name: elk
spec:
ports:
- name: "5601"
- name: http
port: 5601
targetPort: 5601
- name: "9200"
Expand Down
2 changes: 1 addition & 1 deletion k8s/grafana-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
name: grafana
spec:
ports:
- name: "3000"
- name: http
port: 3000
targetPort: 3000
selector:
Expand Down
15 changes: 8 additions & 7 deletions k8s/ingress.yaml → k8s/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ kind: Ingress
metadata:
name: inspekt
annotations:
kubernetes.io/ingress.class: "traefik"
cert-manager.io/cluster-issuer: "letsencrypt"
kubernetes.io/ingress.class: traefik
cert-manager.io/cluster-issuer: letsencrypt
creationTimestamp: null
spec:
tls:
- hosts:
Expand All @@ -20,7 +21,7 @@ spec:
service:
name: pgadmin
port:
number: 80
name: http
- host: mongo-express.deepmush.io
http:
paths:
Expand All @@ -30,7 +31,7 @@ spec:
service:
name: mongo-express
port:
number: 8081
name: http
- host: backend.deepmush.io
http:
paths:
Expand All @@ -40,7 +41,7 @@ spec:
service:
name: backend
port:
number: 8000
name: http
- host: kibana.deepmush.io
http:
paths:
Expand All @@ -50,7 +51,7 @@ spec:
service:
name: elk
port:
number: 5601
name: http
- host: grafana.deepmush.io
http:
paths:
Expand All @@ -60,4 +61,4 @@ spec:
service:
name: grafana
port:
number: 3000
name: http
2 changes: 1 addition & 1 deletion k8s/mongo-express-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
name: mongo-express
spec:
ports:
- name: "8081"
- name: http
port: 8081
targetPort: 8081
selector:
Expand Down
2 changes: 1 addition & 1 deletion k8s/pgadmin-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
name: pgadmin
spec:
ports:
- name: "80"
- name: http
port: 80
targetPort: 80
selector:
Expand Down
21 changes: 21 additions & 0 deletions k8s/traefik/patch-traefik.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
spec:
template:
spec:
containers:
- args:
- --global.checknewversion
- --global.sendanonymoususage
- --entryPoints.metrics.address=:9100/tcp
- --entryPoints.traefik.address=:9000/tcp
- --entryPoints.web.address=:8000/tcp
- --entryPoints.websecure.address=:8443/tcp
- --api.dashboard=true
- --ping=true
- --metrics.prometheus=true
- --metrics.prometheus.entrypoint=metrics
- --providers.kubernetescrd
- --providers.kubernetesingress
- --providers.kubernetesingress.ingressendpoint.publishedservice=kube-system/traefik
- --entrypoints.websecure.http.tls=true
- --log.level=DEBUG
name: traefik
5 changes: 0 additions & 5 deletions scripts/start-db.sh

This file was deleted.

0 comments on commit 780929f

Please sign in to comment.