Fix notes bug (#178)

This commit is contained in:
kfox1111
2024-01-11 10:31:02 +00:00
committed by GitHub
parent 912c61e05c
commit befa074763
2 changed files with 17 additions and 4 deletions
+6 -4
View File
@@ -21,13 +21,15 @@ Warning: You're using an unsupported plugin. Functionality of this release and f
Warning: You're using an experimental config. Functionality of this release and future upgrades aren't guaranteed to work smoothly.
{{- end }}
{{- $className := include "spire-server.controller-manager-class-name" (dict "Values" (index .Values "spire-server") "Release" .Release) }}
{{- if (index .Values "spire-server").controllerManager.enabled }}
{{- if (index .Values "spire-server").controllerManager.watchClassless }}
{{- if (index .Values "spire-server").enabled }}
{{- $className := include "spire-server.controller-manager-class-name" (dict "Values" (index .Values "spire-server") "Release" .Release) }}
{{- if (index .Values "spire-server").controllerManager.enabled }}
{{- if (index .Values "spire-server").controllerManager.watchClassless }}
Spire CR's will be handled if no className is specified or if className is set to "{{ $className }}"
{{- else }}
{{- else }}
Spire CR's will be handled only if className is set to "{{ $className }}"
{{- end }}
{{- end }}
{{- end }}
+11
View File
@@ -133,4 +133,15 @@ spire-agent:
Expect(notes).Should(ContainSubstring("join_token"))
})
})
Describe("spire-server.disabled", func() {
It("spire server off", func() {
objs, err := ValueStringRender(chart, `
spire-server:
enabled: false
`)
Expect(err).Should(Succeed())
notes := objs["spire/templates/NOTES.txt"]
Expect(notes).Should(ContainSubstring("Installed"))
})
})
})