diff options
author | Hongjun Ni <hongjun.ni@intel.com> | 2017-08-29 01:00:42 +0800 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2017-12-18 13:55:45 +0000 |
commit | c91f50242f384da67ad7a634dbe26276e67efd91 (patch) | |
tree | e784ffaf15d3f5240fdef44f522feb5c4307b54d /src/plugins/kubeproxy/kp.api | |
parent | 42998828c9bfa419ff3d9c68fd50cd148e24d4e4 (diff) |
Support kube-proxy data plane
This plugin provides kube-proxy data plane on user space,
which is used to replace linux kernal's kube-proxy based on iptables.
The idea is largely inspired from VPP LB plugin.
Currently, kube-proxy plugin supports three service types:
1) Cluster IP plus Port: support any protocols, including TCP, UDP.
2) Node IP plus Node Port: currently only support UDP.
3) External Load Balancer.
Please refer to kp_plugin_doc.md for details.
Change-Id: I36690e417dd26ad5ec1bd77c7ea4b8100416cac6
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'src/plugins/kubeproxy/kp.api')
-rw-r--r-- | src/plugins/kubeproxy/kp.api | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/plugins/kubeproxy/kp.api b/src/plugins/kubeproxy/kp.api new file mode 100644 index 00000000000..e8063c194b3 --- /dev/null +++ b/src/plugins/kubeproxy/kp.api @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2017 Intel and/or its affiliates. + * 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. + */ + +vl_api_version 1.0.0 + +/** \brief Configure Kube-proxy global parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sticky_buckets_per_core - Number of buckets *per worker thread* in the + established flow table (must be power of 2). + @param flow_timeout - Time in seconds after which, if no packet is received + for a given flow, the flow is removed from the established flow table. +*/ +autoreply define kp_conf +{ + u32 client_index; + u32 context; + u32 sticky_buckets_per_core; + u32 flow_timeout; +}; + +/** \brief Add a virtual address (or prefix) + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param ip_prefix - IP address (IPv4 in lower order 32 bits). + @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4). + @param is_ipv6 - Is IPv6 addresss. + @param port - service port; + @param target_port - Pod's port corresponding to specific service. + @param node_port - Node's port. + @param is_nat4 - DNAT is NAT44 (NAT64 otherwise). + @param new_flows_table_length - Size of the new connections flow table used + for this VIP (must be power of 2). + @param is_del - The VIP should be removed. +*/ +autoreply define kp_add_del_vip { + u32 client_index; + u32 context; + u8 ip_prefix[16]; + u8 prefix_length; + u8 is_ipv6; + u16 port; + u16 target_port; + u16 node_port; + u8 is_nat4; + u32 new_flows_table_length; + u8 is_del; +}; + +/** \brief Add a pod for a given VIP + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param vip_ip_prefix - VIP IP address (IPv4 in lower order 32 bits). + @param vip_ip_prefix - VIP IP prefix length (96 + 'IPv4 prefix length' for IPv4). + @param vip_is_ipv6 - VIP is IPv6 addresss. + @param pod_address - The pod's IP address (IPv4 in lower order 32 bits). + @param pod_is_ipv6 - Pod is IPv6 addresss. + @param is_del - The Pod should be removed. +*/ +autoreply define kp_add_del_pod { + u32 client_index; + u32 context; + u8 vip_ip_prefix[16]; + u8 vip_prefix_length; + u8 vip_is_ipv6; + u8 pod_address[16]; + u8 pod_is_ipv6; + u8 is_del; +}; |