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

netrc configmap #380

Merged
merged 3 commits into from
Oct 1, 2021
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
4 changes: 2 additions & 2 deletions deployment/k8s/titiler/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "1.0"
appVersion: 0.3.10
description: A dynamic Web Map tile server
name: titiler
version: 0.1.0
version: 0.2.0
9 changes: 9 additions & 0 deletions deployment/k8s/titiler/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "titiler.fullname" . }}-configmap
data:
{{- if .Values.netrc }}
netrc: {{ tpl (.Values.netrc) . | quote }}
{{- end }}

18 changes: 17 additions & 1 deletion deployment/k8s/titiler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ spec:
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $key, $val := .Values.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- if .Values.netrc }}
- name: NETRC
value: /config/netrc
- name: CURLOPT_NETRC
value: CURL_NETRC_OPTIONAL
- name: CURLOPT_NETRC_FILE
value: /config/netrc
{{- end }}
ports:
- name: http
containerPort: 80
Expand All @@ -37,6 +45,14 @@ spec:
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath: /config
name: config
readOnly: true
volumes:
- name: config
configMap:
name: {{ include "titiler.fullname" . }}-configmap
{{- with .Values.serviceAccountName }}
serviceAccountName: {{ . | quote }}
{{- end }}
Expand Down