Skip to content
Open
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
3 changes: 3 additions & 0 deletions helm/solr/templates/solrcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ spec:
{{- if .Values.dataStorage.persistent.pvc.storageClassName }}
storageClassName: {{ .Values.dataStorage.persistent.pvc.storageClassName | quote }}
{{- end }}
{{- if .Values.dataStorage.persistent.pvc.volumeAttributesClassName }}
volumeAttributesClassName: {{ .Values.dataStorage.persistent.pvc.volumeAttributesClassName | quote }}
{{- end }}
Comment on lines +149 to +151
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The volumeAttributesClassName field is being added inside a spec block that is conditionally rendered (line 139). However, the condition on line 139 only checks for capacity or storageClassName, not volumeAttributesClassName. This means if a user sets only volumeAttributesClassName without setting either storageClassName or capacity, the entire spec block will not be rendered, and volumeAttributesClassName will be silently ignored. The condition on line 139 should be updated to include .Values.dataStorage.persistent.pvc.volumeAttributesClassName in the 'or' expression.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@karlderkaefer karlderkaefer Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what copilot is complaining about is that the condition is not added to line 131 https://github.com/coolstim/solr-operator/blob/753ee4ac69eb5638ea3e85e2f63c1fa097b0f467/helm/solr/templates/solrcloud.yaml#L139

however the capacity is always set to 20Gi by default. I don't believe this is valid edge case where capacity is set to empty. however to make copilot you could add to line 131

{{- if (or .Values.dataStorage.capacity .Values.dataStorage.persistent.pvc.storageClassName
  .Values.dataStorage.persistent.pvc.volumeAttributesClassName) }}

but not required since capacity should be always set

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janhoy this can be resolved IMO

{{- end }}
{{- else }}
ephemeral:
Expand Down
1 change: 1 addition & 0 deletions helm/solr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ dataStorage:
labels: {}
annotations: {}
storageClassName: ""
volumeAttributesClassName: ""

# How to control availability for Solr Nodes
availability:
Expand Down