Skip to content

Commit

Permalink
added kubernetes deployment yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshojha5 committed Aug 6, 2024
1 parent 7ff6e9e commit 0dc006b
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 4.4/kubernetes/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nominatim-config
data:
PBF_URL: https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf
14 changes: 14 additions & 0 deletions 4.4/kubernetes/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: nominatim
labels:
app: nominatim
spec:
ports:
- port: 8080
targetPort: 8080
protocol: TCP
name: http
selector:
app: nominatim
64 changes: 64 additions & 0 deletions 4.4/kubernetes/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nominatim
spec:
serviceName: "nominatim"
replicas: 1
selector:
matchLabels:
app: nominatim
template:
metadata:
labels:
app: nominatim
spec:
initContainers:
- name: init
image: mediagis/nominatim:4.4
command:
- bash
args:
- '-c'
- 'mkdir -p /var/lib/postgresql/14/main && bash /app/init.sh'
envFrom:
- configMapRef:
name: nominatim-config
volumeMounts:
- name: nominatim-data
mountPath: /nominatim
- name: postgres-data
mountPath: /var/lib/postgresql
containers:
- name: nominatim
image: mediagis/nominatim:4.4
command:
- bash
args:
- /app/start.sh
envFrom:
- configMapRef:
name: nominatim-config
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: nominatim-data
mountPath: /nominatim
- name: postgres-data
mountPath: /var/lib/postgresql
volumeClaimTemplates:
- metadata:
name: nominatim-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
- metadata:
name: postgres-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 50Gi

0 comments on commit 0dc006b

Please sign in to comment.