Add url option to portal configmap (#315)
* Add url option to portal configmap It makes it easier to consume the portal url in other places, without all sorts of translation scripting * add portal-url test
This commit is contained in:
parent
64aa712dab
commit
8349a1c750
|
@ -323,6 +323,7 @@ class Test < ChartTest
|
|||
defaultProtocol = "https"
|
||||
defaultHost = "$node_ip"
|
||||
defaultPort = "443"
|
||||
defaulturl = "https://$node_ip:443"
|
||||
testNodePort = "666"
|
||||
testIngressPort = "888"
|
||||
it 'No portal (=configmap) is created by default' do
|
||||
|
@ -340,6 +341,7 @@ class Test < ChartTest
|
|||
jq('.data.protocol', resource('ConfigMap')).must_equal defaultProtocol
|
||||
jq('.data.host', resource('ConfigMap')).must_equal defaultHost
|
||||
jq('.data.port', resource('ConfigMap')).must_equal defaultPort
|
||||
jq('.data.url', resource('ConfigMap')).must_equal defaulturl
|
||||
end
|
||||
|
||||
it 'portal port can be based on NodePort' do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: common
|
||||
version: 2.0.2
|
||||
version: 2.0.3
|
||||
# upstream_version:
|
||||
appVersion: none
|
||||
description: Function library for TrueCharts
|
||||
|
|
|
@ -57,6 +57,7 @@ data:
|
|||
protocol: {{ $protocol }}
|
||||
host: {{ $host }}
|
||||
port: {{ $port | quote }}
|
||||
url: {{ printf "%v%v%v%v%v" $protocol "://" $host ":" $port }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in New Issue