Skip to content

Commit

Permalink
Fix host when ingress disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Oct 23, 2024
1 parent 57ea985 commit 83b6857
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/curvy-tips-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/helm-charts": patch
---

Fix indent when outputting host without ingress
2 changes: 1 addition & 1 deletion charts/openproject/templates/secret_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stringData:
OPENPROJECT_SEED_LOCALE: {{ .Values.openproject.seed_locale | quote }}
{{- if .Values.ingress.enabled }}
OPENPROJECT_HOST__NAME: {{ .Values.openproject.host | default .Values.ingress.host | quote }}
{{- else if .Values.openproject.host -}}
{{- else if .Values.openproject.host }}
OPENPROJECT_HOST__NAME: {{ .Values.openproject.host | quote }}
{{- end }}
OPENPROJECT_HSTS: {{ .Values.openproject.hsts | quote }}
Expand Down
18 changes: 18 additions & 0 deletions spec/charts/openproject/host_name_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,22 @@
.not_to include("OPENPROJECT_HOST__NAME")
end
end

context 'when setting host name and disabling ingress' do
let(:default_values) do
HelmTemplate.with_defaults(<<~YAML
ingress:
enabled: false
openproject:
host: foo.example.com
YAML
)
end

it 'the host is not output', :aggregate_failures do
expect(subject)
.to include("OPENPROJECT_HOST__NAME" => "foo.example.com")

end
end
end

0 comments on commit 83b6857

Please sign in to comment.