Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Kubernetes deployment yaml files #574

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 7 additions & 0 deletions 4.4/kubernetes/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- configmap.yaml
- statefulset.yaml
- service.yaml
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