Skip to content

Added HostPath, ImagePullSecret and TerminationGracePeriodSeconds support #660

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

Merged
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
2 changes: 1 addition & 1 deletion deployment/k8s/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 0.11.7
description: A dynamic Web Map tile server
name: titiler
version: 1.1.0
version: 1.1.1
icon: https://raw.githubusercontent.com/developmentseed/titiler/main/docs/logos/TiTiler_logo_small.png
maintainers:
- name: emmanuelmathot # Emmanuel Mathot
Expand Down
21 changes: 21 additions & 0 deletions deployment/k8s/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,31 @@ spec:
- mountPath: /config
name: config
readOnly: true
{{- range .Values.extraHostPathMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- if .mountPropagation }}
mountPropagation: {{ .mountPropagation }}
{{- end }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.env.terminationGracePeriodSeconds }}
volumes:
- name: config
configMap:
name: {{ include "titiler.fullname" . }}-configmap
{{- range .Values.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
path: {{ .hostPath }}
type: Directory
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ .name }}
{{- end }}
{{- end }}
{{- with .Values.serviceAccountName }}
serviceAccountName: {{ . | quote }}
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions deployment/k8s/charts/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ ingress:
hosts:
- titiler.charter.uat.esaportal.eu

terminationGracePeriodSeconds: 30

extraHostPathMounts: []
# - name: map-sources
# mountPath: /map-sources/
# hostPath: /home/ubuntu/map-sources
# readOnly: false
# mountPropagation: HostToContainer # OPTIONAL

imagePullSecrets: []

env:
PORT: 80
CPL_TMPDIR: /tmp
Expand Down
11 changes: 11 additions & 0 deletions deployment/k8s/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ image:
nameOverride: ""
fullnameOverride: ""

terminationGracePeriodSeconds: 30

service:
type: ClusterIP
port: 80
Expand All @@ -26,6 +28,15 @@ ingress:
# hosts:
# - titiler.local

extraHostPathMounts: []
# - name: map-sources
# mountPath: /map-sources/
# hostPath: /home/ubuntu/map-sources
# readOnly: false
# mountPropagation: HostToContainer # OPTIONAL

imagePullSecrets: []

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: but I like what you did above with extraHostPathMounts showing an example of what should go there. Can we add # -name: regcred here also please as an example?

env:
PORT: 80
CPL_TMPDIR: /tmp
Expand Down