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
8 changes: 8 additions & 0 deletions helm/holmes/templates/extra-objects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ range .Values.extraObjects }}
---
{{ if typeIs "string" . }}
{{- tpl . $ }}
{{- else }}
{{- tpl (toYaml .) $ }}
{{- end }}
{{ end }}
Comment on lines +1 to +8
Copy link
Contributor

@coderabbitai coderabbitai bot Aug 31, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix indentation + use kindIs; current output will be invalid YAML

The leading spaces before tpl emitters indent entire documents, breaking top-level YAML. Also, Helm commonly uses kindIs for type checks; typeIs is unreliable across Helm/Sprig versions.

Apply:

-{{ range .Values.extraObjects }}
----
-{{ if typeIs "string" . }}
-    {{- tpl . $ }}
-{{- else }}
-    {{- tpl (toYaml .) $ }}
-{{- end }}
-{{ end }}
+{{- if .Values.extraObjects }}
+{{- range $i, $obj := .Values.extraObjects }}
+---
+{{- if kindIs "string" $obj }}
+{{ tpl $obj $ }}
+{{- else if $obj }}
+{{ tpl (toYaml $obj) $ }}
+{{- end }}
+{{- end }}
+{{- end }}

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 4-4: syntax error: expected '', but found '{'

(syntax)


[warning] 6-6: wrong indentation: expected 0 but found 4

(indentation)

🤖 Prompt for AI Agents
In helm/holmes/templates/extra-objects.yaml lines 1-8, the current template
inserts leading spaces before the tpl calls which indents entire emitted
documents and breaks top-level YAML, and it uses typeIs which can be unreliable;
change typeIs "string" to kindIs "string" and remove the leading spaces so the
tpl outputs start at column 1 (keep the leading '---' separator at top-level),
calling tpl directly for string values and tpl(toYaml .) for non-strings so
emitted YAML documents are valid and not indented.

Copy link
Contributor

Choose a reason for hiding this comment

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

@DMSwimTech Did you see this comment from code rabbit?
Is it a real issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

11 changes: 11 additions & 0 deletions helm/holmes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ resources:
additionalVolumes: []
additionalVolumeMounts: []

# -- Array of extra K8s manifests to deploy
## Note: Supports use of custom Helm templates
extraObjects: []
# - apiVersion: secrets-store.csi.x-k8s.io/v1
# kind: SecretProviderClass
# metadata:
# name: holmes-secrets-store
# spec:
# provider: aws
# ...

priorityClassName: ""

modelList: {}
Loading