Skip to content

Instantly share code, notes, and snippets.

@welshstew
Created June 18, 2021 14:09
Show Gist options
  • Save welshstew/c38fc9197436a668ae6e58fc24e16fe4 to your computer and use it in GitHub Desktop.
Save welshstew/c38fc9197436a668ae6e58fc24e16fe4 to your computer and use it in GitHub Desktop.
nominatim-openshift - note you need `oc adm policy add-scc-to-user anyuid system:serviceaccount:$NAMESPACE:default`
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nominatim
name: nominatim
namespace: nominatim
spec:
replicas: 1
selector:
matchLabels:
app: nominatim
template:
metadata:
labels:
app: nominatim
spec:
containers:
- env:
- name: PBF_URL
value: https://download.geofabrik.de/europe/monaco-latest.osm.pbf
- name: REPLICATION_URL
value: https://download.geofabrik.de/europe/monaco-updates/
image: docker.io/mediagis/nominatim:3.7
imagePullPolicy: IfNotPresent
name: nominatim
ports:
- containerPort: 8080
protocol: TCP
volumeMounts:
- mountPath: /var/lib/postgresql/12/main
name: nominatim-data
subPath: postgres
- mountPath: /dev/shm
name: dshm
priority: 0
restartPolicy: Always
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
volumes:
- name: nominatim-data
persistentVolumeClaim:
claimName: nominatim-pvc
- name: dshm
emptyDir:
medium: Memory
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: nominatim
name: nominatim-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: gp2
apiVersion: v1
kind: Service
metadata:
name: example
namespace: nominatim
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: nominatim
sessionAffinity: None
type: ClusterIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment