forked from cortexproject/cortex-helm-chart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optionally pass cortex config as configmap.
Fixes cortexproject#235. Signed-off-by: Josh Carp <[email protected]>
- Loading branch information
Showing
20 changed files
with
294 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
ingress: | ||
enabled: true | ||
|
||
useConfigMap: true | ||
|
||
config: | ||
ingester: | ||
lifecycler: | ||
join_after: 30s | ||
final_sleep: 30s | ||
tokens_file_path: "/data/tokens" | ||
ring: | ||
replication_factor: 1 | ||
kvstore: | ||
store: "memberlist" | ||
|
||
# See https://github.com/cortexproject/cortex/blob/master/docs/configuration/config-file-reference.md#storage_config | ||
storage: | ||
engine: blocks | ||
blocks_storage: | ||
backend: "filesystem" | ||
tsdb: | ||
dir: "/data/tsdb" | ||
bucket_store: | ||
sync_dir: "/data/tsdb-sync" | ||
filesystem: | ||
dir: "/data/store" | ||
|
||
distributor: | ||
ring: | ||
kvstore: | ||
store: memberlist | ||
|
||
ruler: | ||
ring: | ||
kvstore: | ||
store: memberlist | ||
|
||
ruler_storage: | ||
backend: "filesystem" | ||
filesystem: | ||
dir: "/data/store" | ||
|
||
alertmanager_storage: | ||
backend: "filesystem" | ||
filesystem: | ||
dir: "/data/store" | ||
|
||
memberlist: | ||
join_members: | ||
- '{{ include "cortex.fullname" $ }}-memberlist' | ||
|
||
ingester: | ||
replicas: 1 | ||
autoscaling: | ||
enabled: true | ||
minReplicas: 1 | ||
statefulSet: | ||
enabled: false | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
compactor: | ||
replicas: 1 | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
distributor: | ||
replicas: 1 | ||
autoscaling: | ||
enabled: true | ||
minReplicas: 1 | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
querier: | ||
replicas: 1 | ||
autoscaling: | ||
enabled: true | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
query_frontend: | ||
replicas: 1 | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
nginx: | ||
replicas: 1 | ||
autoscaling: | ||
enabled: true | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
config: | ||
httpSnippet: |- | ||
# http snippet | ||
mainSnippet: |- | ||
# main snippet | ||
serverSnippet: |- | ||
# server snippet | ||
runtimeconfigmap: | ||
annotations: | ||
foo: bar | ||
alertmanager: | ||
replicas: 1 | ||
statefulSet: | ||
enabled: false | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
ruler: | ||
replicas: 1 | ||
enabled: true | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
store_gateway: | ||
replicas: 1 | ||
extraVolumes: | ||
- name: tmp-test | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: tmp-test | ||
mountPath: /tmp-test | ||
|
||
tags: | ||
blocks-storage-memcached: true | ||
memcached: | ||
enabled: true | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
# https://github.com/helm/helm/issues/9136 | ||
requests: | ||
cpu: 0 | ||
memory: 0 | ||
memcached-index-read: | ||
enabled: true | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
requests: | ||
cpu: 0 | ||
memory: 0 | ||
memcached-index-write: | ||
enabled: true | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
requests: | ||
cpu: 0 | ||
memory: 0 | ||
memcached-frontend: | ||
enabled: true | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
requests: | ||
cpu: 0 | ||
memory: 0 | ||
memcached-blocks: | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
requests: | ||
cpu: 0 | ||
memory: 0 | ||
memcached-blocks-index: | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
requests: | ||
cpu: 0 | ||
memory: 0 | ||
memcached-blocks-metadata: | ||
architecture: standalone | ||
replicaCount: 1 | ||
resources: | ||
requests: | ||
cpu: 0 | ||
memory: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
layout: page | ||
title: Configure with configmap | ||
parent: Guides | ||
has_children: true | ||
has_toc: false | ||
--- | ||
# Configuring using configmap | ||
|
||
By default, cortex configuration is managed using a `Secret`. To use a `ConfigMap` instead, set `useConfigMap`: | ||
|
||
{% raw %} | ||
```yaml | ||
useConfigMap: true | ||
``` | ||
{% endraw %} | ||
Note: if `useConfigMap` is enabled, sensitive values should be stored in separate secrets, then referenced in the config [using environment variables](https://cortexmetrics.io/docs/configuration/configuration-file/#use-environment-variables-in-the-configuration). Use `extraVolumes`, `extraVolumeMounts`, `extraEnvs`, and `extraArgs` to add environment variables from secrets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if (and (not .Values.useExternalConfig) (.Values.useConfigMap)) }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "cortex.fullname" . }}-config | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cortex.labels" . | nindent 4 }} | ||
data: | ||
cortex.yaml: | | ||
{{- tpl (toYaml .Values.config) . | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.