Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
charts
.tgz
cortex
7 changes: 2 additions & 5 deletions Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ dependencies:
- name: memcached
repository: https://kubernetes-charts.storage.googleapis.com/
version: 3.2.3
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 8.6.13
digest: sha256:1a40fe2aae73dfcc54eeb47bad91111c91bcb0eeec9b9dd24e5e0bd2e54a3d9c
generated: "2020-04-04T20:29:40.131333Z"
digest: sha256:15343a3a535fa858a532546a47dbb63e1379be1d4081f55b01de56db3d2b7617
generated: "2020-07-02T10:49:04.929498-07:00"
8 changes: 8 additions & 0 deletions templates/alertmanager-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.alertmanager.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -96,7 +100,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.alertmanager.extraVolumes }}
{{ toYaml .Values.alertmanager.extraVolumes | indent 8}}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions templates/configs-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.configs.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -104,7 +108,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.configsdb_postgresql.enabled }}
- name: postgres-password
secret:
Expand Down
8 changes: 8 additions & 0 deletions templates/distributor-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.distributor.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -96,7 +100,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.distributor.extraVolumes }}
{{ toYaml .Values.distributor.extraVolumes | indent 8}}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions templates/ingester-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.ingester.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -102,7 +106,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.ingester.extraVolumes }}
{{ toYaml .Values.ingester.extraVolumes | indent 8}}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion templates/nginx-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/nginx-config.yaml") . | sha256sum }}
{{- with .Values.nginx.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions templates/querier-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.querier.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -103,7 +107,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.querier.extraVolumes }}
{{ toYaml .Values.querier.extraVolumes | indent 8}}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions templates/query-frontend-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.query_frontend.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -96,7 +100,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.query_frontend.extraVolumes }}
{{ toYaml .Values.query_frontend.extraVolumes | indent 8}}
{{- end }}
8 changes: 8 additions & 0 deletions templates/ruler-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.ruler.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -101,7 +105,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.ruler.extraVolumes }}
{{ toYaml .Values.ruler.extraVolumes | indent 8}}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.useExternalConfig }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -10,3 +11,4 @@ metadata:
heritage: {{ .Release.Service }}
data:
cortex.yaml: {{ tpl (toYaml .Values.config) . | b64enc}}
{{- end }}
8 changes: 8 additions & 0 deletions templates/table-manager-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- with .Values.table_manager.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -95,7 +99,11 @@ spec:
volumes:
- name: config
secret:
{{- if eq .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.table_manager.extraVolumes }}
{{ toYaml .Values.table_manager.extraVolumes | indent 8}}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ serviceAccount:
annotations: {}


useExternalConfig: false
externalConfigSecretName: "secret-with-config.yaml"
externalConfigVersion: "0"
config:
auth_enabled: false
ingester:
Expand Down