Skip to content

Commit

Permalink
[charts/bigdata-spark-watcher] added conditional envVars for k8s even…
Browse files Browse the repository at this point in the history
…ts collection
  • Loading branch information
Z4ck404 committed Aug 20, 2024
1 parent 4178011 commit 3337913
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion charts/bigdata-spark-watcher/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: bigdata-spark-watcher
description: A Helm chart for the Spot Big Data Spark Watcher
type: application
version: 0.5.20
version: 0.5.21
appVersion: 0.5.3
home: https://github.com/spotinst/charts
icon: https://docs.spot.io/_media/images/spot_mark.png
Expand Down
29 changes: 26 additions & 3 deletions charts/bigdata-spark-watcher/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,33 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.envVars }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: SPOTINST_BASE_URL
value: {{ .Values.spotBaseUrl }}
{{- if .Values.k8sEventLogCollectorEnabled }}
- name: APP_SYNC_PERIOD
value: {{ .Values.k8SEventLogCollection.appSyncPeriod }}
- name: APP_SYNC_KILL_GRACE_PERIOD
value: {{ .Values.k8SEventLogCollection.appSyncKillGracePeriod }}
- name: APP_SYNC_GHOST_GRACE_PERIOD
value: {{ .Values.k8SEventLogCollection.appSyncKillGhostGracePeriod }}
- name: APP_SYNC_REVERSE_GHOST_GRACE_PERIOD
value: {{ .Values.k8SEventLogCollection.appSyncReverseGhostGracePeriod }}
- name: KUBE_EVENT_LOG_COLLECTION_BUCKET_PREFIX
value: {{ .Values.k8SEventLogCollection.bucketPrefix }}
- name: AWS_CREDENTIALS_FILE
value: /creds/aws
- name: GCP_CREDENTIALS_FILE
value: /creds/gcp
- name: AZURE_CREDENTIALS_FILE
value: /creds/azure
- name: CREDS_REFRESH_INTERVAL
value: 2m
- name: SPARK_APP_FAILED_EXECUTOR_LIMIT
value: {{ .Values.k8SEventLogCollection.sparkAppFaildExecutorLimit }}
- name: SPARK_APP_TERMINATED_CRITICAL_SIDECAR_GRACE_PERIOD
value: {{ .Values.k8SEventLogCollection.sparkAppTerminatedCriticalSidecarGracePeriod }}
{{- end }}
- name: HTTP_PROXY
valueFrom:
configMapKeyRef:
Expand Down
37 changes: 12 additions & 25 deletions charts/bigdata-spark-watcher/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,7 @@ imagePullSecrets:
nameOverride: ""
fullnameOverride: ""

envVars:
- name: SPOTINST_BASE_URL
value: https://api.spotinst.io
- name: APP_SYNC_PERIOD
value: 5m
- name: APP_SYNC_KILL_GRACE_PERIOD
value: 5m
- name: APP_SYNC_GHOST_GRACE_PERIOD
value: 6m
- name: APP_SYNC_REVERSE_GHOST_GRACE_PERIOD
value: 30s
- name: KUBE_EVENT_LOG_COLLECTION_BUCKET_PREFIX
value: "spot-bigdata-logcollector"
- name: AWS_CREDENTIALS_FILE
value: /creds/aws
- name: GCP_CREDENTIALS_FILE
value: /creds/gcp
- name: AZURE_CREDENTIALS_FILE
value: /creds/azure
- name: CREDS_REFRESH_INTERVAL
value: 2m
- name: SPARK_APP_FAILED_EXECUTOR_LIMIT
value: "200"
- name: SPARK_APP_TERMINATED_CRITICAL_SIDECAR_GRACE_PERIOD
value: 3m
spotBaseUrl: "https://api.spotinst.io"

# Spark Application watch label - used to select sparkApplication custom resources
saWatchLabel: ""
Expand Down Expand Up @@ -92,6 +68,17 @@ telemetry:
repository: public.ecr.aws/ocean-spark/fluent-bit
tag: 3.0.5

k8SEventLogCollection:
# enabled: true
appSyncPeriod: 5m
appSyncKillGracePeriod: 5m
appSyncKillGhostGracePeriod: 5m
appSyncReverseGhostGracePeriod: 30s
bucketPrefix: "spot-bigdata-logcollector"
sparkAppFaildExecutorLimit: "200"
sparkAppTerminatedCriticalSidecarGracePeriod: 3m


nodeSelector: {}

tolerations:
Expand Down

0 comments on commit 3337913

Please sign in to comment.