diff --git a/4.4/kubernetes/configmap.yaml b/4.4/kubernetes/configmap.yaml new file mode 100644 index 0000000..574861d --- /dev/null +++ b/4.4/kubernetes/configmap.yaml @@ -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 \ No newline at end of file diff --git a/4.4/kubernetes/service.yaml b/4.4/kubernetes/service.yaml new file mode 100644 index 0000000..aeac57c --- /dev/null +++ b/4.4/kubernetes/service.yaml @@ -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 \ No newline at end of file diff --git a/4.4/kubernetes/statefulset.yaml b/4.4/kubernetes/statefulset.yaml new file mode 100644 index 0000000..b9d9b63 --- /dev/null +++ b/4.4/kubernetes/statefulset.yaml @@ -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 \ No newline at end of file