Move Kong to infra deployment
[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
57 {{- define "common.ingressurl.helm" -}}
58   {{- if .Values.global -}}
59     {{- if .Values.global.ingressurl -}}
60       {{- if .Values.global.ingressurl.helm -}}
61         {{- printf "%s" .Values.global.ingressurl.helm -}}
62       {{- else -}}
63         {{- printf "helm-entry" -}}
64       {{- end -}}
65     {{- else -}}
66       {{- printf "helm-entry" -}}
67     {{- end -}}
68   {{- else -}}
69     {{- printf "helm-entry" -}}
70   {{- end -}}
71 {{- end -}}
72
73
74
75
76
77
78 ####################### Ingress Controller Ports ###########################################
79 ## Currently the below values are hard-coded due to the fact that kong ingress controller  #
80 ## helm charts are not using this common template. We need to make sure that these values  #
81 ## agree with the values in the kong helm charts values.yaml files.                        #
82 ############################################################################################  
83 {{- define "common.ingresshttpport" -}}
84   {{- printf "32080" -}}
85 {{- end -}}
86
87 {{- define "common.ingresshttpsport" -}}
88   {{- printf "32443" -}}
89 {{- end -}}
90