-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(eventtemplates): declarative configuration of Event Template ConfigMaps #215
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,12 @@ spec: | |
failureThreshold: 18 | ||
resources: | ||
{{- toYaml .Values.core.resources | nindent 12 }} | ||
volumeMounts: | ||
{{- range .Values.core.config.eventTemplates.configMapNames }} | ||
- name: {{ . }} | ||
mountPath: /opt/cryostat.d/templates.d/{{ . }} | ||
readOnly: true | ||
{{- end }} | ||
- name: {{ printf "%s-%s" .Chart.Name "grafana" }} | ||
securityContext: | ||
{{- toYaml .Values.grafana.securityContext | nindent 12 }} | ||
|
@@ -216,3 +222,8 @@ spec: | |
secret: | ||
secretName: {{ .Release.Name }}-proxy-tls | ||
{{- end }} | ||
{{- range .Values.core.config.eventTemplates.configMapNames}} | ||
- name: {{ . }} | ||
configMap: | ||
name: {{ . }} | ||
{{- end }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any thoughts on using a projected volume here to combine all config-map contents into a single volume? One benefit is that we can define a single volumeMount on Reference: https://kubernetes.io/docs/concepts/storage/projected-volumes/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I could do this. It would be a single mount but the definition for the projected volume itself would still look about the same, so I'm not really sure I understand what benefit it brings... ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm, I suppose reducing the number of volume mount definitions can help reduce the manifest size (thus, object size in etcd). And grouping them under a single volume seems to make it easier to recognize their purpose when reading the manifest (my opinion). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we can do the same for #219. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,10 @@ core: | |
builtInPortNumbersDisabled: false | ||
## @param core.discovery.kubernetes.portNumbers [array] List of port numbers that the Cryostat application should look for in order to consider a target as JMX connectable | ||
portNumbers: [] | ||
config: | ||
eventTemplates: | ||
## @param core.config.eventTemplates.configMapNames [array] List of ConfigMap names. Each ConfigMap is expected to contain one or more files, which are .jfc (XML) JFR Event Templates, to be mounted to the Cryostat container. | ||
configMapNames: [] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering if we can allow specifying the key(s) within the configmaps? Something similar to Cryostat CR. I guess one case could be that a user uses a Configmap to put all Cryostat configurations (i.e. Event template and Automated Rules). I might be overthinking :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about that, but it seems like it'd be pretty messy trying to put all of the configurations of different types into one ConfigMap and use filenames to differentiate them. It would also much more quickly run into the ConfigMap size limit that way. I think using one or more ConfigMaps for each type of configuration file is a good medium option, where if there are many custom Event Templates that add up to too large a filesize then they can be split across multiple ConfigMaps, for example, but otherwise they can just be combined together as separate files and mounted that way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, that makes sense! I think the current way is good then^^ |
||
|
||
## @section Report Generator Deployment | ||
## @extra reports Configuration for the Reports Generator deployment | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, should we enforce that these configmaps are available at the time of installation (i.e.
optional: false
)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a fair point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can tell, I think
optional: false
is the default (which makes sense), but I can mark them as explicitly non-optional.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, sounds good!