Skip to content

Commit

Permalink
disable pvc if local storage is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMapley committed Nov 21, 2023
1 parent 16b9f38 commit 118febf
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
1 change: 1 addition & 0 deletions charts/posit-chronicle/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ template:
template-all:
helm template -f ci/empty-values.yaml .
helm template -f ci/simple-values.yaml .
helm template -f ci/no-local-storage-values.yaml .
helm template -f ci/complex-values.yaml .
1 change: 0 additions & 1 deletion charts/posit-chronicle/ci/complex-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ config:
prefix: ""
profile: ""
region: "us-east-2"
compactionEnabled: false
metrics:
enabled: true
profiling:
Expand Down
21 changes: 21 additions & 0 deletions charts/posit-chronicle/ci/no-local-storage-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
image:
tag: "latest"

serviceaccount:
enabled: false
annotations: {
eks.amazonaws.com/role-arn: arn:aws:iam::123123123123123:role/chronicle-serviceaccount-role
}

config:
localStorage:
enabled: false
logging:
serviceLog: "STDOUT"
serviceLogLevel: "DEBUG"
serviceLogFormat: "JSON"
profiling:
enabled: true
s3Storage:
enabled: true
bucket: "posit-chronicle-dev"
1 change: 0 additions & 1 deletion charts/posit-chronicle/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ data:
Prefix = {{ .Values.config.s3Storage.prefix }}
Profile = {{ .Values.config.s3Storage.profile }}
Region = {{ .Values.config.s3Storage.region }}
CompactionEnabled = {{ .Values.config.s3Storage.compactionEnabled }}
---

4 changes: 4 additions & 0 deletions charts/posit-chronicle/templates/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ spec:
name: http
{{- end }}
volumeMounts:
{{- if .Values.config.localStorage.enabled }}
- name: data
mountPath: {{ .Values.config.localStorage.location }}
{{- end }}
- name: chronicle-server-config
mountPath: /opt/chronicle/config.gcfg
subPath: server
Expand All @@ -65,6 +67,7 @@ spec:
- name: chronicle-server-config
configMap:
name: chronicle-server-config
{{- if .Values.config.localStorage.enabled }}
volumeClaimTemplates:
- metadata:
name: data
Expand All @@ -73,4 +76,5 @@ spec:
resources:
requests:
storage: {{ .Values.storage.persistentVolumeSize }}
{{- end }}
---
3 changes: 2 additions & 1 deletion charts/posit-chronicle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ config:
key: ""
certificate: ""
localStorage:
# If localStorage.enabled=false, the chronicle stateful-set
# won't submit a volume claim or be bound to a persistent volume
enabled: true
location: "./chronicle-data"
retentionPeriod: "30d"
Expand All @@ -67,7 +69,6 @@ config:
prefix: ""
profile: ""
region: ""
compactionEnabled: false
metrics:
enabled: true
profiling:
Expand Down

0 comments on commit 118febf

Please sign in to comment.