Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add values to add extraVolumes to lapi and agent #188

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/crowdsec/templates/agent-daemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ spec:
- name: crowdsec-agent-tls
mountPath: /etc/ssl/crowdsec-agent
{{- end }}
{{- if .Values.agent.extraVolumeMounts }}
{{ toYaml .Values.agent.extraVolumeMounts | nindent 10 }}
{{- end }}
terminationGracePeriodSeconds: 30
volumes:
- name: acquis-config-volume
Expand Down Expand Up @@ -278,6 +281,9 @@ spec:
secret:
secretName: {{ .Release.Name }}-agent-tls
{{- end }}
{{- if .Values.agent.extraVolumes }}
{{ toYaml .Values.agent.extraVolumes | nindent 6 }}
{{- end }}
{{- with .Values.agent.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
10 changes: 8 additions & 2 deletions charts/crowdsec/templates/lapi-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ spec:
lifecycle:
{{- toYaml .Values.lapi.lifecycle | nindent 10 }}
{{- end }}
{{- if or (.Values.tls.enabled) (.Values.lapi.persistentVolume.data.enabled) (.Values.lapi.persistentVolume.config.enabled) (.Values.lapi.dashboard.enabled) (include "lapiCustomConfigIsNotEmpty" .) }}
{{- if or (.Values.tls.enabled) (.Values.lapi.persistentVolume.data.enabled) (.Values.lapi.persistentVolume.config.enabled) (.Values.lapi.dashboard.enabled) (include "lapiCustomConfigIsNotEmpty" .) (.Values.lapi.extraVolumeMounts) }}
volumeMounts:
{{- if .Values.tls.enabled }}
- name: crowdsec-lapi-tls
Expand Down Expand Up @@ -240,6 +240,9 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.lapi.extraVolumeMounts }}
{{ toYaml .Values.lapi.extraVolumeMounts | nindent 10 }}
{{- end }}
{{- end }}
{{- if .Values.lapi.dashboard.enabled }}
- name: dashboard
Expand Down Expand Up @@ -306,7 +309,7 @@ spec:

{{- end }}
terminationGracePeriodSeconds: 30
{{- if or (.Values.tls.enabled) (.Values.lapi.persistentVolume.data.enabled) (.Values.lapi.persistentVolume.config.enabled) (.Values.lapi.dashboard.enabled) (include "lapiCustomConfigIsNotEmpty" .) }}
{{- if or (.Values.tls.enabled) (.Values.lapi.persistentVolume.data.enabled) (.Values.lapi.persistentVolume.config.enabled) (.Values.lapi.dashboard.enabled) (include "lapiCustomConfigIsNotEmpty" .) (.Values.lapi.extraVolumes) }}
volumes:
{{- if .Values.lapi.persistentVolume.data.enabled }}
- name: crowdsec-db
Expand Down Expand Up @@ -369,6 +372,9 @@ spec:
secret:
secretName: {{ .Release.Name }}-agent-tls
{{- end }}
{{- if .Values.lapi.extraVolumes }}
{{ toYaml .Values.lapi.extraVolumes | nindent 6 }}
{{- end }}
{{- end }}
{{- with .Values.lapi.tolerations }}
tolerations:
Expand Down
12 changes: 12 additions & 0 deletions charts/crowdsec/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ lapi:
# -- Extra init containers to be added to lapi pods
extraInitContainers: []

# -- Extra volumes to be added to lapi pods
extraVolumes: []

# -- Extra volumeMounts to be added to lapi pods
extraVolumeMounts: []

# -- resources for lapi
resources:
limits:
Expand Down Expand Up @@ -333,6 +339,12 @@ agent:
# -- Extra init containers to be added to agent pods
extraInitContainers: []

# -- Extra volumes to be added to agent pods
extraVolumes: []

# -- Extra volumeMounts to be added to agent pods
extraVolumeMounts: []

resources:
limits:
memory: 250Mi
Expand Down
Loading