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

Release 1.0.0 #227

Merged
merged 24 commits into from
Nov 25, 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
28 changes: 26 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,38 @@

## master / unreleased

## 1.0.0 / 2021-11-25
### This Release includes BREAKING CHANGES


* [FEATURE] Add autoscaler for nginx #249
* [FEATURE] Add in lifecycle for querier, querier-frontend, and distributor #243
* [FEATURE] Add ingressClass to ingressResource #227
* [ENHANCEMENT] Allow overriding cortex Version #227
* [ENHANCEMENT] Update policy k8 Version #227
* [ENHANCEMENT] Improved default values for bitnami/memcached #227
* [ENHANCEMENT] Update container names to match cortex-mixin expectations #233
* [CHANGE] Deprecate *.persistence #227
* [CHANGE] Remove legacy clusterPort from alertmanager #227
* [CHANGE] Remove useless nginx.serviceMonitor section #227
* [CHANGE] Configure blocks storage engine by default instead of chunks #227
* [CHANGE] Adjusted cortex default configuration #227
* server.grpc_server_max_recv_msg_size: 104857600 -> 10485760
* server.grpc_server_max_send_msg_size: 104857600 -> 10485760
* server.grpc_server_max_concurrent_streams: 1000 -> 10000
* server.ingester_client.grpc_client_config.max_recv_msg_size: 104857600 -> 10485760
* server.ingester_client.grpc_client_config.max_send_msg_size: 104857600 -> 10485760
* config.limits.enforce_metric_name: false -> true
* config.ruler.enable_api: false -> true
* configure memberlist automatically
* config.ingester.lifecycler.final_sleep: 0s -> 30s
* config.querier.query_ingesters_within: 12h -> 13h
* config.querier.query_store_after: 0 -> 12h
* [BUGFIX] Fix nil pointer evaluation when using `ruler.dictonaries` option #242
* [BUGFIX] Fixed hardcoding of containerSecurityContext in Ingester statefulset #258
* [BUGFIX] Don't create nginx resources unless nginx is enabled. #261
* [DEPENDENCY] Update Helm release memcached to v5.15.5 #241
* [DEPENDENCY] Update Helm release memcached to v5.15.8 #247
* [FEATURE] Add in lifecycle for querier, querier-frontend, and distributor #243
* [BUGFIX] Don't create nginx resources unless nginx is enabled. #261

## 0.7.0 / 2021-10-05

Expand Down
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 0.7.0
version: 1.0.0
nschad marked this conversation as resolved.
Show resolved Hide resolved
appVersion: v1.10.0
description: 'Horizontally scalable, highly available, multi-tenant, long term Prometheus.'
home: https://cortexmetrics.io/
Expand Down
372 changes: 155 additions & 217 deletions README.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ config:
replication_factor: 1
kvstore:
store: "memberlist"
walconfig:
wal_enabled: true
recover_from_wal: true
wal_dir: "/data/wal"

# See https://github.com/cortexproject/cortex/blob/master/docs/configuration/config-file-reference.md#storage_config
storage:
Expand Down
Binary file added docs/cortex-1.0.0.tgz
Binary file not shown.
49 changes: 49 additions & 0 deletions docs/guides/configure_memcached.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
layout: page
title: Configure memcached
parent: Guides
has_children: true
has_toc: false
nav_order: 5
---
# Configuring memcached as the caching store

Correctly configuring memcached for your needs is a very delicate task. But courtesy of [@thobianchi](https://github.com/thobianchi) this might be a good start.

{% raw %}
```yaml
index_cache:
backend: memcached
memcached:
addresses: 'dns+{{ include "cortex.fullname" $ }}-memcached-blocks-index:11211'
timeout: 300ms
max_idle_connections: 750
max_async_concurrency: 100
max_async_buffer_size: 10000000
max_get_multi_concurrency: 750
max_get_multi_batch_size: 1000
max_item_size: 16777216
chunks_cache:
backend: memcached
memcached:
addresses: 'dns+{{ include "cortex.fullname" $ }}-memcached-blocks:11211'
timeout: 300ms
max_idle_connections: 750
max_async_concurrency: 100
max_async_buffer_size: 10000000
max_get_multi_concurrency: 750
max_get_multi_batch_size: 1000
max_item_size: 33554432
metadata_cache:
backend: memcached
memcached:
addresses: 'dns+{{ include "cortex.fullname" $ }}-blocks-metadata:11211'
timeout: 300ms
max_idle_connections: 750
max_async_concurrency: 100
max_async_buffer_size: 10000000
max_get_multi_concurrency: 750
max_get_multi_batch_size: 1000
max_item_size: 16777216
```
{% endraw %}
2 changes: 2 additions & 0 deletions docs/guides/configure_rules_via_sidecar.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config:
In AlertManager, the data_dir and local storage directory should be the same.
In the Ruler, there needs to be two separate volumes. One is read-only and serves as the location shared with the sidecar that contains all of the rules that were derived from configmaps (/tmp/rules). The other is read-write and used by the Ruler itself for its own management of rules, etc (/data).
Example ConfigMap containing a rule:
{% raw %}
```yaml
kind: ConfigMap
metadata:
Expand All @@ -67,6 +68,7 @@ data:
title: Node {{ $labels.instance }} has high CPU usage

```
{% endraw %}
Example ConfigMap containing an alertmanager-config:
```yaml
apiVersion: v1
Expand Down
77 changes: 69 additions & 8 deletions docs/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,68 @@ entries:
cortex:
- apiVersion: v2
appVersion: v1.10.0
created: "2021-10-05T18:09:51.28390429+02:00"
created: "2021-11-25T12:41:00.279235255+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.8
- alias: memcached-index-read
condition: memcached-index-read.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.8
- alias: memcached-index-write
condition: memcached-index-write.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.8
- alias: memcached-frontend
condition: memcached-frontend.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.8
- alias: memcached-blocks-index
name: memcached
repository: https://charts.bitnami.com/bitnami
tags:
- blocks-storage-memcached
version: 5.15.8
- alias: memcached-blocks
name: memcached
repository: https://charts.bitnami.com/bitnami
tags:
- blocks-storage-memcached
version: 5.15.8
- alias: memcached-blocks-metadata
name: memcached
repository: https://charts.bitnami.com/bitnami
tags:
- blocks-storage-memcached
version: 5.15.8
description: Horizontally scalable, highly available, multi-tenant, long term
Prometheus.
digest: 3c27d2941176790979570a3d40e1cd4a35401233e797ba49c326f03349976656
home: https://cortexmetrics.io/
icon: https://avatars2.githubusercontent.com/u/43045022?s=200&v=4
kubeVersion: ^1.19.0-0
maintainers:
- email: [email protected]
name: Tom Hayward
url: https://github.com/kd7lxl
- email: [email protected]
name: Niclas Schad
url: https://github.com/ShuzZzle
name: cortex
sources:
- https://github.com/cortexproject/cortex-helm-chart
urls:
- https://cortexproject.github.io/cortex-helm-chart/cortex-1.0.0.tgz
version: 1.0.0
- apiVersion: v2
appVersion: v1.10.0
created: "2021-11-25T12:41:00.27228442+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -64,7 +125,7 @@ entries:
version: 0.7.0
- apiVersion: v2
appVersion: v1.9.0
created: "2021-10-05T18:09:51.278044055+02:00"
created: "2021-11-25T12:41:00.266405546+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -121,7 +182,7 @@ entries:
version: 0.6.0
- apiVersion: v2
appVersion: v1.9.0
created: "2021-10-05T18:09:51.273958318+02:00"
created: "2021-11-25T12:41:00.262202546+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -178,7 +239,7 @@ entries:
version: 0.5.0
- apiVersion: v2
appVersion: v1.7.0
created: "2021-10-05T18:09:51.270299325+02:00"
created: "2021-11-25T12:41:00.258539999+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -234,7 +295,7 @@ entries:
version: 0.4.1
- apiVersion: v2
appVersion: v1.7.0
created: "2021-10-05T18:09:51.266950968+02:00"
created: "2021-11-25T12:41:00.254977053+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -290,7 +351,7 @@ entries:
version: 0.4.0
- apiVersion: v2
appVersion: v1.6.0
created: "2021-10-05T18:09:51.264318072+02:00"
created: "2021-11-25T12:41:00.252290029+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -346,7 +407,7 @@ entries:
version: 0.3.0
- apiVersion: v2
appVersion: v1.4.0
created: "2021-10-05T18:09:51.261485189+02:00"
created: "2021-11-25T12:41:00.249175198+01:00"
dependencies:
- alias: memcached
condition: memcached.enabled
Expand Down Expand Up @@ -377,4 +438,4 @@ entries:
urls:
- https://cortexproject.github.io/cortex-helm-chart/cortex-0.2.0.tgz
version: 0.2.0
generated: "2021-10-05T18:09:51.255455506+02:00"
generated: "2021-11-25T12:41:00.240725328+01:00"
10 changes: 8 additions & 2 deletions templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{{- if eq .Values.config.storage.engine "chunks" }}
Cortex chunks storage has been deprecated, and it's now in maintenance mode: all Cortex users are encouraged to migrate to the blocks storage.
No new features will be added to the chunks storage.
Unlike the official cortex default configuration this helm-chart does not run the chunk engine by default.
{{- end }}

Verify the application is working by running these commands:
kubectl --namespace {{ .Release.Namespace }} port-forward service/{{ include "cortex.fullname" . }} {{ .Values.distributor.service.port }}
curl http://127.0.0.1:{{ .Values.distributor.service.port }}/api/prom/label
kubectl --namespace {{ .Release.Namespace }} port-forward service/{{ include "cortex.querierFullname" . }} {{ .Values.config.server.http_listen_port }}
curl http://127.0.0.1:{{ .Values.config.server.http_listen_port }}/services
53 changes: 28 additions & 25 deletions templates/alertmanager/alertmanager-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.useExternalConfig }}
{{- if .Values.useExternalConfig }}
checksum/config: {{ .Values.externalConfigVersion }}
{{- else }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end}}
{{- end }}
{{- with .Values.alertmanager.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -48,7 +48,7 @@ spec:
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end}}
{{- end }}
{{- end }}
containers:
{{- if .Values.alertmanager.sidecar.enabled }}
Expand Down Expand Up @@ -92,35 +92,38 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.alertmanager.sidecar.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.alertmanager.sidecar.securityContext | nindent 12 }}
{{- if .Values.alertmanager.sidecar.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.alertmanager.sidecar.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
volumeMounts:
- name: storage
mountPath: "/data"
{{- end}}
- name: alertmanager
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "-target=alertmanager"
- "-config.file=/etc/cortex/cortex.yaml"
{{- if .Values.configs.enabled }}
{{- if .Values.configs.enabled }}
- "-alertmanager.configs.url=http://{{ template "cortex.configsFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.http_listen_port }}"
{{- end }}
{{- end }}
{{- range $key, $value := .Values.alertmanager.extraArgs }}
- "-{{ $key }}={{ $value }}"
{{- end }}
volumeMounts:
{{- if .Values.alertmanager.extraVolumeMounts }}
{{ toYaml .Values.alertmanager.extraVolumeMounts | nindent 12}}
{{- end }}
{{- if .Values.alertmanager.extraVolumeMounts }}
{{ toYaml .Values.alertmanager.extraVolumeMounts | nindent 12}}
{{- end }}
- name: config
mountPath: /etc/cortex
- name: runtime-config
mountPath: /etc/cortex-runtime-config
- name: storage
mountPath: "/data"
subPath: {{ .Values.alertmanager.persistence.subPath }}
{{- with .Values.alertmanager.persistentVolume.subPath }}
subPath: {{ . }}
{{- end }}
ports:
- name: http-metrics
containerPort: {{ .Values.config.server.http_listen_port }}
Expand All @@ -139,13 +142,13 @@ spec:
{{- if .Values.alertmanager.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.alertmanager.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.alertmanager.env }}
env:
{{- if .Values.alertmanager.env }}
{{- toYaml .Values.alertmanager.env | nindent 12 }}
{{- end }}
{{- if .Values.alertmanager.extraContainers }}
{{ toYaml .Values.alertmanager.extraContainers | indent 8}}
{{- end }}
{{- toYaml .Values.alertmanager.env | nindent 12 }}
{{- end }}
{{- if .Values.alertmanager.extraContainers }}
{{ toYaml .Values.alertmanager.extraContainers | indent 8}}
{{- end }}
nodeSelector:
{{- toYaml .Values.alertmanager.nodeSelector | nindent 8 }}
affinity:
Expand All @@ -156,14 +159,14 @@ spec:
volumes:
- name: config
secret:
{{- if .Values.useExternalConfig }}
{{- if .Values.useExternalConfig }}
secretName: {{ .Values.externalConfigSecretName }}
{{- else }}
{{- else }}
secretName: {{ template "cortex.fullname" . }}
{{- end }}
{{- if .Values.alertmanager.extraVolumes }}
{{ toYaml .Values.alertmanager.extraVolumes | indent 8}}
{{- end }}
{{- end }}
{{- if .Values.alertmanager.extraVolumes }}
{{ toYaml .Values.alertmanager.extraVolumes | indent 8}}
{{- end }}
- name: runtime-config
configMap:
name: {{ template "cortex.fullname" . }}-runtime-config
Expand Down
4 changes: 4 additions & 0 deletions templates/alertmanager/alertmanager-poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if and (gt (int .Values.alertmanager.replicas) 1) (.Values.alertmanager.podDisruptionBudget) }}
{{- if .Capabilities.APIVersions.Has "policy/v1"}}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ include "cortex.alertmanagerFullname" . }}
Expand Down
Loading