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

Enabled flags #319

Merged
merged 11 commits into from
Feb 23, 2022
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ Kubernetes: `^1.19.0-0`
| distributor.​autoscaling.​targetMemoryUtilizationPercentage | int | `0` | |
| distributor.​containerSecurityContext.​enabled | bool | `true` | |
| distributor.​containerSecurityContext.​readOnlyRootFilesystem | bool | `true` | |
| distributor.​enabled | bool | `true` | |
| distributor.​env | list | `[]` | |
| distributor.​extraArgs | object | `{}` | Additional Cortex container arguments, e.g. log.level (debug, info, warn, error) |
| distributor.​extraContainers | list | `[]` | |
Expand Down Expand Up @@ -377,6 +378,7 @@ Kubernetes: `^1.19.0-0`
| ingester.​autoscaling.​targetMemoryUtilizationPercentage | int | `80` | |
| ingester.​containerSecurityContext.​enabled | bool | `true` | |
| ingester.​containerSecurityContext.​readOnlyRootFilesystem | bool | `true` | |
| ingester.​enabled | bool | `true` | |
| ingester.​env | list | `[]` | |
| ingester.​extraArgs | object | `{}` | Additional Cortex container arguments, e.g. log.level (debug, info, warn, error) |
| ingester.​extraContainers | list | `[]` | |
Expand Down Expand Up @@ -538,6 +540,7 @@ Kubernetes: `^1.19.0-0`
| querier.​autoscaling.​targetMemoryUtilizationPercentage | int | `0` | |
| querier.​containerSecurityContext.​enabled | bool | `true` | |
| querier.​containerSecurityContext.​readOnlyRootFilesystem | bool | `true` | |
| querier.​enabled | bool | `true` | |
| querier.​env | list | `[]` | |
| querier.​extraArgs | object | `{}` | Additional Cortex container arguments, e.g. log.level (debug, info, warn, error) |
| querier.​extraContainers | list | `[]` | |
Expand Down Expand Up @@ -582,6 +585,7 @@ Kubernetes: `^1.19.0-0`
| query_frontend.​annotations | object | `{}` | |
| query_frontend.​containerSecurityContext.​enabled | bool | `true` | |
| query_frontend.​containerSecurityContext.​readOnlyRootFilesystem | bool | `true` | |
| query_frontend.​enabled | bool | `true` | |
| query_frontend.​env | list | `[]` | |
| query_frontend.​extraArgs | object | `{}` | Additional Cortex container arguments, e.g. log.level (debug, info, warn, error) |
| query_frontend.​extraContainers | list | `[]` | |
Expand Down Expand Up @@ -691,6 +695,7 @@ Kubernetes: `^1.19.0-0`
| store_gateway.​annotations | object | `{}` | |
| store_gateway.​containerSecurityContext.​enabled | bool | `true` | |
| store_gateway.​containerSecurityContext.​readOnlyRootFilesystem | bool | `true` | |
| store_gateway.​enabled | bool | `true` | |
| store_gateway.​env | list | `[]` | |
| store_gateway.​extraArgs | object | `{}` | Additional Cortex container arguments, e.g. log.level (debug, info, warn, error) |
| store_gateway.​extraContainers | list | `[]` | |
Expand Down
2 changes: 2 additions & 0 deletions templates/distributor/distributor-dep.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.distributor.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -116,3 +117,4 @@ spec:
{{- if .Values.distributor.extraVolumes }}
{{- toYaml .Values.distributor.extraVolumes | nindent 8}}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/distributor/distributor-poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (gt (int .Values.distributor.replicas) 1) (.Values.distributor.podDisruptionBudget) }}
{{- if and (gt (int .Values.distributor.replicas) 1) (.Values.distributor.podDisruptionBudget) (.Values.distributor.enabled) }}
apiVersion: {{ include "cortex.pdbVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/distributor/distributor-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.distributor.serviceMonitor.enabled }}
{{- if and .Values.distributor.serviceMonitor.enabled .Values.distributor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
2 changes: 2 additions & 0 deletions templates/distributor/distributor-svc-headless.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.distributor.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -21,3 +22,4 @@ spec:
targetPort: grpc
selector:
{{- include "cortex.distributorSelectorLabels" . | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions templates/distributor/distributor-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.distributor.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -19,3 +20,4 @@ spec:
targetPort: http-metrics
selector:
{{- include "cortex.distributorSelectorLabels" . | nindent 4 }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/ingester/ingester-dep.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.ingester.statefulSet.enabled -}}
{{- if and (not .Values.ingester.statefulSet.enabled) .Values.ingester.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 2 additions & 0 deletions templates/ingester/ingester-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.ingester.enabled -}}
nschad marked this conversation as resolved.
Show resolved Hide resolved
{{- with .Values.ingester.autoscaling -}}
{{- if .enabled }}
apiVersion: autoscaling/v2beta2
Expand Down Expand Up @@ -27,3 +28,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/ingester/ingester-poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (gt (int .Values.ingester.replicas) 1) (.Values.ingester.podDisruptionBudget) }}
{{- if and (gt (int .Values.ingester.replicas) 1) (.Values.ingester.podDisruptionBudget) (.Values.ingester.enabled) }}
apiVersion: {{ include "cortex.pdbVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/ingester/ingester-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.ingester.serviceMonitor.enabled }}
{{- if and .Values.ingester.serviceMonitor.enabled .Values.ingester.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/ingester/ingester-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.ingester.statefulSet.enabled -}}
{{- if and .Values.ingester.statefulSet.enabled .Values.ingester.enabled -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
2 changes: 2 additions & 0 deletions templates/ingester/ingester-svc-headless.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.ingester.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -20,3 +21,4 @@ spec:
targetPort: grpc
selector:
{{- include "cortex.ingesterSelectorLabels" . | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions templates/ingester/ingester-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.ingester.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -19,3 +20,4 @@ spec:
targetPort: http-metrics
selector:
{{- include "cortex.ingesterSelectorLabels" . | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions templates/querier/querier-dep.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.querier.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -110,3 +111,4 @@ spec:
{{- if .Values.querier.extraVolumes }}
{{- toYaml .Values.querier.extraVolumes | nindent 8}}
{{- end }}
{{- end -}}
2 changes: 2 additions & 0 deletions templates/querier/querier-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.querier.enabled -}}
nschad marked this conversation as resolved.
Show resolved Hide resolved
{{- with .Values.querier.autoscaling -}}
{{- if .enabled }}
apiVersion: autoscaling/v2beta2
Expand Down Expand Up @@ -37,3 +38,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/querier/querier-poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (gt (int .Values.querier.replicas) 1) (.Values.querier.podDisruptionBudget) }}
{{- if and (gt (int .Values.querier.replicas) 1) (.Values.querier.podDisruptionBudget) (.Values.querier.enabled) }}
apiVersion: {{ include "cortex.pdbVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/querier/querier-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.querier.serviceMonitor.enabled }}
{{- if and .Values.querier.serviceMonitor.enabled .Values.querier.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
2 changes: 2 additions & 0 deletions templates/querier/querier-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.querier.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -19,3 +20,4 @@ spec:
targetPort: http-metrics
selector:
{{- include "cortex.querierSelectorLabels" . | nindent 4 }}
{{- end -}}
2 changes: 2 additions & 0 deletions templates/query-frontend/query-frontend-dep.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.query_frontend.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -105,3 +106,4 @@ spec:
{{- if .Values.query_frontend.extraVolumes }}
{{- toYaml .Values.query_frontend.extraVolumes | nindent 8}}
{{- end }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.query_frontend.serviceMonitor.enabled }}
{{- if and .Values.query_frontend.serviceMonitor.enabled .Values.query_frontend.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
2 changes: 2 additions & 0 deletions templates/query-frontend/query-frontend-svc-headless.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.query_frontend.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -21,3 +22,4 @@ spec:
targetPort: grpc
selector:
{{- include "cortex.queryFrontendSelectorLabels" . | nindent 4 }}
{{- end -}}
2 changes: 2 additions & 0 deletions templates/query-frontend/query-frontend-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.query_frontend.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -19,3 +20,4 @@ spec:
targetPort: http-metrics
selector:
{{- include "cortex.queryFrontendSelectorLabels" . | nindent 4 }}
{{- end -}}
2 changes: 1 addition & 1 deletion templates/query-frontend/query-poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (gt (int .Values.query_frontend.replicas) 1) (.Values.query_frontend.podDisruptionBudget) }}
{{- if and (gt (int .Values.query_frontend.replicas) 1) (.Values.query_frontend.podDisruptionBudget) (.Values.query_frontend.enabled) }}
apiVersion: {{ include "cortex.pdbVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (gt (int .Values.store_gateway.replicas) 1) (.Values.store_gateway.podDisruptionBudget) }}
{{- if and (gt (int .Values.store_gateway.replicas) 1) (.Values.store_gateway.podDisruptionBudget) (.Values.store_gateway.enabled) }}
apiVersion: {{ include "cortex.pdbVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/store-gateway/store-gateway-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.store_gateway.serviceMonitor.enabled }}
{{- if and .Values.store_gateway.serviceMonitor.enabled .Values.store_gateway.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/store-gateway/store-gateway-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.config.storage.engine "blocks" -}}
{{- if and (eq .Values.config.storage.engine "blocks") (.Values.store_gateway.enabled) -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/store-gateway/store-gateway-svc-headless.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.config.storage.engine "blocks" -}}
{{- if and (eq .Values.config.storage.engine "blocks") .Values.store_gateway.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/store-gateway/store-gateway-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.config.storage.engine "blocks" -}}
{{- if and (eq .Values.config.storage.engine "blocks") (.Values.store_gateway.enabled) -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ alertmanager:
readOnlyRootFilesystem: true

distributor:
enabled: true
replicas: 2

service:
Expand Down Expand Up @@ -428,6 +429,7 @@ distributor:
lifecycle: {}

ingester:
enabled: true
replicas: 3

statefulSet:
Expand Down Expand Up @@ -704,6 +706,7 @@ ruler:
readOnlyRootFilesystem: true

querier:
enabled: true
replicas: 2

service:
Expand Down Expand Up @@ -806,6 +809,7 @@ querier:
lifecycle: {}

query_frontend:
enabled: true
replicas: 2

service:
Expand Down Expand Up @@ -1174,6 +1178,7 @@ nginx:
behavior: {}

store_gateway:
enabled: true
replicas: 1

service:
Expand Down