From cfb4b08034086705105572a6c4e773b727503a82 Mon Sep 17 00:00:00 2001 From: Manu <21658174+epignot@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:17:43 +0200 Subject: [PATCH 1/8] bump proxy-body-size to 15M (#195) Required to enable large file save. Co-authored-by: Emmanuel Pignot --- charts/bigdata-proxy/Chart.yaml | 2 +- charts/bigdata-proxy/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/bigdata-proxy/Chart.yaml b/charts/bigdata-proxy/Chart.yaml index 8c89758f..c12b462d 100644 --- a/charts/bigdata-proxy/Chart.yaml +++ b/charts/bigdata-proxy/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bigdata-proxy description: A Helm chart for the Spot Big Data Proxy type: application -version: 0.4.6 +version: 0.4.7 appVersion: 0.5.3 home: https://github.com/spotinst/charts icon: https://docs.spot.io/_media/images/spot_mark.png diff --git a/charts/bigdata-proxy/values.yaml b/charts/bigdata-proxy/values.yaml index 6c452447..392680c2 100644 --- a/charts/bigdata-proxy/values.yaml +++ b/charts/bigdata-proxy/values.yaml @@ -28,7 +28,7 @@ ingress: host: "" # Overridden at deploy time secretNamespace: "" # Overridden at deploy time secretName: "" # Overridden at deploy time - bodySize: "2M" + bodySize: "15M" nameOverride: "" fullnameOverride: "" From 0715a4cfd1b7f8d0f66fd66abf7af4384cc49415 Mon Sep 17 00:00:00 2001 From: Z4ck404 Date: Mon, 18 Mar 2024 17:58:04 +0100 Subject: [PATCH 2/8] [charts] add fluebtbit custom configs to all bigdata components [charts/bigdata-operator] create common and custom fluentbit configmaps [charts/bigdata-proxy] create custom fluentbit configmaps [charts/bigdata-spark-watcher] create custom fluentbit configmaps [charts/spark-operator] create custom fluentbit configmaps [charts/notebook-service-storage] create custom fluentbit configmaps [charts/notebook-service] create custom fluentbit configmaps [charts] bump versions [charts/bigdata-notebook-workspace] add telemetry sidecar [charts/bigdata-telemetry] fix bigdata-telemetry thanos args & object-store mounting [charts/bigdata-operator] add metrics collection to fluentbit bump telemetry chart version fix telemetry thanos receiver config set thanos upload frequency to 15 minutes add metrics collection config to all components fix metrics collection configs in all components fix telemetry thanos secret mounting reviews reviews:templating reviews:leftovers bump version --- .../Chart.yaml | 2 +- .../notebook-service-storage-deployment.yaml | 30 ++++---- .../templates/telemetry_configmap.yaml | 17 +++++ charts/bigdata-notebook-service/Chart.yaml | 2 +- .../templates/deployment.yaml | 15 +++- .../templates/telemetry_configmap.yaml | 17 +++++ charts/bigdata-notebook-workspace/Chart.yaml | 2 +- .../templates/deployment.yaml | 68 ++++++++++++++++++- .../templates/telemetry_configmap.yaml | 17 +++++ charts/bigdata-notebook-workspace/values.yaml | 10 ++- charts/bigdata-operator/Chart.yaml | 2 +- .../templates/common_telemetry_configmap.yaml | 60 ++++++++++++++++ .../templates/deployment.yaml | 15 +++- .../templates/telemetry_configmap.yaml | 30 ++++++-- charts/bigdata-operator/values.yaml | 53 --------------- charts/bigdata-proxy/Chart.yaml | 2 +- .../bigdata-proxy/templates/deployment.yaml | 15 +++- .../templates/telemetry_configmap.yaml | 18 +++++ charts/bigdata-spark-watcher/Chart.yaml | 2 +- .../templates/deployment.yaml | 15 +++- .../templates/telemetry_configmap.yaml | 33 +++++++++ charts/bigdata-telemetry/Chart.yaml | 2 +- .../templates/thanos-receiver-configmap.yaml | 2 +- .../templates/thanos-receiver-service.yaml | 4 +- .../thanos-receiver-statefulset.yaml | 27 ++++---- charts/bigdata-telemetry/values.yaml | 2 +- charts/spark-operator/Chart.yaml | 2 +- .../spark-operator/templates/deployment.yaml | 15 +++- .../templates/telemetry_configmap.yaml | 33 +++++++++ 29 files changed, 395 insertions(+), 117 deletions(-) create mode 100644 charts/bigdata-notebook-service-storage-server/templates/telemetry_configmap.yaml create mode 100644 charts/bigdata-notebook-service/templates/telemetry_configmap.yaml create mode 100644 charts/bigdata-notebook-workspace/templates/telemetry_configmap.yaml create mode 100644 charts/bigdata-operator/templates/common_telemetry_configmap.yaml create mode 100644 charts/bigdata-proxy/templates/telemetry_configmap.yaml create mode 100644 charts/bigdata-spark-watcher/templates/telemetry_configmap.yaml create mode 100644 charts/spark-operator/charts/spark-operator/templates/telemetry_configmap.yaml diff --git a/charts/bigdata-notebook-service-storage-server/Chart.yaml b/charts/bigdata-notebook-service-storage-server/Chart.yaml index 110b19cf..b7ba2c18 100644 --- a/charts/bigdata-notebook-service-storage-server/Chart.yaml +++ b/charts/bigdata-notebook-service-storage-server/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bigdata-notebook-service-storage-server description: A Helm chart for the Spot Big Data Notebook Service Storage Server type: application -version: 0.1.11 +version: 0.1.12 appVersion: "1.2.0-ofas" home: https://github.com/spotinst/charts icon: https://docs.spot.io/_media/images/spot_mark.png diff --git a/charts/bigdata-notebook-service-storage-server/templates/notebook-service-storage-deployment.yaml b/charts/bigdata-notebook-service-storage-server/templates/notebook-service-storage-deployment.yaml index c9b31334..2f21a3b1 100644 --- a/charts/bigdata-notebook-service-storage-server/templates/notebook-service-storage-deployment.yaml +++ b/charts/bigdata-notebook-service-storage-server/templates/notebook-service-storage-deployment.yaml @@ -46,16 +46,6 @@ spec: containerPort: 2020 protocol: TCP env: - - name: AWS_ACCESS_KEY_ID - valueFrom: - secretKeyRef: - name: spot-bigdata-telemetry-creds - key: AWS_ACCESS_KEY_ID - - name: AWS_SECRET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: spot-bigdata-telemetry-creds - key: AWS_SECRET_ACCESS_KEY - name: AWS_BUCKET_NAME valueFrom: secretKeyRef: @@ -78,25 +68,39 @@ spec: key: accountId resources: {} volumeMounts: - - name: config + - name: telementry-global-config mountPath: /fluent-bit/etc/fluent-bit.conf subPath: fluent-bit.conf + - name: telementry-custom-config + mountPath: /fluent-bit/etc/custom-filters.conf + subPath: custom-filters.conf + - name: telementry-custom-config + mountPath: /fluent-bit/etc/metrics-collection.conf + subPath: metrics-collection.conf - name: varlog readOnly: true mountPath: /var/log/ - name: varlibdockercontainers readOnly: true mountPath: /var/lib/docker/containers + - name: telemetry-aws-credentials + mountPath: /root/.aws volumes: - - name: config + - name: telementry-global-config + configMap: + name: bigdata-common-telemetry-fluentbit-cm + - name: telementry-custom-config configMap: - name: bigdata-telemetry-fluentbit-cm + name: {{ include "bigdata-notebook-service-storage-server.fullname" . }}-telemetry-cm - name: varlog hostPath: path: /var/log/ - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers + - name: telemetry-aws-credentials + secret: + secretName: spot-bigdata-telemetry-creds {{- end }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/bigdata-notebook-service-storage-server/templates/telemetry_configmap.yaml b/charts/bigdata-notebook-service-storage-server/templates/telemetry_configmap.yaml new file mode 100644 index 00000000..2cb06002 --- /dev/null +++ b/charts/bigdata-notebook-service-storage-server/templates/telemetry_configmap.yaml @@ -0,0 +1,17 @@ +{{- if .Values.telemetry.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "bigdata-notebook-service-storage-server.fullname" . }}-telemetry-cm + labels: + {{- include "bigdata-notebook-service-storage-server.labels" . | nindent 4 }} +data: + custom-filters.conf: | + [FILTER] + Name grep + Match kube.* + Regex $kubernetes['labels']['bigdata.spot.io/component'] {{ include "bigdata-notebook-service-storage-server.fullname" . }} + + metrics-collection.conf: | + # Configuration for collecting metrics from the notebook service storage server +{{- end }} diff --git a/charts/bigdata-notebook-service/Chart.yaml b/charts/bigdata-notebook-service/Chart.yaml index 41985aca..fc19df5c 100644 --- a/charts/bigdata-notebook-service/Chart.yaml +++ b/charts/bigdata-notebook-service/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bigdata-notebook-service description: A Helm chart for the Spot Big Data Notebook Service type: application -version: 0.2.4 +version: 0.2.5 appVersion: 0.1.16 home: https://github.com/spotinst/charts icon: https://docs.spot.io/_media/images/spot_mark.png diff --git a/charts/bigdata-notebook-service/templates/deployment.yaml b/charts/bigdata-notebook-service/templates/deployment.yaml index b0a4c606..bab46970 100644 --- a/charts/bigdata-notebook-service/templates/deployment.yaml +++ b/charts/bigdata-notebook-service/templates/deployment.yaml @@ -168,9 +168,15 @@ spec: optional: true resources: {} volumeMounts: - - name: config + - name: telementry-global-config mountPath: /fluent-bit/etc/fluent-bit.conf subPath: fluent-bit.conf + - name: telementry-custom-config + mountPath: /fluent-bit/etc/custom-filters.conf + subPath: custom-filters.conf + - name: telementry-custom-config + mountPath: /fluent-bit/etc/metrics-collection.conf + subPath: metrics-collection.conf - name: varlog readOnly: true mountPath: /var/log/ @@ -180,9 +186,12 @@ spec: - name: telemetry-aws-credentials mountPath: /root/.aws volumes: - - name: config + - name: telementry-global-config configMap: - name: bigdata-telemetry-fluentbit-cm + name: bigdata-common-telemetry-fluentbit-cm + - name: telementry-custom-config + configMap: + name: {{ include "bigdata-notebook-service.fullname" . }}-telemetry-cm - name: varlog hostPath: path: /var/log/ diff --git a/charts/bigdata-notebook-service/templates/telemetry_configmap.yaml b/charts/bigdata-notebook-service/templates/telemetry_configmap.yaml new file mode 100644 index 00000000..8ab50db0 --- /dev/null +++ b/charts/bigdata-notebook-service/templates/telemetry_configmap.yaml @@ -0,0 +1,17 @@ +{{- if .Values.telemetry.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "bigdata-notebook-service.fullname" . }}-telemetry-cm + labels: + {{- include "bigdata-notebook-service.labels" . | nindent 4 }} +data: + custom-filters.conf: | + [FILTER] + Name grep + Match kube.* + Regex $kubernetes['labels']['bigdata.spot.io/component'] {{ index .Values.podLabels "bigdata.spot.io/component" | quote }} + + metrics-collection.conf: | + # Configuration for collecting metrics from the notebook service +{{- end }} diff --git a/charts/bigdata-notebook-workspace/Chart.yaml b/charts/bigdata-notebook-workspace/Chart.yaml index 0697b4ae..0693f0af 100644 --- a/charts/bigdata-notebook-workspace/Chart.yaml +++ b/charts/bigdata-notebook-workspace/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bigdata-notebook-workspace description: A Helm chart for the Spot Big Data Notebook Workspace type: application -version: 0.0.8 +version: 0.0.9 appVersion: 4.0.10-ofas-d35201c home: https://github.com/spotinst/charts icon: https://docs.spot.io/_media/images/spot_mark.png diff --git a/charts/bigdata-notebook-workspace/templates/deployment.yaml b/charts/bigdata-notebook-workspace/templates/deployment.yaml index ea6e7b96..fad7bcca 100644 --- a/charts/bigdata-notebook-workspace/templates/deployment.yaml +++ b/charts/bigdata-notebook-workspace/templates/deployment.yaml @@ -88,12 +88,78 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} resources: {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.telemetry.enabled }} + - name: fluentbit + image: "{{ .Values.telemetry.fluentbit.image.repository }}:{{ .Values.telemetry.fluentbit.image.tag }}" + ports: + - name: http + containerPort: 2020 + protocol: TCP + env: + - name: AWS_BUCKET_NAME + valueFrom: + secretKeyRef: + name: spot-bigdata-telemetry-creds + key: AWS_BUCKET_NAME + - name: AWS_REGION + valueFrom: + secretKeyRef: + name: spot-bigdata-telemetry-creds + key: AWS_REGION + - name: CLUSTER_ID + valueFrom: + configMapKeyRef: + name: spot-ofas-cluster-info + key: clusterId + - name: ACCOUNT_ID + valueFrom: + configMapKeyRef: + name: spot-ofas-cluster-info + key: accountId + volumeMounts: + - name: telementry-global-config + mountPath: /fluent-bit/etc/fluent-bit.conf + subPath: fluent-bit.conf + - name: telementry-custom-config + mountPath: /fluent-bit/etc/custom-filters.conf + subPath: custom-filters.conf + - name: telementry-custom-config + mountPath: /fluent-bit/etc/metrics-collection.conf + subPath: metrics-collection.conf + - name: varlog + readOnly: true + mountPath: /var/log/ + - name: varlibdockercontainers + readOnly: true + mountPath: /var/lib/docker/containers + - name: telemetry-aws-credentials + mountPath: /root/.aws + {{- end }} restartPolicy: {{ .Values.restartPolicy }} - {{- if .Values.pvc.create }} + {{- if or .Values.pvc.create .Values.telemetry.enabled }} volumes: + {{- if .Values.pvc.create }} - name: {{ .Values.volume.name }} persistentVolumeClaim: claimName: {{ .Release.Name }} + {{- end }} + {{- if .Values.telemetry.enabled }} + - name: telementry-global-config + configMap: + name: bigdata-common-telemetry-fluentbit-cm + - name: telementry-custom-config + configMap: + name: {{ include "bigdata-notebook-workspace.fullname" . }}-telemetry-cm + - name: varlog + hostPath: + path: /var/log/ + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers + - name: telemetry-aws-credentials + secret: + secretName: spot-bigdata-telemetry-creds + {{- end }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/bigdata-notebook-workspace/templates/telemetry_configmap.yaml b/charts/bigdata-notebook-workspace/templates/telemetry_configmap.yaml new file mode 100644 index 00000000..93beecdf --- /dev/null +++ b/charts/bigdata-notebook-workspace/templates/telemetry_configmap.yaml @@ -0,0 +1,17 @@ +{{- if .Values.telemetry.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "bigdata-notebook-workspace.fullname" . }}-telemetry-cm + labels: + {{- include "bigdata-notebook-workspace.labels" . | nindent 4 }} +data: + custom-filters.conf: | + [FILTER] + Name grep + Match kube.* + Regex $kubernetes['labels']['bigdata.spot.io/component'] {{ index .Values.podLabels "bigdata.spot.io/component" | quote }} + + metrics-collection.conf: | + # Configuration for collecting metrics from the notebook workspace +{{- end }} diff --git a/charts/bigdata-notebook-workspace/values.yaml b/charts/bigdata-notebook-workspace/values.yaml index 17daedcb..9835822a 100644 --- a/charts/bigdata-notebook-workspace/values.yaml +++ b/charts/bigdata-notebook-workspace/values.yaml @@ -30,8 +30,16 @@ gatewayClient: headers: '{"Content-Type": "application/json"}' secretKeyToken: token +telemetry: + enabled: false + fluentbit: + image: + repository: public.ecr.aws/ocean-spark/fluent-bit + tag: 2.0.10 + +podLabels: + bigdata.spot.io/component: "bigdata-notebook-workspace" podAnnotations: {} -podLabels: {} sharedLabels: {} sharedAnnotations: {} diff --git a/charts/bigdata-operator/Chart.yaml b/charts/bigdata-operator/Chart.yaml index 509f5dfc..5fbc68d7 100644 --- a/charts/bigdata-operator/Chart.yaml +++ b/charts/bigdata-operator/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bigdata-operator description: Spot Ocean BigData Operator type: application -version: 0.4.10 +version: 0.4.11 appVersion: 0.4.9 home: https://github.com/spotinst/charts icon: https://docs.spot.io/_media/images/spot_mark.png diff --git a/charts/bigdata-operator/templates/common_telemetry_configmap.yaml b/charts/bigdata-operator/templates/common_telemetry_configmap.yaml new file mode 100644 index 00000000..9906951c --- /dev/null +++ b/charts/bigdata-operator/templates/common_telemetry_configmap.yaml @@ -0,0 +1,60 @@ +{{- if .Values.telemetry.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: bigdata-common-telemetry-fluentbit-cm + labels: + {{- include "bigdata-operator.labels" . | nindent 4 }} +data: + parsers.conf: | + [PARSER] + # http://rubular.com/r/tjUt3Awgg4 + Name cri + Format regex + Regex ^(?