Skip to content

Commit

Permalink
feat: Add support for mounting volumes to the agent. (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcorwin authored Feb 5, 2025
1 parent 63c9205 commit aa0f6b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
16 changes: 11 additions & 5 deletions charts/vantage-kubernetes-agent/templates/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ spec:
{{- with .Values.persist }}
- name: VANTAGE_PERSIST_DIR
value: "{{ .mountPath }}"
{{ end }}
{{- end }}
ports:
- name: {{ .Values.service.name }}
containerPort: {{ .Values.service.port }}
Expand All @@ -149,14 +149,20 @@ spec:
port: {{ .Values.service.name }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

volumeMounts:
{{- if .Values.agent.volumeMounts }}
{{- toYaml .Values.agent.volumeMounts | nindent 10 }}
{{- end }}
{{- if not .Values.agent.useDeployment }}
{{- with .Values.persist }}
volumeMounts:
- name: {{ .name }}
mountPath: {{ .mountPath }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}
volumes:
{{- if .Values.agent.volumes }}
{{- toYaml .Values.agent.volumes | nindent 6 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if not .Values.agent.useDeployment }}
Expand Down
6 changes: 6 additions & 0 deletions charts/vantage-kubernetes-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
},
"useDeployment": {
"type": "boolean"
},
"volumes": {
"type": "array"
},
"volumesMounts": {
"type": "array"
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions charts/vantage-kubernetes-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ agent:
# Uses agent default if not specified: "/metrics"
exporterPath: ""

volumes: []
volumeMounts: []

persist:
mountPath: "/var/lib/vantage-agent"
Expand Down

0 comments on commit aa0f6b1

Please sign in to comment.