Skip to content

Commit

Permalink
v0.0.1 for osrm-backend chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioan Damian committed Jan 25, 2021
1 parent 29c4787 commit 0b132ee
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 4 deletions.
33 changes: 30 additions & 3 deletions charts/osrm-backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,39 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- osrm-routed
- --algorithm
- mld
{{- if .Values.mapName }}
- /data/{{ .Values.mapName }}
{{- else }}
- /data/romania-latest.osrm
{{- end }}
{{- if .Values.env }}
env:
{{ range $k, $v := .Values.env }}
- name: {{ $k | quote }}
value: {{ $v | quote }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 80
containerPort: {{ .Values.containerPort }}
protocol: TCP
livenessProbe:
httpGet:
path: /
path: {{ .Values.healthCheckPath }}
port: http
readinessProbe:
httpGet:
path: /
path: {{ .Values.healthCheckPath }}
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: maps
mountPath: /data
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -59,3 +78,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: maps
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "osrm-backend.fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
28 changes: 28 additions & 0 deletions charts/osrm-backend/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.persistence.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "osrm-backend.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "osrm-backend.labels" . | nindent 4 }}
{{- with .Values.persistence.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- with .Values.persistence.finalizers }}
finalizers:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClassName }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- end -}}
{{- end -}}
14 changes: 13 additions & 1 deletion charts/osrm-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

mapName: ""
containerPort: 5000

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand All @@ -37,7 +40,7 @@ securityContext: {}
# runAsUser: 1000

service:
type: ClusterIP
type: NodePort
port: 80

ingress:
Expand Down Expand Up @@ -77,3 +80,12 @@ nodeSelector: {}
tolerations: []

affinity: {}

persistence:
enabled: false
storageClassName: ""
accessModes:
- ReadWriteMany
size: 8Gi
annotations: {}
finalizers: []

0 comments on commit 0b132ee

Please sign in to comment.