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 (#222)

* [charts/bigdata-spark-watcher] refactored envVars into individual variables, added vars for k8s events collection

---------

Co-authored-by: HafdisE <[email protected]>
  • Loading branch information
Z4ck404 and HafdisE authored Sep 18, 2024
1 parent 57a4120 commit 0991b2f
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.21
version: 0.5.22
appVersion: 0.5.4
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 }}
- name: APP_SYNC_PERIOD
value: {{ .Values.appSyncPeriod }}
- name: APP_SYNC_KILL_GRACE_PERIOD
value: {{ .Values.appSyncKillGracePeriod }}
- name: APP_SYNC_GHOST_GRACE_PERIOD
value: {{ .Values.appSyncKillGhostGracePeriod }}
- name: APP_SYNC_REVERSE_GHOST_GRACE_PERIOD
value: {{ .Values.appSyncReverseGhostGracePeriod }}
- name: KUBE_EVENT_LOG_COLLECTION_BUCKET_PREFIX
value: {{ .Values.k8sEventLogCollector.bucketPrefix }}
- name: KUBE_EVENT_LOG_COLLECTION_ENVIRONMENT
value: {{ .Values.k8sEventLogCollector.environment }}
- 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.sparkAppFailedExecutorLimit | quote }}
- name: SPARK_APP_TERMINATED_CRITICAL_SIDECAR_GRACE_PERIOD
value: {{ .Values.sparkAppTerminatedCriticalSidecarGracePeriod }}
- 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 All @@ -53,7 +29,18 @@ logLevel: debug

killSyncerEnabled: true
ghostSyncerEnabled: true

appSyncKillGracePeriod: 5m
appSyncKillGhostGracePeriod: 5m
appSyncReverseGhostGracePeriod: 30s
appSyncPeriod: 5m
sparkAppFailedExecutorLimit: 200
sparkAppTerminatedCriticalSidecarGracePeriod: 3m

k8sEventLogCollectorEnabled: true
k8sEventLogCollector:
bucketPrefix: "spot-bigdata-logcollector"
environment: ""

serviceAccount:
create: true
Expand Down

0 comments on commit 0991b2f

Please sign in to comment.