d52823ee321852dbb0ed362baa433085aee2b3c9
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / danm-networks / templates / danm.yaml
1 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
2 #                                                                              #
3 #   Licensed under the Apache License, Version 2.0 (the "License");            #
4 #   you may not use this file except in compliance with the License.           #
5 #   You may obtain a copy of the License at                                    #
6 #                                                                              #
7 #       http://www.apache.org/licenses/LICENSE-2.0                             #
8 #                                                                              #
9 #   Unless required by applicable law or agreed to in writing, software        #
10 #   distributed under the License is distributed on an "AS IS" BASIS,          #
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
12 #   See the License for the specific language governing permissions and        #
13 #   limitations under the License.                                             #
14 ################################################################################
15 {{- if $.Values.global }}
16 {{- if $.Values.global.danm_networks }}
17 {{- range keys $.Values.global.danm_networks }}
18 {{- with index $.Values.global.danm_networks . }}
19 {{- if ne .name "default" }}
20 ---
21 apiVersion: danm.k8s.io/v1
22 kind: ClusterNetwork
23 metadata:
24   name: {{.name}}
25 spec:
26   NetworkID: {{.network_id}}
27   NetworkType: {{.network_type}}
28   Options:
29     cidr: {{.cidr}}
30     allocation_pool:
31       start: {{.allocation_pool.start}}
32       end: {{.allocation_pool.end}}
33 {{- if .routes }}
34     routes:
35 {{- range $subnet, $route := .routes }}
36       {{ $subnet | quote }}: {{ $route | quote }}
37 {{- end }}
38 {{- end }}
39 {{- if .net6 }}
40     net6: {{ .net6 }}
41 {{- end }}
42 {{- if .routes }}
43     routes6:
44 {{- range $subnet, $route := .routes6 }}
45       {{ $subnet | quote }}: {{ $route | quote }}
46 {{- end }}
47 {{- end }}
48     host_device: {{ .host_device }}
49     rt_tables: {{ .rt_tables }}
50     vlan: {{ .vlan }}
51 {{- end }}
52 {{- end }}
53 {{- end }}
54 {{- end }}
55 {{- end }}