Moving dev back to LF Gerrit
[it/dep.git] / ric-common / Common-Template / helm / ric-common / templates / _ingresscontroller.tpl
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #   Copyright (c) 2019 Nokia.                                                  #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17
18 {{/*
19   Resolve the ingress controller addresses.
20 */}}
21
22 ####################### Service URL #####################################
23 {{- define "common.ingressurl.ric" -}}
24   {{- if .Values.global -}}
25     {{- if .Values.global.ingressurl -}}
26       {{- if .Values.global.ingressurl.ric -}}
27         {{- printf "%s" .Values.global.ingressurl.ric -}}
28       {{- else -}}
29         {{- printf "ric-entry" -}}
30       {{- end -}}
31     {{- else -}}
32       {{- printf "ric-entry" -}}
33     {{- end -}}
34   {{- else -}}
35     {{- printf "ric-entry" -}}
36   {{- end -}}
37 {{- end -}}
38
39
40 {{- define "common.ingressurl.aux" -}}
41   {{- if .Values.global -}}
42     {{- if .Values.global.ingressurl -}}
43       {{- if .Values.global.ingressurl.aux -}}
44         {{- printf "%s" .Values.global.ingressurl.aux -}}
45       {{- else -}}
46         {{- printf "aux-entry" -}}
47       {{- end -}}
48     {{- else -}}
49       {{- printf "aux-entry" -}}
50     {{- end -}}
51   {{- else -}}
52     {{- printf "aux-entry" -}}
53   {{- end -}}
54 {{- end -}}
55
56 {{- define "common.ingressurl.dashboard" -}}
57   {{- if .Values.global -}}
58     {{- if .Values.global.ingressurl -}}
59       {{- if .Values.global.ingressurl.dashboard -}}
60         {{- printf "%s" .Values.global.ingressurl.dashboard -}}
61       {{- else -}}
62         {{- printf "dashboard-entry" -}}
63       {{- end -}}
64     {{- else -}}
65       {{- printf "dashboard-entry" -}}
66     {{- end -}}
67   {{- else -}}
68     {{- printf "dashboard-entry" -}}
69   {{- end -}}
70 {{- end -}}
71
72
73 ####################### Ingress Controller Ports ###########################################
74 ## Currently the below values are hard-coded due to the fact that kong ingress controller  #
75 ## helm charts are not using this common template. We need to make sure that these values  #
76 ## agree with the values in the kong helm charts values.yaml files.                        #
77 ############################################################################################  
78 {{- define "common.ingresshttpport" -}}
79   {{- printf "32080" -}}
80 {{- end -}}
81
82 {{- define "common.ingresshttpsport" -}}
83   {{- printf "32443" -}}
84 {{- end -}}
85