diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f76d525..22961183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master / unreleased +* [ENHANCEMENT] Includes enable flags for each component #319 + ## 1.3.0 / 2022-02-10 * [CHANGE] move from quay.io/kiwigrid/k8s-sidecar to omegavvweapon/kopf-k8s-sidecar image #302 diff --git a/README.md b/README.md index 1c63f7f5..b25b87ff 100644 --- a/README.md +++ b/README.md @@ -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 | `[]` | | @@ -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 | `[]` | | @@ -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 | `[]` | | @@ -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 | `[]` | | @@ -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 | `[]` | | diff --git a/templates/distributor/distributor-dep.yaml b/templates/distributor/distributor-dep.yaml index a0574c1a..9aaa3527 100644 --- a/templates/distributor/distributor-dep.yaml +++ b/templates/distributor/distributor-dep.yaml @@ -1,3 +1,4 @@ +{{- if .Values.distributor.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -116,3 +117,4 @@ spec: {{- if .Values.distributor.extraVolumes }} {{- toYaml .Values.distributor.extraVolumes | nindent 8}} {{- end }} +{{- end }} \ No newline at end of file diff --git a/templates/distributor/distributor-hpa.yaml b/templates/distributor/distributor-hpa.yaml index 0c1c9f60..ffd926cf 100644 --- a/templates/distributor/distributor-hpa.yaml +++ b/templates/distributor/distributor-hpa.yaml @@ -1,5 +1,5 @@ +{{- if and .Values.distributor.enable .Values.distributor.autoscaling.enabled }} {{- with .Values.distributor.autoscaling -}} -{{- if .enabled }} apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: diff --git a/templates/distributor/distributor-poddisruptionbudget.yaml b/templates/distributor/distributor-poddisruptionbudget.yaml index 7b05701f..4906dcef 100644 --- a/templates/distributor/distributor-poddisruptionbudget.yaml +++ b/templates/distributor/distributor-poddisruptionbudget.yaml @@ -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: diff --git a/templates/distributor/distributor-servicemonitor.yaml b/templates/distributor/distributor-servicemonitor.yaml index 5db83890..25936b4c 100644 --- a/templates/distributor/distributor-servicemonitor.yaml +++ b/templates/distributor/distributor-servicemonitor.yaml @@ -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: diff --git a/templates/distributor/distributor-svc-headless.yaml b/templates/distributor/distributor-svc-headless.yaml index 1c4f7f6b..999f34fe 100755 --- a/templates/distributor/distributor-svc-headless.yaml +++ b/templates/distributor/distributor-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if .Values.distributor.enabled -}} apiVersion: v1 kind: Service metadata: @@ -21,3 +22,4 @@ spec: targetPort: grpc selector: {{- include "cortex.distributorSelectorLabels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/templates/distributor/distributor-svc.yaml b/templates/distributor/distributor-svc.yaml index 2db7197f..451740ac 100644 --- a/templates/distributor/distributor-svc.yaml +++ b/templates/distributor/distributor-svc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.distributor.enabled -}} apiVersion: v1 kind: Service metadata: @@ -19,3 +20,4 @@ spec: targetPort: http-metrics selector: {{- include "cortex.distributorSelectorLabels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/templates/ingester/ingester-dep.yaml b/templates/ingester/ingester-dep.yaml index 041fa31d..277c2933 100644 --- a/templates/ingester/ingester-dep.yaml +++ b/templates/ingester/ingester-dep.yaml @@ -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: diff --git a/templates/ingester/ingester-hpa.yaml b/templates/ingester/ingester-hpa.yaml index 97c52907..5176faae 100644 --- a/templates/ingester/ingester-hpa.yaml +++ b/templates/ingester/ingester-hpa.yaml @@ -1,5 +1,5 @@ +{{- if and .Values.ingester.enabled .Values.ingester.autoscaling.enabled -}} {{- with .Values.ingester.autoscaling -}} -{{- if .enabled }} apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: diff --git a/templates/ingester/ingester-poddisruptionbudget.yaml b/templates/ingester/ingester-poddisruptionbudget.yaml index a47ecb4e..cfa2a29f 100644 --- a/templates/ingester/ingester-poddisruptionbudget.yaml +++ b/templates/ingester/ingester-poddisruptionbudget.yaml @@ -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: diff --git a/templates/ingester/ingester-servicemonitor.yaml b/templates/ingester/ingester-servicemonitor.yaml index 310ca544..0c145188 100644 --- a/templates/ingester/ingester-servicemonitor.yaml +++ b/templates/ingester/ingester-servicemonitor.yaml @@ -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: diff --git a/templates/ingester/ingester-statefulset.yaml b/templates/ingester/ingester-statefulset.yaml index 8016441a..f5cd9227 100644 --- a/templates/ingester/ingester-statefulset.yaml +++ b/templates/ingester/ingester-statefulset.yaml @@ -1,4 +1,4 @@ -{{- if .Values.ingester.statefulSet.enabled -}} +{{- if and .Values.ingester.statefulSet.enabled .Values.ingester.enabled -}} apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/templates/ingester/ingester-svc-headless.yaml b/templates/ingester/ingester-svc-headless.yaml index b783caa4..0f698179 100644 --- a/templates/ingester/ingester-svc-headless.yaml +++ b/templates/ingester/ingester-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ingester.enabled -}} apiVersion: v1 kind: Service metadata: @@ -20,3 +21,4 @@ spec: targetPort: grpc selector: {{- include "cortex.ingesterSelectorLabels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/templates/ingester/ingester-svc.yaml b/templates/ingester/ingester-svc.yaml index 02183aee..16b2083e 100644 --- a/templates/ingester/ingester-svc.yaml +++ b/templates/ingester/ingester-svc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ingester.enabled -}} apiVersion: v1 kind: Service metadata: @@ -19,3 +20,4 @@ spec: targetPort: http-metrics selector: {{- include "cortex.ingesterSelectorLabels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/templates/querier/querier-dep.yaml b/templates/querier/querier-dep.yaml index d0aa4951..bea99344 100644 --- a/templates/querier/querier-dep.yaml +++ b/templates/querier/querier-dep.yaml @@ -1,3 +1,4 @@ +{{- if .Values.querier.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -110,3 +111,4 @@ spec: {{- if .Values.querier.extraVolumes }} {{- toYaml .Values.querier.extraVolumes | nindent 8}} {{- end }} +{{- end -}} \ No newline at end of file diff --git a/templates/querier/querier-hpa.yaml b/templates/querier/querier-hpa.yaml index f078526e..82cdd7b7 100644 --- a/templates/querier/querier-hpa.yaml +++ b/templates/querier/querier-hpa.yaml @@ -1,5 +1,5 @@ +{{- if and .Values.querier.enabled .Values.querier.autoscaling.enabled -}} {{- with .Values.querier.autoscaling -}} -{{- if .enabled }} apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: diff --git a/templates/querier/querier-poddisruptionbudget.yaml b/templates/querier/querier-poddisruptionbudget.yaml index b69de62f..218d3f0c 100644 --- a/templates/querier/querier-poddisruptionbudget.yaml +++ b/templates/querier/querier-poddisruptionbudget.yaml @@ -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: diff --git a/templates/querier/querier-servicemonitor.yaml b/templates/querier/querier-servicemonitor.yaml index c84d1a4c..965c563c 100644 --- a/templates/querier/querier-servicemonitor.yaml +++ b/templates/querier/querier-servicemonitor.yaml @@ -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: diff --git a/templates/querier/querier-svc.yaml b/templates/querier/querier-svc.yaml index 0701b7d4..a7ef8317 100644 --- a/templates/querier/querier-svc.yaml +++ b/templates/querier/querier-svc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.querier.enabled -}} apiVersion: v1 kind: Service metadata: @@ -19,3 +20,4 @@ spec: targetPort: http-metrics selector: {{- include "cortex.querierSelectorLabels" . | nindent 4 }} +{{- end -}} \ No newline at end of file diff --git a/templates/query-frontend/query-frontend-dep.yaml b/templates/query-frontend/query-frontend-dep.yaml index 3e31d189..a10d4342 100644 --- a/templates/query-frontend/query-frontend-dep.yaml +++ b/templates/query-frontend/query-frontend-dep.yaml @@ -1,3 +1,4 @@ +{{- if .Values.query_frontend.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -105,3 +106,4 @@ spec: {{- if .Values.query_frontend.extraVolumes }} {{- toYaml .Values.query_frontend.extraVolumes | nindent 8}} {{- end }} +{{- end -}} \ No newline at end of file diff --git a/templates/query-frontend/query-frontend-servicemonitor.yaml b/templates/query-frontend/query-frontend-servicemonitor.yaml index 2d76c6be..9874d517 100644 --- a/templates/query-frontend/query-frontend-servicemonitor.yaml +++ b/templates/query-frontend/query-frontend-servicemonitor.yaml @@ -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: diff --git a/templates/query-frontend/query-frontend-svc-headless.yaml b/templates/query-frontend/query-frontend-svc-headless.yaml index 939457cf..89225a85 100644 --- a/templates/query-frontend/query-frontend-svc-headless.yaml +++ b/templates/query-frontend/query-frontend-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if .Values.query_frontend.enabled -}} apiVersion: v1 kind: Service metadata: @@ -21,3 +22,4 @@ spec: targetPort: grpc selector: {{- include "cortex.queryFrontendSelectorLabels" . | nindent 4 }} +{{- end -}} \ No newline at end of file diff --git a/templates/query-frontend/query-frontend-svc.yaml b/templates/query-frontend/query-frontend-svc.yaml index 85ff2e85..641f46a4 100644 --- a/templates/query-frontend/query-frontend-svc.yaml +++ b/templates/query-frontend/query-frontend-svc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.query_frontend.enabled -}} apiVersion: v1 kind: Service metadata: @@ -19,3 +20,4 @@ spec: targetPort: http-metrics selector: {{- include "cortex.queryFrontendSelectorLabels" . | nindent 4 }} +{{- end -}} \ No newline at end of file diff --git a/templates/query-frontend/query-poddisruptionbudget.yaml b/templates/query-frontend/query-poddisruptionbudget.yaml index 52569491..65f96a7a 100644 --- a/templates/query-frontend/query-poddisruptionbudget.yaml +++ b/templates/query-frontend/query-poddisruptionbudget.yaml @@ -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: diff --git a/templates/store-gateway/store-gateway-poddisruptionbudget.yaml b/templates/store-gateway/store-gateway-poddisruptionbudget.yaml index 1019cc89..45a7d1ea 100644 --- a/templates/store-gateway/store-gateway-poddisruptionbudget.yaml +++ b/templates/store-gateway/store-gateway-poddisruptionbudget.yaml @@ -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: diff --git a/templates/store-gateway/store-gateway-servicemonitor.yaml b/templates/store-gateway/store-gateway-servicemonitor.yaml index 39eaeda5..e8dd5297 100644 --- a/templates/store-gateway/store-gateway-servicemonitor.yaml +++ b/templates/store-gateway/store-gateway-servicemonitor.yaml @@ -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: diff --git a/templates/store-gateway/store-gateway-statefulset.yaml b/templates/store-gateway/store-gateway-statefulset.yaml index 0238c75a..a20f269e 100644 --- a/templates/store-gateway/store-gateway-statefulset.yaml +++ b/templates/store-gateway/store-gateway-statefulset.yaml @@ -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: diff --git a/templates/store-gateway/store-gateway-svc-headless.yaml b/templates/store-gateway/store-gateway-svc-headless.yaml index c56ec77b..e03dd3db 100644 --- a/templates/store-gateway/store-gateway-svc-headless.yaml +++ b/templates/store-gateway/store-gateway-svc-headless.yaml @@ -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: diff --git a/templates/store-gateway/store-gateway-svc.yaml b/templates/store-gateway/store-gateway-svc.yaml index f58019b9..af4a84be 100644 --- a/templates/store-gateway/store-gateway-svc.yaml +++ b/templates/store-gateway/store-gateway-svc.yaml @@ -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: diff --git a/values.yaml b/values.yaml index a70269c8..30204a1e 100644 --- a/values.yaml +++ b/values.yaml @@ -326,6 +326,7 @@ alertmanager: readOnlyRootFilesystem: true distributor: + enabled: true replicas: 2 service: @@ -428,6 +429,7 @@ distributor: lifecycle: {} ingester: + enabled: true replicas: 3 statefulSet: @@ -704,6 +706,7 @@ ruler: readOnlyRootFilesystem: true querier: + enabled: true replicas: 2 service: @@ -806,6 +809,7 @@ querier: lifecycle: {} query_frontend: + enabled: true replicas: 2 service: @@ -1174,6 +1178,7 @@ nginx: behavior: {} store_gateway: + enabled: true replicas: 1 service: