blob: 230eafea58098583ac8734d09abc0e3aab3ee86c [file] [log] [blame]
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
{{- $root := . }}
apiVersion: v1
data:
arouter.voltha.json: |
{
"servers": [
{
"name": "grpc_command",
"port": 55555,
"address": "",
"type": "grpc",
"routers": [
{
"_TODO": "Suport a router list, remove the package and service from the router",
"package": "voltha",
"service": "VolthaService",
"router": "vcore"
}
]
}
],
"routers": [
{
"name": "vcore",
"package": "voltha",
"service": "VolthaService",
"routes": [
{
"name": "dev_manager",
"proto_descriptor": "voltha.pb",
"type": "rpc_affinity_message",
"association": "round_robin",
"routing_field": "id",
"backend_cluster": "vcore",
"_COMMENT": "Methods here MUST be specified above, this overrides thier default beahvior",
"methods": [
"CreateDevice",
"GetCoreInstance",
"EnableLogicalDevicePort",
"DisableLogicalDevicePort",
"EnableDevice",
"DisableDevice",
"RebootDevice",
"DeleteDevice",
"DownloadImage",
"CancelImageDownload",
"ActivateImageUpdate",
"RevertImageUpdate",
"UpdateDevicePmConfigs",
"CreateAlarmFilter",
"UpdateAlarmFilter",
"DeleteAlarmFilter",
"SelfTest"
],
"nb_binding_methods": [
"CreateDevice"
],
"_TODO": "Overrides not implemented yet, config ignored",
"overrides": [ ]
},
{
"name": "read_only",
"type": "round_robin",
"association": "round_robin",
"backend_cluster": "ro_vcore",
"methods": [
"ListDevicePorts",
"ListDevicePmConfigs",
"GetImages",
"GetImageDownloadStatus",
"GetImageDownload",
"ListImageDownloads",
"ListDeviceFlows",
"ListDeviceFlowGroups",
"ListLogicalDeviceFlows",
"ListLogicalDeviceFlowGroups",
"ListDevices",
"GetDevice",
"ListLogicalDevices",
"GetLogicalDevices",
"GetDeviceType",
"GetDeviceGroup",
"GetLogicalDevice",
"GetAlarmFilter",
"ListLogicalDevicePorts",
"GetLogicalDevicePort",
"ListAdapters",
"GetVoltha"
]
},
{
"name": "dev_manager_ofagent",
"type": "binding",
"_association": "round_robin",
"binding": {
"type": "header",
"field": "voltha_backend_name",
"method": "Subscribe",
"association": "round_robin"
},
"backend_cluster": "vcore",
"methods": [
"StreamPacketsOut",
"ReceivePacketsIn",
"ReceiveChangeEvents",
"Subscribe",
"UpdateLogicalDeviceFlowTable",
"UpdateLogicalDeviceFlowGroupTable",
"GetLogicalDevice",
"GetLogicalDevicePort",
"EnableLogicalDevicePort",
"DisableLogicalDevicePort",
"ListLogicalDevices",
"ListLogicalDeviceFlows",
"ListLogicalDeviceFlowGroups",
"ListLogicalDevicePorts"
],
"_TODO": "Overrides not implemented yet, config ignored",
"overrides": [ ]
}
]
}
],
"backend_clusters": [
{
"name": "vcore",
"backends": [
{{- range $i, $e := until (int .Values.replicas.rw_core) }}
{{- $cluster := add1 $i }}
{
"name": "vcore{{ $cluster }}",
"type": "active_active",
"association": {
"strategy": "serial_number",
"location": "header",
"_TODO": "The key below needs to be implemented, currently hard coded",
"key": "voltha_serial_number"
},
"connections": [
{
"name": "vcore{{ $cluster }}1",
"addr": "voltha-rw-core-{{ $cluster }}1.{{ $root.Release.Namespace }}.svc.cluster.local",
"port": "50057"
},
{
"name": "vcore{{ $cluster }}2",
"addr": "voltha-rw-core-{{ $cluster }}2.{{ $root.Release.Namespace }}.svc.cluster.local",
"port": "50057"
}
]
}{{ if lt $cluster (int $root.Values.replicas.rw_core) }},{{ end }}
{{- end}}
]
},
{
"name": "ro_vcore",
"backends": [
{{- range $core_idx, $e := until (int .Values.replicas.rw_core) }}
{
"name": "ro_vcore{{ $core_idx }}",
"type": "server",
"connections": [
{
"name": "ro_vcore{{ $core_idx }}1",
"addr": "voltha-ro-core-{{ $core_idx }}.voltha-ro-core.{{ $root.Release.Namespace }}.svc.cluster.local",
"port": "50057"
}
]
}{{ if lt (add1 $core_idx) (int $root.Values.replicas.rw_core) }},{{ end }}
{{- end}}
]
}
],
"api": {
"_comment": "If this isn't defined then no api is available for dynamic configuration and queries",
"address": "",
"port": 55554
}
}
kind: ConfigMap
metadata:
name: afrouter-config
serviceAccountName: {{ .Values.serviceaccount }}