Skip to content

Commit

Permalink
Merge pull request #31 from WorldHealthOrganization/fix/kubernetesFile
Browse files Browse the repository at this point in the history
Update persistentvolume.yml
  • Loading branch information
f11h authored Mar 1, 2022
2 parents 1166592 + b254d95 commit 7da7147
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 58 deletions.
102 changes: 51 additions & 51 deletions kubernetes/gateway-postgres/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ddcc-gateway-postgres
namespace: default
spec:
selector:
matchLabels:
kind: Deployment
metadata:
name: ddcc-gateway-postgres
namespace: default
spec:
selector:
matchLabels:
app: ddcc-gateway-postgres
template:
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
vault.hashicorp.com/agent-init-first: "true"
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-postgres: postgres-db/data/gateway
vault.hashicorp.com/agent-inject-template-postgres: |
{{- with secret "postgres-db/data/gateway" -}}
export POSTGRES_DB={{ .Data.data.POSTGRES_DB }}
export POSTGRES_USER={{ .Data.data.POSTGRES_USER }}
export POSTGRES_PASSWORD={{ .Data.data.POSTGRES_PASSWORD }}
{{- end -}}
vault.hashicorp.com/agent-pre-populate-only: "true"
vault.hashicorp.com/role: gateway-postgresdb
creationTimestamp: null
labels:
app: ddcc-gateway-postgres
template:
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
vault.hashicorp.com/agent-init-first: "true"
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-postgres: postgres-db/data/gateway
vault.hashicorp.com/agent-inject-template-postgres: |
{{- with secret "postgres-db/data/gateway" -}}
export POSTGRES_DB={{ .Data.data.POSTGRES_DB }}
export POSTGRES_USER={{ .Data.data.POSTGRES_USER }}
export POSTGRES_PASSWORD={{ .Data.data.POSTGRES_PASSWORD }}
{{- end -}}
vault.hashicorp.com/agent-pre-populate-only: "true"
vault.hashicorp.com/role: gateway-postgresdb
creationTimestamp: null
labels:
app: ddcc-gateway-postgres
spec:
containers:
- args:
- -c
- . /vault/secrets/postgres && /usr/local/bin/docker-entrypoint.sh postgres
command:
- /bin/sh
env:
- name: PROXY_ADDRESS_FORWARDING
value: "true"
image: postgres:latest
imagePullPolicy: IfNotPresent
name: ddcc-gateway-postgres
ports:
- containerPort: 5432
name: postgres-fhir
protocol: TCP
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgresdb
serviceAccount: ddcc-gateway
serviceAccountName: ddcc-gateway
volumes:
- name: postgresdb
persistentVolumeClaim:
claimName: ddcc-gateway-pv-claim
spec:
containers:
- args:
- -c
- . /vault/secrets/postgres && /usr/local/bin/docker-entrypoint.sh postgres
command:
- /bin/sh
env:
- name: PROXY_ADDRESS_FORWARDING
value: "true"
image: postgres:latest
imagePullPolicy: IfNotPresent
name: ddcc-gateway-postgres
ports:
- containerPort: 5432
name: postgres-fhir
protocol: TCP
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgresdb
serviceAccount: ddcc-gateway
serviceAccountName: ddcc-gateway
volumes:
- name: postgresdb
persistentVolumeClaim:
claimName: ddcc-gateway-pv-claim
16 changes: 15 additions & 1 deletion kubernetes/gateway-postgres/persistentvolume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,18 @@ kind: PersistentVolume
metadata:
labels:
app: ddcc-gateway
name: ddcc-gateway-pv-volume
name: ddcc-gateway-pv-volume
spec:
capacity:
storage: 2Gi
hostPath:
path: /mnt/data
type: ''
accessModes:
- ReadWriteMany
claimRef:
kind: PersistentVolumeClaim
namespace: default
name: ddcc-gateway-pv-claim
storageClassName: manual
volumeMode: Filesystem
6 changes: 5 additions & 1 deletion kubernetes/gateway-postgres/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ metadata:
name: ddcc-gateway-postgres
namespace: default
spec:
type: ClusterIP
type: ClusterIP
ports:
- protocol: TCP
port: 5432
targetPort: 5432
6 changes: 5 additions & 1 deletion kubernetes/gateway/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ metadata:
name: ddcc-gateway
namespace: default
spec:
type: LoadBalancer
type: LoadBalancer
ports:
- protocol: TCP
port: 443
targetPort: 8090
8 changes: 4 additions & 4 deletions kubernetes/gateway/serviceAccount.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: ddcc-gateway
namespace: default
kind: ServiceAccount
metadata:
name: ddcc-gateway
namespace: default

0 comments on commit 7da7147

Please sign in to comment.