-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helm: Add GEM federation-frontend resources (#9673)
* Add federation-frontend resources Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add CHANGELOG.md entry Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Remove noop sections Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Simplify fed-frontend config Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add validation for FF Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Remove extra extra volume mounts Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Update values file docs Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Document extraEnvFrom Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Move comments to within the `if` for the minio job Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> --------- Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
- Loading branch information
1 parent
8706a45
commit 18ba216
Showing
58 changed files
with
3,167 additions
and
39 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
80 changes: 80 additions & 0 deletions
80
.../helm/charts/mimir-distributed/ci/offline/test-enterprise-federation-frontend-values.yaml
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,80 @@ | ||
# Enable enterprise features (required for federation-frontend) | ||
enterprise: | ||
enabled: true | ||
|
||
# Enable and configure federation-frontend | ||
federation_frontend: | ||
enabled: true | ||
replicas: 2 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
limits: | ||
cpu: 1 | ||
memory: 256Mi | ||
|
||
mimir: | ||
structuredConfig: | ||
auth: | ||
type: trust | ||
instrumentation: | ||
enabled: false | ||
# The federation-frontend doesn't handle auth. Disabling multi-tenant means the FF doesn't need to check for the X-Scope-OrgID header | ||
# and will use the auth material from the proxy_targets configuration. | ||
# If using the federation-frontend. | ||
multitenancy_enabled: false | ||
federation: | ||
proxy_targets: | ||
- name: "mimir-distributed-1" | ||
url: "http://mimir-query-frontend.real-deployment.svc.cluster.local:8080/prometheus" | ||
- name: "mimir-distributed-2" | ||
url: "http://mimir-query-frontend.real-deployment.svc.cluster.local:8080/prometheus" | ||
|
||
# Disable all other components | ||
distributor: | ||
replicas: 0 | ||
admin_api: | ||
replicas: 0 | ||
alertmanager: | ||
enabled: false | ||
ingester: | ||
replicas: 0 | ||
gateway: | ||
replicas: 0 | ||
querier: | ||
replicas: 0 | ||
query_frontend: | ||
replicas: 0 | ||
query_scheduler: | ||
enabled: false | ||
compactor: | ||
replicas: 0 | ||
store_gateway: | ||
replicas: 0 | ||
ruler: | ||
enabled: false | ||
overrides_exporter: | ||
enabled: false | ||
|
||
# Disable all caches | ||
admin-cache: | ||
enabled: false | ||
chunks-cache: | ||
enabled: false | ||
index-cache: | ||
enabled: false | ||
metadata-cache: | ||
enabled: false | ||
results-cache: | ||
enabled: false | ||
|
||
# Keep using minio to allow setting up the admin bucket | ||
minio: | ||
enabled: false | ||
|
||
rollout_operator: | ||
enabled: true | ||
|
||
tokengenJob: | ||
enable: false |
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
142 changes: 142 additions & 0 deletions
142
.../helm/charts/mimir-distributed/templates/federation-frontend/federation-frontend-dep.yaml
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,142 @@ | ||
{{- if and .Values.enterprise.enabled .Values.federation_frontend.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "mimir.resourceName" (dict "ctx" . "component" "federation-frontend") }} | ||
labels: | ||
{{- include "mimir.labels" (dict "ctx" . "component" "federation-frontend") | nindent 4 }} | ||
annotations: | ||
{{- toYaml .Values.federation_frontend.annotations | nindent 4 }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
spec: | ||
replicas: {{ .Values.federation_frontend.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "federation-frontend" "memberlist" true) | nindent 6 }} | ||
strategy: | ||
{{- toYaml .Values.federation_frontend.strategy | nindent 4 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "mimir.podLabels" (dict "ctx" . "component" "federation-frontend" "memberlist" true) | nindent 8 }} | ||
annotations: | ||
{{- include "mimir.podAnnotations" (dict "ctx" . "component" "federation-frontend") | nindent 8 }} | ||
spec: | ||
serviceAccountName: {{ template "mimir.serviceAccountName" . }} | ||
{{- if .Values.federation_frontend.priorityClassName }} | ||
priorityClassName: {{ .Values.federation_frontend.priorityClassName }} | ||
{{- end }} | ||
securityContext: | ||
{{- include "mimir.lib.podSecurityContext" (dict "ctx" . "component" "federation-frontend") | nindent 8 }} | ||
{{- with .Values.federation_frontend.initContainers }} | ||
initContainers: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- range .Values.image.pullSecrets }} | ||
- name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
containers: | ||
- name: federation-frontend | ||
image: {{ include "mimir.imageReference" . | quote }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
args: | ||
- "-target=federation-frontend" | ||
- "-config.expand-env=true" | ||
- "-config.file=/etc/mimir/mimir.yaml" | ||
{{- range $key, $value := .Values.federation_frontend.extraArgs }} | ||
- "-{{ $key }}={{ $value }}" | ||
{{- end }} | ||
volumeMounts: | ||
{{- if .Values.federation_frontend.extraVolumeMounts }} | ||
{{ toYaml .Values.federation_frontend.extraVolumeMounts | nindent 12}} | ||
{{- end }} | ||
{{- if .Values.global.extraVolumeMounts }} | ||
{{ toYaml .Values.global.extraVolumeMounts | nindent 12}} | ||
{{- end }} | ||
- name: config | ||
mountPath: /etc/mimir | ||
- name: license | ||
mountPath: /license | ||
- name: runtime-config | ||
mountPath: /var/{{ include "mimir.name" . }} | ||
- name: active-queries | ||
mountPath: /active-query-tracker | ||
ports: | ||
- name: http-metrics | ||
containerPort: {{ include "mimir.serverHttpListenPort" . }} | ||
protocol: TCP | ||
- name: grpc | ||
containerPort: {{ include "mimir.serverGrpcListenPort" . }} | ||
protocol: TCP | ||
- name: memberlist | ||
containerPort: {{ include "mimir.memberlistBindPort" . }} | ||
protocol: TCP | ||
livenessProbe: | ||
{{- toYaml .Values.federation_frontend.livenessProbe | nindent 12 }} | ||
readinessProbe: | ||
{{- toYaml .Values.federation_frontend.readinessProbe | nindent 12 }} | ||
resources: | ||
{{- toYaml .Values.federation_frontend.resources | nindent 12 }} | ||
securityContext: | ||
{{- toYaml .Values.federation_frontend.containerSecurityContext | nindent 12 }} | ||
{{- $jaeger_queue_size := dig "jaegerReporterMaxQueueSize" nil .Values.federation_frontend }} | ||
{{- if or .Values.global.extraEnv .Values.federation_frontend.env $jaeger_queue_size }} | ||
env: | ||
{{- with .Values.global.extraEnv }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.federation_frontend.env }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- if $jaeger_queue_size }} | ||
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" | ||
value: {{$jaeger_queue_size | toString | toYaml }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if or .Values.global.extraEnvFrom .Values.federation_frontend.extraEnvFrom }} | ||
envFrom: | ||
{{- with .Values.global.extraEnvFrom }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.federation_frontend.extraEnvFrom }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.federation_frontend.extraContainers }} | ||
{{ toYaml .Values.federation_frontend.extraContainers | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.federation_frontend.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.federation_frontend.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" . "component" "federation-frontend") | nindent 6 }} | ||
{{- with .Values.federation_frontend.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
terminationGracePeriodSeconds: {{ .Values.federation_frontend.terminationGracePeriodSeconds }} | ||
volumes: | ||
- name: config | ||
{{- include "mimir.configVolume" . | nindent 10 }} | ||
- name: license | ||
secret: | ||
secretName: {{ tpl .Values.license.secretName . }} | ||
- name: runtime-config | ||
configMap: | ||
name: {{ template "mimir.fullname" . }}-runtime | ||
{{- if .Values.federation_frontend.extraVolumes }} | ||
{{- toYaml .Values.federation_frontend.extraVolumes | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.global.extraVolumes }} | ||
{{ toYaml .Values.global.extraVolumes | nindent 8}} | ||
{{- end }} | ||
- name: active-queries | ||
emptyDir: {} | ||
{{- end }} |
3 changes: 3 additions & 0 deletions
3
.../helm/charts/mimir-distributed/templates/federation-frontend/federation-frontend-pdb.yaml
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,3 @@ | ||
{{- if and .Values.enterprise.enabled .Values.federation_frontend.enabled }} | ||
{{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "federation-frontend" "memberlist" true) }} | ||
{{- end }} |
3 changes: 3 additions & 0 deletions
3
...m/charts/mimir-distributed/templates/federation-frontend/federation-frontend-servmon.yaml
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,3 @@ | ||
{{- if and .Values.enterprise.enabled .Values.federation_frontend.enabled }} | ||
{{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "federation-frontend" "memberlist" true) }} | ||
{{- end }} |
27 changes: 27 additions & 0 deletions
27
.../helm/charts/mimir-distributed/templates/federation-frontend/federation-frontend-svc.yaml
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,27 @@ | ||
{{- if and .Values.enterprise.enabled .Values.federation_frontend.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "mimir.resourceName" (dict "ctx" . "component" "federation-frontend") }} | ||
labels: | ||
{{- include "mimir.labels" (dict "ctx" . "component" "federation-frontend" "memberlist" true) | nindent 4 }} | ||
{{- with .Values.federation_frontend.service.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- toYaml .Values.federation_frontend.service.annotations | nindent 4 }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: {{ include "mimir.serverHttpListenPort" . }} | ||
protocol: TCP | ||
name: http-metrics | ||
targetPort: http-metrics | ||
- port: {{ include "mimir.serverGrpcListenPort" . }} | ||
protocol: TCP | ||
name: grpc | ||
targetPort: grpc | ||
selector: | ||
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "federation-frontend" "memberlist" true) | nindent 4 }} | ||
{{- end }} |
4 changes: 2 additions & 2 deletions
4
operations/helm/charts/mimir-distributed/templates/minio/create-bucket-job.yaml
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
Oops, something went wrong.