Skip to content

Commit

Permalink
Adding a config.toml value to the helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
arschles committed Oct 16, 2019
1 parent 81102aa commit 183866d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions charts/athens-proxy/templates/config-configtoml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.configToml.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "fullname" . }}-configtoml
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
data:
config.toml: |-
{{ .Values.configToml.data }}
{{- end -}}
10 changes: 10 additions & 0 deletions charts/athens-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ spec:
mountPath: "/usr/local/lib"
readOnly: true
{{- end }}
{{- if .Values.configToml}}
- name: configtoml
mountPath: "/config"
readOnly: true
{{- end }}
{{- if .Values.netrc.enabled }}
- name: netrc
mountPath: "/etc/netrc"
Expand Down Expand Up @@ -192,6 +197,11 @@ spec:
configMap:
name: {{ template "fullname" . }}-upstream
{{- end }}
{{- if .Values.configToml.enabled }}
- name: configtoml-config
configMap:
name: {{ template "fullname" .}}-configtoml
{{- end }}
{{- if .Values.netrc.enabled }}
- name: netrc
secret:
Expand Down
10 changes: 10 additions & 0 deletions charts/athens-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ gitconfig:
# Key in the kubernetes secret that contains git config data.
secretKey: gitconfig

configToml:
enabled: false
data: |-
# See https://docs.gomods.io/configuration/ for an introduction on what
# values you can put in here.
#
# Otherwise, for an exhaustive list of the configuration values you
# can put here, see config.dev.toml at the root of the
# github.com/gomods/athens repository
upstreamProxy:
# This is where you can set the URL for the upstream module repository.
# If 'enabled' is set to true, Athens will try to download modules from the upstream when it doesn't find them in its own storage.
Expand Down

0 comments on commit 183866d

Please sign in to comment.