aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2019-09-27 12:33:48 -0700
committerRitu Sood <ritu.sood@intel.com>2019-09-29 06:48:00 -0700
commit53279580afc48c90cbd28ab61799d9e81e41fffa (patch)
tree0d39c0b0531a1d1d0e0387b99f5130bb85406cf3 /pkg
parenteae13a54dbdc442a450992f6c4811037ab30daab (diff)
Adding gRPC proto and server
gRPC server is required to send updates to nfn-agent running on all the nodes in the cluster, to setup provider networks as defined in the provider network CR. This patch includes proto file and generated code along with gRPC server code Change-Id: I891629d84932ae662ba7545ebfe4d9921448fdc1 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/apis/k8s/v1alpha1/providernetwork_types.go9
-rw-r--r--pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go29
2 files changed, 30 insertions, 8 deletions
diff --git a/pkg/apis/k8s/v1alpha1/providernetwork_types.go b/pkg/apis/k8s/v1alpha1/providernetwork_types.go
index b292827..3f8444f 100644
--- a/pkg/apis/k8s/v1alpha1/providernetwork_types.go
+++ b/pkg/apis/k8s/v1alpha1/providernetwork_types.go
@@ -23,10 +23,11 @@ type ProviderNetworkSpec struct {
}
type VlanSpec struct {
- VlanId string `json:"vlanId"`
- Node string `json:"node"`
- ProviderInterfaceName string `json:"providerInterfaceName"`
- LogicalInterfaceName string `json:"logicalInterfaceName,omitempty"`
+ VlanId string `json:"vlanId"`
+ VlanNodeSelector string `json:"vlanNodeSelector"` // "all"/"any"(in which case a node will be randomly selected)/"specific"(see below)
+ NodeLabelList []string `json:"nodeLabelList,omitempty"` // if VlanNodeSelector is value "specific" then this array provides a list of nodes labels
+ ProviderInterfaceName string `json:"providerInterfaceName"`
+ LogicalInterfaceName string `json:"logicalInterfaceName,omitempty"`
}
// ProviderNetworkStatus defines the observed state of ProviderNetwork
diff --git a/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
index b524d40..69f190e 100644
--- a/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
@@ -1,6 +1,22 @@
// +build !ignore_autogenerated
-// Code generated by operator-sdk. DO NOT EDIT.
+/*
+Copyright The Kubernetes Authors.
+
+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.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
@@ -87,7 +103,7 @@ func (in *Network) DeepCopyObject() runtime.Object {
func (in *NetworkList) DeepCopyInto(out *NetworkList) {
*out = *in
out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Network, len(*in))
@@ -196,7 +212,7 @@ func (in *ProviderNetwork) DeepCopyObject() runtime.Object {
func (in *ProviderNetworkList) DeepCopyInto(out *ProviderNetworkList) {
*out = *in
out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ProviderNetwork, len(*in))
@@ -244,7 +260,7 @@ func (in *ProviderNetworkSpec) DeepCopyInto(out *ProviderNetworkSpec) {
*out = make([]Route, len(*in))
copy(*out, *in)
}
- out.Vlan = in.Vlan
+ in.Vlan.DeepCopyInto(&out.Vlan)
return
}
@@ -293,6 +309,11 @@ func (in *Route) DeepCopy() *Route {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VlanSpec) DeepCopyInto(out *VlanSpec) {
*out = *in
+ if in.NodeLabelList != nil {
+ in, out := &in.NodeLabelList, &out.NodeLabelList
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
return
}