diff --git a/production/helm/loki/templates/NOTES.txt b/production/helm/loki/templates/NOTES.txt index b5af1996cf9fe..6551a427000ff 100644 --- a/production/helm/loki/templates/NOTES.txt +++ b/production/helm/loki/templates/NOTES.txt @@ -24,18 +24,10 @@ Installed components: * backend {{- end }} {{- else }} -{{- if .Values.compactor.enabled }} * compactor -{{- end }} -{{- if .Values.indexGateway.enabled }} * index gateway -{{- end }} -{{- if .Values.queryScheduler.enabled }} * query scheduler -{{- end }} -{{- if .Values.ruler.enabled }} * ruler -{{- end }} * distributor * ingester * querier diff --git a/production/helm/loki/templates/compactor/service-compactor.yaml b/production/helm/loki/templates/compactor/service-compactor.yaml index b4a7f54343dfb..c75e1cee5ae18 100644 --- a/production/helm/loki/templates/compactor/service-compactor.yaml +++ b/production/helm/loki/templates/compactor/service-compactor.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.compactor.enabled }} +{{- if $isDistributed }} apiVersion: v1 kind: Service metadata: diff --git a/production/helm/loki/templates/compactor/statefulset-compactor.yaml b/production/helm/loki/templates/compactor/statefulset-compactor.yaml index d172e5f6eab18..7c87712ae5e80 100644 --- a/production/helm/loki/templates/compactor/statefulset-compactor.yaml +++ b/production/helm/loki/templates/compactor/statefulset-compactor.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.compactor.enabled }} +{{- if $isDistributed }} apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/production/helm/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml b/production/helm/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml index 6f0d18e833400..22ba1a0b4c336 100644 --- a/production/helm/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml +++ b/production/helm/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.indexGateway.enabled (gt (int .Values.indexGateway.replicas) 1) }} +{{- if and $isDistributed (gt (int .Values.indexGateway.replicas) 1) }} {{- if kindIs "invalid" .Values.indexGateway.maxUnavailable }} {{- fail "`.Values.indexGateway.maxUnavailable` must be set when `.Values.indexGateway.replicas` is greater than 1." }} {{- else }} diff --git a/production/helm/loki/templates/index-gateway/service-index-gateway-headless.yaml b/production/helm/loki/templates/index-gateway/service-index-gateway-headless.yaml index 09f68f1475fbc..b0c90dc35fd90 100644 --- a/production/helm/loki/templates/index-gateway/service-index-gateway-headless.yaml +++ b/production/helm/loki/templates/index-gateway/service-index-gateway-headless.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.indexGateway.enabled }} +{{- if $isDistributed }} apiVersion: v1 kind: Service metadata: diff --git a/production/helm/loki/templates/index-gateway/service-index-gateway.yaml b/production/helm/loki/templates/index-gateway/service-index-gateway.yaml index 2988d7839cf5c..2d43bb0ed5e9e 100644 --- a/production/helm/loki/templates/index-gateway/service-index-gateway.yaml +++ b/production/helm/loki/templates/index-gateway/service-index-gateway.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.indexGateway.enabled }} +{{- if $isDistributed }} apiVersion: v1 kind: Service metadata: diff --git a/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml b/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml index feea0dcd9e101..10fa57a4f6794 100644 --- a/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml +++ b/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.indexGateway.enabled }} +{{- if $isDistributed }} apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/production/helm/loki/templates/querier/deployment-querier.yaml b/production/helm/loki/templates/querier/deployment-querier.yaml index fd5600b36064d..8a7377ff43017 100644 --- a/production/helm/loki/templates/querier/deployment-querier.yaml +++ b/production/helm/loki/templates/querier/deployment-querier.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.indexGateway.enabled }} +{{- if $isDistributed }} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/production/helm/loki/templates/querier/hpa.yaml b/production/helm/loki/templates/querier/hpa.yaml index 18643c1a3a9e4..08d81cb5903bf 100644 --- a/production/helm/loki/templates/querier/hpa.yaml +++ b/production/helm/loki/templates/querier/hpa.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.indexGateway.enabled .Values.querier.autoscaling.enabled }} +{{- if and $isDistributed .Values.querier.autoscaling.enabled }} {{- $apiVersion := include "loki.hpa.apiVersion" . -}} apiVersion: {{ $apiVersion }} kind: HorizontalPodAutoscaler diff --git a/production/helm/loki/templates/querier/service-querier-headless.yaml b/production/helm/loki/templates/querier/service-querier-headless.yaml deleted file mode 100644 index 19abcf3324d1f..0000000000000 --- a/production/helm/loki/templates/querier/service-querier-headless.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (not .Values.indexGateway.enabled) }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.querierFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querierSelectorLabels" . | nindent 4 }} - prometheus.io/service-monitor: "false" -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.querier.appProtocol.grpc }} - appProtocol: {{ .Values.querier.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.querierSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/production/helm/loki/templates/querier/statefulset-querier.yaml b/production/helm/loki/templates/querier/statefulset-querier.yaml deleted file mode 100644 index 568c8aad7df1a..0000000000000 --- a/production/helm/loki/templates/querier/statefulset-querier.yaml +++ /dev/null @@ -1,182 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (not .Values.indexGateway.enabled) }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.querierFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querierLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.querier.replicas }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.querierFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.querierSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.querierSelectorLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} - {{- with .Values.querier.topologySpreadConstraints }} - topologySpreadConstraints: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.querierPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.querier.terminationGracePeriodSeconds }} - {{- with .Values.querier.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: querier - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.querier.command }} - command: - - {{ coalesce .Values.querier.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=querier - {{- with .Values.querier.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with .Values.querier.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.querier.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- with .Values.querier.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.querier.resources | nindent 12 }} - {{- if .Values.querier.extraContainers }} - {{- toYaml .Values.querier.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.querier.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.querier.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.dnsConfig }} - dnsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - {{- include "loki.configVolume" . | nindent 10 }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with .Values.querier.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.querier.persistence.enabled }} - - name: data - emptyDir: {} - {{- else }} - volumeClaimTemplates: - - metadata: - name: data - {{- with .Values.querier.persistence.annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.querier.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.querier.persistence.size | quote }} - {{- end }} -{{- end }} diff --git a/production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml b/production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml index 4de0248f55dfd..fc87b9b061dde 100644 --- a/production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml +++ b/production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.queryScheduler.enabled }} +{{- if $isDistributed }} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/production/helm/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml b/production/helm/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml index 5847869fbdf8f..ed8051fa92ed7 100644 --- a/production/helm/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml +++ b/production/helm/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.queryScheduler.enabled (gt (int .Values.queryScheduler.replicas) 1) }} +{{- if and $isDistributed (gt (int .Values.queryScheduler.replicas) 1) }} {{- if kindIs "invalid" .Values.queryScheduler.maxUnavailable }} {{- fail "`.Values.queryScheduler.maxUnavailable` must be set when `.Values.queryScheduler.replicas` is greater than 1." }} {{- else }} diff --git a/production/helm/loki/templates/query-scheduler/service-query-scheduler.yaml b/production/helm/loki/templates/query-scheduler/service-query-scheduler.yaml index aebbfe847a0f3..89883155a27e1 100644 --- a/production/helm/loki/templates/query-scheduler/service-query-scheduler.yaml +++ b/production/helm/loki/templates/query-scheduler/service-query-scheduler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.queryScheduler.enabled }} +{{- if $isDistributed }} apiVersion: v1 kind: Service metadata: diff --git a/production/helm/loki/templates/ruler/configmap-ruler.yaml b/production/helm/loki/templates/ruler/configmap-ruler.yaml index 0e24e6e68b8c6..b74f024b415f3 100644 --- a/production/helm/loki/templates/ruler/configmap-ruler.yaml +++ b/production/helm/loki/templates/ruler/configmap-ruler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ruler.enabled }} +{{- if $isDistributed }} {{- range $dir, $files := .Values.ruler.directories }} --- apiVersion: v1 diff --git a/production/helm/loki/templates/ruler/poddisruptionbudget-ruler.yaml b/production/helm/loki/templates/ruler/poddisruptionbudget-ruler.yaml index 48eb144f7a572..82417651862dd 100644 --- a/production/helm/loki/templates/ruler/poddisruptionbudget-ruler.yaml +++ b/production/helm/loki/templates/ruler/poddisruptionbudget-ruler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ruler.enabled (gt (int .Values.ruler.replicas) 1) }} +{{- if and $isDistributed (gt (int .Values.ruler.replicas) 1) }} {{- if kindIs "invalid" .Values.ruler.maxUnavailable }} {{- fail "`.Values.ruler.maxUnavailable` must be set when `.Values.ruler.replicas` is greater than 1." }} {{- else }} diff --git a/production/helm/loki/templates/ruler/service-ruler.yaml b/production/helm/loki/templates/ruler/service-ruler.yaml index 8200af2b69a95..6e24a1cc5434a 100644 --- a/production/helm/loki/templates/ruler/service-ruler.yaml +++ b/production/helm/loki/templates/ruler/service-ruler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ruler.enabled }} +{{- if $isDistributed }} apiVersion: v1 kind: Service metadata: diff --git a/production/helm/loki/templates/ruler/statefulset-ruler.yaml b/production/helm/loki/templates/ruler/statefulset-ruler.yaml index e68f9793353df..c4205ad2c7493 100644 --- a/production/helm/loki/templates/ruler/statefulset-ruler.yaml +++ b/production/helm/loki/templates/ruler/statefulset-ruler.yaml @@ -1,5 +1,5 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ruler.enabled }} +{{- if $isDistributed }} apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 23da905432332..6965f0d48c237 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -1899,8 +1899,6 @@ queryFrontend: # -- Configuration for the query-scheduler queryScheduler: - # -- Specifies whether the query-scheduler should be decoupled from the query-frontend - enabled: false # -- Number of replicas for the query-scheduler. # It should be lower than `-querier.max-concurrent` to avoid generating back-pressure in queriers; # it's also recommended that this value evenly divides the latter @@ -1969,8 +1967,6 @@ queryScheduler: # -- Configuration for the index-gateway indexGateway: - # -- Specifies whether the index-gateway should be enabled - enabled: false # -- Number of replicas for the index-gateway replicas: 0 # -- Whether the index gateway should join the memberlist hashring @@ -2062,8 +2058,6 @@ indexGateway: compactor: # -- Number of replicas for the compactor replicas: 0 - # -- Specifies whether compactor should be enabled - enabled: false # -- hostAliases to add hostAliases: [] # - ip: 1.2.3.4 @@ -2177,8 +2171,6 @@ compactor: # -- Configuration for the ruler ruler: - # -- Specifies whether the ruler should be enabled - enabled: false # -- Number of replicas for the ruler replicas: 0 # -- hostAliases to add