From ef0ec24b4110b5c83ce59c0de8746d384a945fae Mon Sep 17 00:00:00 2001 From: Ram Lavi Date: Sun, 6 Sep 2020 14:11:59 +0300 Subject: [PATCH] add components annotations to types Signed-off-by: Ram Lavi --- .../shared/networkaddonsconfig_types.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkg/apis/networkaddonsoperator/shared/networkaddonsconfig_types.go b/pkg/apis/networkaddonsoperator/shared/networkaddonsconfig_types.go index a2b317ee26..3b36b09596 100644 --- a/pkg/apis/networkaddonsoperator/shared/networkaddonsconfig_types.go +++ b/pkg/apis/networkaddonsoperator/shared/networkaddonsconfig_types.go @@ -21,15 +21,22 @@ type NetworkAddonsConfigSpec struct { } // +k8s:openapi-gen=true +// SelfSignConfiguration defines self sign configuration type SelfSignConfiguration struct { + // CARotateInterval defines duration for CA and certificate CARotateInterval string `json:"caRotateInterval,omitempty"` + // CAOverlapInterval defines the duration of CA Certificates at CABundle if not set it will default to CARotateInterval CAOverlapInterval string `json:"caOverlapInterval,omitempty"` + // CertRotateInterval defines duration for of service certificate CertRotateInterval string `json:"certRotateInterval,omitempty"` } // +k8s:openapi-gen=true +// PlacementConfiguration defines node placement configuration type PlacementConfiguration struct { + // Infra defines placement configuration for master nodes Infra *Placement `json:"infra,omitempty"` + // Workloads defines placement configuration for worker nodes Workloads *Placement `json:"workloads,omitempty"` } @@ -40,24 +47,32 @@ type Placement struct { Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } +// Multus plugin enables attaching multiple network interfaces to Pods in Kubernetes // +k8s:openapi-gen=true type Multus struct{} +// LinuxBridge plugin allows users to create a bridge and add the host and the container to it // +k8s:openapi-gen=true type LinuxBridge struct{} +// Ovs plugin allows users to define Kubernetes networks on top of Open vSwitch bridges available on nodes // +k8s:openapi-gen=true type Ovs struct{} +// NMState is a declarative node network configuration driven through Kubernetes API // +k8s:openapi-gen=true type NMState struct{} +// KubeMacPool plugin manages MAC allocation to Pods and VMs in Kubernetes // +k8s:openapi-gen=true type KubeMacPool struct { + // Defines the first mac in range RangeStart string `json:"rangeStart,omitempty"` + // Defines the last mac in range RangeEnd string `json:"rangeEnd,omitempty"` } +// MacvtapCni plugin allows users to define Kubernetes networks on top of existing host interfaces // +k8s:openapi-gen=true type MacvtapCni struct{} @@ -79,8 +94,7 @@ type Container struct { } // NetworkAddonsConfig is the Schema for the networkaddonsconfigs API -// This struct is no exposed/registered as part of the CRD, but is used -// by the v1alpha1 and v1 as kind of inside-helper struct +// This struct is no exposed/registered as part of the CRD, but is used by the v1alpha1 and v1 as kind of inside-helper struct type NetworkAddonsConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`