Skip to content

Commit

Permalink
add components annotations to types
Browse files Browse the repository at this point in the history
Signed-off-by: Ram Lavi <[email protected]>
  • Loading branch information
RamLavi committed Sep 7, 2020
1 parent 905d010 commit ef0ec24
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions pkg/apis/networkaddonsoperator/shared/networkaddonsconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand All @@ -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{}

Expand All @@ -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"`
Expand Down

0 comments on commit ef0ec24

Please sign in to comment.