Add RBAC roles, fix DANM network bugs
[it/dep.git] / ric-aux / 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 {{- if ne .name "default" }}
29   Options:
30     cidr: {{.cidr}}
31     allocation_pool:
32       start: {{.allocation_pool.start}}
33       end: {{.allocation_pool.end}}
34 {{- if .routes }}
35     routes:
36 {{- range $subnet, $route := .routes }}
37       {{ $subnet | quote }}: {{ $route | quote }}
38 {{- end }}
39 {{- end }}
40 {{- if .net6 }}
41     net6: {{ .net6 }}
42 {{- end }}
43 {{- if .routes6 }}
44     routes6:
45 {{- range $subnet, $route := .routes6 }}
46       {{ $subnet | quote }}: {{ $route | quote }}
47 {{- end }}
48 {{- end }}
49     host_device: {{ .host_device }}
50     rt_tables: {{ .rt_tables }}
51     vlan: {{ .vlan }}
52 {{- end }}
53 {{- end }}
54 {{- end }}
55 {{- end }}
56 {{- end }}
57 {{- end }}