From b2bc0964b6b088f68f0d1ef7519ef092e9a5950e Mon Sep 17 00:00:00 2001 From: Edward Welch Date: Wed, 13 Mar 2024 17:33:03 +0000 Subject: [PATCH] add enterprise license volume and volumeMounts Signed-off-by: Edward Welch --- .../templates/admin-api/deployment-admin-api.yaml | 2 +- .../templates/compactor/statefulset-compactor.yaml | 4 ++++ .../distributor/deployment-distributor.yaml | 4 ++++ .../gateway/deployment-gateway-enterprise.yaml | 2 +- .../index-gateway/statefulset-index-gateway.yaml | 13 +++++++++++++ .../ingester/statefulset-ingester-zone-a.yaml | 13 +++++++++++++ .../ingester/statefulset-ingester-zone-b.yaml | 13 +++++++++++++ .../ingester/statefulset-ingester-zone-c.yaml | 13 +++++++++++++ .../templates/ingester/statefulset-ingester.yaml | 13 +++++++++++++ .../loki/templates/querier/deployment-querier.yaml | 4 ++++ .../query-frontend/deployment-query-frontend.yaml | 13 +++++++++++++ .../query-scheduler/deployment-query-scheduler.yaml | 4 ++++ .../loki/templates/ruler/statefulset-ruler.yaml | 13 +++++++++++++ .../table-manager/deployment-table-manager.yaml | 13 +++++++++++++ .../loki/templates/write/statefulset-write.yaml | 2 +- 15 files changed, 123 insertions(+), 3 deletions(-) diff --git a/production/helm/loki/templates/admin-api/deployment-admin-api.yaml b/production/helm/loki/templates/admin-api/deployment-admin-api.yaml index 636dedabdb9d..976f13dc7c54 100644 --- a/production/helm/loki/templates/admin-api/deployment-admin-api.yaml +++ b/production/helm/loki/templates/admin-api/deployment-admin-api.yaml @@ -97,7 +97,7 @@ spec: - name: config mountPath: /etc/loki/config - name: license - mountPath: /etc/enterprise-logs/license + mountPath: /etc/loki/license - name: storage mountPath: /data {{- if .Values.adminApi.extraVolumeMounts }} diff --git a/production/helm/loki/templates/compactor/statefulset-compactor.yaml b/production/helm/loki/templates/compactor/statefulset-compactor.yaml index 451cfcdf003f..98fab0affc32 100644 --- a/production/helm/loki/templates/compactor/statefulset-compactor.yaml +++ b/production/helm/loki/templates/compactor/statefulset-compactor.yaml @@ -116,6 +116,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.compactor.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} diff --git a/production/helm/loki/templates/distributor/deployment-distributor.yaml b/production/helm/loki/templates/distributor/deployment-distributor.yaml index e58102668880..be66bfc6b524 100644 --- a/production/helm/loki/templates/distributor/deployment-distributor.yaml +++ b/production/helm/loki/templates/distributor/deployment-distributor.yaml @@ -107,6 +107,10 @@ spec: mountPath: /etc/loki/config - name: runtime-config mountPath: /etc/loki/runtime-config + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.distributor.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} diff --git a/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml b/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml index f8e00f9b6bdd..2d20c4d35bff 100644 --- a/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml +++ b/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml @@ -84,7 +84,7 @@ spec: - name: config mountPath: /etc/loki/config - name: license - mountPath: /etc/enterprise-logs/license + mountPath: /etc/loki/license - name: storage mountPath: /data {{- if .Values.enterpriseGateway.extraVolumeMounts }} 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 a56f076fde2f..bacf9db6c45d 100644 --- a/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml +++ b/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml @@ -111,6 +111,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.indexGateway.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -137,6 +141,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-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.indexGateway.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml b/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml index 63c529ba2c45..bf87757fdfd7 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml @@ -130,6 +130,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.ingester.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -175,6 +179,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-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.ingester.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml b/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml index ae321c4cc22b..91ae934b1eea 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml @@ -130,6 +130,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.ingester.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -175,6 +179,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-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.ingester.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml b/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml index 55552e03518e..bb28936c7b1b 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml @@ -130,6 +130,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.ingester.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -175,6 +179,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-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.ingester.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/production/helm/loki/templates/ingester/statefulset-ingester.yaml b/production/helm/loki/templates/ingester/statefulset-ingester.yaml index 9810fa1858c4..f23f08090dd0 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester.yaml @@ -121,6 +121,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.ingester.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -153,6 +157,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-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.ingester.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/production/helm/loki/templates/querier/deployment-querier.yaml b/production/helm/loki/templates/querier/deployment-querier.yaml index 68cf8cb79a53..80699f21fd16 100644 --- a/production/helm/loki/templates/querier/deployment-querier.yaml +++ b/production/helm/loki/templates/querier/deployment-querier.yaml @@ -115,6 +115,10 @@ spec: mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.querier.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} diff --git a/production/helm/loki/templates/query-frontend/deployment-query-frontend.yaml b/production/helm/loki/templates/query-frontend/deployment-query-frontend.yaml index f3371658fa33..0ee7a5ff4152 100644 --- a/production/helm/loki/templates/query-frontend/deployment-query-frontend.yaml +++ b/production/helm/loki/templates/query-frontend/deployment-query-frontend.yaml @@ -97,6 +97,10 @@ spec: mountPath: /etc/loki/config - name: runtime-config mountPath: /etc/loki/runtime-config + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.queryFrontend.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -123,6 +127,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-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.queryFrontend.extraVolumes }} {{- toYaml . | nindent 8 }} {{- 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 7631a5b4dac5..11b2829ebeec 100644 --- a/production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml +++ b/production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml @@ -93,6 +93,10 @@ spec: mountPath: /etc/loki/config - name: runtime-config mountPath: /etc/loki/runtime-config + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.queryScheduler.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} diff --git a/production/helm/loki/templates/ruler/statefulset-ruler.yaml b/production/helm/loki/templates/ruler/statefulset-ruler.yaml index 9fb3c3a5e578..186d1ac6d598 100644 --- a/production/helm/loki/templates/ruler/statefulset-ruler.yaml +++ b/production/helm/loki/templates/ruler/statefulset-ruler.yaml @@ -96,6 +96,10 @@ spec: mountPath: /var/loki - name: tmp mountPath: /tmp/loki + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- range $dir, $_ := .Values.ruler.directories }} - name: {{ include "loki.rulerRulesDirName" $dir }} mountPath: /etc/loki/rules/{{ $dir }} @@ -130,6 +134,15 @@ spec: - name: runtime-config configMap: name: {{ template "loki.fullname" . }}-runtime + {{- if .Values.enterprise.enabled }} + - name: license + secret: + {{- if .Values.enterprise.useExternalLicense }} + secretName: {{ .Values.enterprise.externalLicenseName }} + {{- else }} + secretName: enterprise-logs-license + {{- end }} + {{- end }} {{- range $dir, $_ := .Values.ruler.directories }} - name: {{ include "loki.rulerRulesDirName" $dir }} configMap: diff --git a/production/helm/loki/templates/table-manager/deployment-table-manager.yaml b/production/helm/loki/templates/table-manager/deployment-table-manager.yaml index 2a932994c88e..1030b3150831 100644 --- a/production/helm/loki/templates/table-manager/deployment-table-manager.yaml +++ b/production/helm/loki/templates/table-manager/deployment-table-manager.yaml @@ -80,6 +80,10 @@ spec: volumeMounts: - name: config mountPath: /etc/loki/config + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /etc/loki/license + {{- end }} {{- with .Values.tableManager.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -107,6 +111,15 @@ spec: volumes: - name: config {{- include "loki.configVolume" . | nindent 10 }} + {{- if .Values.enterprise.enabled }} + - name: license + secret: + {{- if .Values.enterprise.useExternalLicense }} + secretName: {{ .Values.enterprise.externalLicenseName }} + {{- else }} + secretName: enterprise-logs-license + {{- end }} + {{- end }} {{- with .Values.tableManager.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index 9c14c72326de..4356437dc165 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -132,7 +132,7 @@ spec: {{- if .Values.enterprise.enabled }} - name: license mountPath: /etc/loki/license - {{- end}} + {{- end }} {{- with .Values.write.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }}