Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the meta pkg v1 API group +kubebuilder:object:generate=true +groupName=meta.pkg.ndd.yndd.io
Index ¶
- Constants
- Variables
- func GetServiceName(prefix, name string) string
- type ContainerSpec
- type ControllerConfig
- func (in *ControllerConfig) DeepCopy() *ControllerConfig
- func (in *ControllerConfig) DeepCopyInto(out *ControllerConfig)
- func (in *ControllerConfig) DeepCopyObject() runtime.Object
- func (ctrlMetaCfg *ControllerConfig) GetAllServicesInfo() []*ServiceInfo
- func (ctrlMetaCfg *ControllerConfig) GetPodServiceInfo(podName string, k Kind) *ServiceInfo
- func (ctrlMetaCfg *ControllerConfig) GetServicesInfo() []*ServiceInfo
- func (ctrlMetaCfg *ControllerConfig) GetServicesInfoByKind(kind Kind) []*ServiceInfo
- func (ctrlMetaCfg *ControllerConfig) GetTargetServiceInfo() *ServiceInfo
- type ControllerConfigList
- type ControllerConfigSpec
- type ControllerSpec
- type ControllerType
- type Dependency
- type DeploymentType
- type Extras
- type Intent
- type IntentSpec
- type Kind
- type MetaSpec
- type NddConstraints
- type PackageType
- type Pkg
- type PodSpec
- type Provider
- type ProviderList
- type ProviderSpec
- type ServiceDiscoveryType
- type ServiceInfo
Constants ¶
const ( Group = "meta.pkg.ndd.yndd.io" Version = "v1" )
Package type metadata.
const ( GnmiServerPort = 9999 MetricServerPortHttp = 9997 MetricServerPortHttps = 8443 PrefixGnmiService = "nddo-gnmi-svc" PrefixMetricService = "nddo-metrics-svc" Namespace = "ndd-system" NamespaceLocalK8sDNS = Namespace + "." + "svc.cluster.local:" LabelPkgMeta = "app" LabelHttpPkgMeta = "app-http" )
const (
VendorTypeLabelKey = Group + "/" + "vendorType"
)
Variables ¶
var ( ControllerConfigKind = reflect.TypeOf(ControllerConfig{}).Name() ControllerConfigGroupKind = schema.GroupKind{Group: Group, Kind: ControllerConfigKind}.String() ControllerConfigKindAPIVersion = IntentKind + "." + GroupVersion.String() ControllerConfigGroupVersionKind = GroupVersion.WithKind(ControllerConfigKind) )
ControllerConfig type metadata.
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( IntentKind = reflect.TypeOf(Intent{}).Name() IntentGroupKind = schema.GroupKind{Group: Group, Kind: IntentKind}.String() IntentKindAPIVersion = IntentKind + "." + GroupVersion.String() IntentGroupVersionKind = GroupVersion.WithKind(IntentKind) )
Intent type metadata.
var ( ProviderKind = reflect.TypeOf(Provider{}).Name() ProviderGroupKind = schema.GroupKind{Group: Group, Kind: ProviderKind}.String() ProviderKindAPIVersion = ProviderKind + "." + GroupVersion.String() ProviderGroupVersionKind = GroupVersion.WithKind(ProviderKind) )
Provider type metadata.
Functions ¶
func GetServiceName ¶ added in v0.2.17
Types ¶
type ContainerSpec ¶ added in v0.2.0
type ContainerSpec struct { // Provide the container info Container *corev1.Container `json:"container,omitempty"` // Extras is certificates, volumes, webhook, etc Extras []Extras `json:"extras,omitempty"` }
func (*ContainerSpec) DeepCopy ¶ added in v0.2.0
func (in *ContainerSpec) DeepCopy() *ContainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.
func (*ContainerSpec) DeepCopyInto ¶ added in v0.2.0
func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerConfig ¶ added in v0.2.6
type ControllerConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ControllerConfigSpec `json:"spec"` }
A ControllerConfig is the definition of a Ndd ControllerConfig configuration.
func (*ControllerConfig) DeepCopy ¶ added in v0.2.6
func (in *ControllerConfig) DeepCopy() *ControllerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfig.
func (*ControllerConfig) DeepCopyInto ¶ added in v0.2.6
func (in *ControllerConfig) DeepCopyInto(out *ControllerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControllerConfig) DeepCopyObject ¶ added in v0.2.6
func (in *ControllerConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ControllerConfig) GetAllServicesInfo ¶ added in v0.2.15
func (ctrlMetaCfg *ControllerConfig) GetAllServicesInfo() []*ServiceInfo
func (*ControllerConfig) GetPodServiceInfo ¶ added in v0.2.15
func (ctrlMetaCfg *ControllerConfig) GetPodServiceInfo(podName string, k Kind) *ServiceInfo
func (*ControllerConfig) GetServicesInfo ¶ added in v0.2.15
func (ctrlMetaCfg *ControllerConfig) GetServicesInfo() []*ServiceInfo
func (*ControllerConfig) GetServicesInfoByKind ¶ added in v0.2.16
func (ctrlMetaCfg *ControllerConfig) GetServicesInfoByKind(kind Kind) []*ServiceInfo
func (*ControllerConfig) GetTargetServiceInfo ¶ added in v0.2.15
func (ctrlMetaCfg *ControllerConfig) GetTargetServiceInfo() *ServiceInfo
type ControllerConfigList ¶ added in v0.2.6
type ControllerConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ControllerConfig `json:"items"` }
A ControllerConfigList is the description of a ControllerConfig.
func (*ControllerConfigList) DeepCopy ¶ added in v0.2.6
func (in *ControllerConfigList) DeepCopy() *ControllerConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigList.
func (*ControllerConfigList) DeepCopyInto ¶ added in v0.2.6
func (in *ControllerConfigList) DeepCopyInto(out *ControllerConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControllerConfigList) DeepCopyObject ¶ added in v0.2.6
func (in *ControllerConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ControllerConfigSpec ¶ added in v0.2.6
type ControllerConfigSpec struct { VendorType string `json:"vendor_type,omitempty"` // ServiceDiscovery is the type of service discovery // +kubebuilder:validation:Enum=`consul`;`k8s` // +kubebuilder:default=consul ServiceDiscovery ServiceDiscoveryType `json:"service-discovery,omitempty"` // ServiceDiscoverylNamespace is the name of the service discovery namespace // +kubebuilder:default=consul ServiceDiscoveryNamespace string `json:"service-discovery-namespace,omitempty"` // pods define the pod specification used by the controller for LCM Pods []PodSpec `json:"pods,omitempty"` }
ControllerConfigSpec specifies the configuration of a controller.
func (*ControllerConfigSpec) DeepCopy ¶ added in v0.2.6
func (in *ControllerConfigSpec) DeepCopy() *ControllerConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigSpec.
func (*ControllerConfigSpec) DeepCopyInto ¶ added in v0.2.6
func (in *ControllerConfigSpec) DeepCopyInto(out *ControllerConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerSpec ¶
type ControllerSpec struct { // Image is the packaged Provider controller image. Image string `json:"image"` // PermissionRequests for RBAC rules required for this provider's controller // to function. The RBAC manager is responsible for assessing the requested // permissions. // +optional PermissionRequests []rbacv1.PolicyRule `json:"permissionRequests,omitempty"` }
ControllerSpec specifies the configuration for the packaged Provider controller.
func (*ControllerSpec) DeepCopy ¶
func (in *ControllerSpec) DeepCopy() *ControllerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerSpec.
func (*ControllerSpec) DeepCopyInto ¶
func (in *ControllerSpec) DeepCopyInto(out *ControllerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerType ¶ added in v0.2.2
type ControllerType string
const ( ControllerTypeController ControllerType = "controller" ControllerTypeIntent ControllerType = "intent" ControllerTypeProvider ControllerType = "provider" )
type Dependency ¶
type Dependency struct { // Package is the OCI image name without a tag or digest. Package string `json:"package"` // Type is the type of package. Can be either Configuration or Provider. Type PackageType `json:"type"` // Constraints is a valid semver range, which will be used to select a valid // dependency version. Constraints string `json:"constraints"` }
Dependency is a dependency on another package. One of Provider or Configuration may be supplied.
func (*Dependency) AddNeighbors ¶
func (d *Dependency) AddNeighbors(...dag.Node) error
AddNeighbors is a no-op for dependencies. We should never be adding neighbors to a dependency.
func (*Dependency) DeepCopy ¶
func (in *Dependency) DeepCopy() *Dependency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency.
func (*Dependency) DeepCopyInto ¶
func (in *Dependency) DeepCopyInto(out *Dependency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Dependency) Identifier ¶
func (d *Dependency) Identifier() string
Identifier returns a dependency's source.
func (*Dependency) Neighbors ¶
func (d *Dependency) Neighbors() []dag.Node
Neighbors in is a no-op for dependencies because we are not yet aware of its dependencies.
type DeploymentType ¶ added in v0.2.0
type DeploymentType string
const ( DeploymentTypeStatefulset DeploymentType = "statefulset" DeploymentTypeDeployment DeploymentType = "deployment" )
type Extras ¶ added in v0.2.0
type Extras struct { Name string `json:"name"` Webhook bool `json:"webhook,omitempty"` Certificate bool `json:"certificate,omitempty"` Service bool `json:"service,omitempty"` Volume bool `json:"volume,omitempty"` Port uint32 `json:"port,omitempty"` TargetPort uint32 `json:"target-port,omitempty"` Protocol string `json:"protocol,omitempty"` }
func (*Extras) DeepCopy ¶ added in v0.2.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extras.
func (*Extras) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Intent ¶ added in v0.1.3
type Intent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IntentSpec `json:"spec"` }
A Intent is the description of a Ndd Intent package.
func (*Intent) DeepCopy ¶ added in v0.1.3
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Intent.
func (*Intent) DeepCopyInto ¶ added in v0.1.3
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Intent) DeepCopyObject ¶ added in v0.1.3
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Intent) GetDependencies ¶ added in v0.1.3
func (c *Intent) GetDependencies() []Dependency
GetDependencies gets the Intent package's dependencies.
func (*Intent) GetNddConstraints ¶ added in v0.1.3
func (c *Intent) GetNddConstraints() *NddConstraints
GetNddConstraints gets the Intent package's ndd version constraints.
type IntentSpec ¶ added in v0.1.3
type IntentSpec struct { // Configuration for the packaged Intent's controller. Controller ControllerSpec `json:"controller"` MetaSpec `json:",inline"` }
IntentSpec specifies the configuration of a Intent.
func (*IntentSpec) DeepCopy ¶ added in v0.1.3
func (in *IntentSpec) DeepCopy() *IntentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntentSpec.
func (*IntentSpec) DeepCopyInto ¶ added in v0.1.3
func (in *IntentSpec) DeepCopyInto(out *IntentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetaSpec ¶
type MetaSpec struct { // Semantic version constraints of Ndd that package is compatible with. Ndd *NddConstraints `json:"ndd,omitempty"` // Dependencies on other packages. DependsOn []Dependency `json:"dependsOn,omitempty"` }
MetaSpec are fields that every meta package type must implement.
func (*MetaSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaSpec.
func (*MetaSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NddConstraints ¶
type NddConstraints struct { // Semantic version constraints of ndd that package is compatible with. Version string `json:"version"` }
NddConstraints specifies a packages compatibility with ndd versions.
func (*NddConstraints) DeepCopy ¶
func (in *NddConstraints) DeepCopy() *NddConstraints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NddConstraints.
func (*NddConstraints) DeepCopyInto ¶
func (in *NddConstraints) DeepCopyInto(out *NddConstraints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PackageType ¶
type PackageType string
A PackageType is a type of package.
const ( ProviderPackageType PackageType = "Provider" IntentPackageType PackageType = "Intent" )
Types of packages.
type Pkg ¶
type Pkg interface { GetNddConstraints() *NddConstraints GetDependencies() []Dependency }
Pkg is a description of a Ndd package. +k8s:deepcopy-gen=false
type PodSpec ¶ added in v0.2.0
type PodSpec struct { // Name of the pod Name string `json:"name,omitempty"` // Kind is the kind of pod // +kubebuilder:validation:Enum=`worker`;`reconciler` Kind Kind `json:"kind,omitempty"` // CrdPackage is the package used which holds the crds // +kubebuilder:validation:Enum=`worker`;`reconciler` Package string `json:"package,omitempty"` // Type is the type of the deployment // +kubebuilder:default=statefulset Type DeploymentType `json:"type,omitempty"` // Replicas defines the amount of replicas expected // +kubebuilder:default=1 Replicas int `json:"replicas,omitempty"` // MaxReplicas defines the max expected replications of this pod // +kubebuilder:default=8 MaxReplicas int `json:"max-replicas,omitempty"` // MaxJobNumber indication on how many jobs a given pods should hold MaxJobNumber int `json:"max-job-number,omitempty"` // Watchers defines the identity of the watchers to watch the service registered by the pod Watchers []string `json:"watchers,omitempty"` // PermissionRequests for RBAC rules required for this controller // to function. The RBAC manager is responsible for assessing the requested // permissions. // +optional PermissionRequests []rbacv1.PolicyRule `json:"permission-requests,omitempty"` // Containers identifies the containers in the pod Containers []ContainerSpec `json:"containers,omitempty"` }
func (*PodSpec) DeepCopy ¶ added in v0.2.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Provider ¶
type Provider struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ProviderSpec `json:"spec"` }
A Provider is the description of a Ndd Provider package.
func (*Provider) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Provider.
func (*Provider) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Provider) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Provider) GetDependencies ¶
func (c *Provider) GetDependencies() []Dependency
GetDependencies gets the Provider package's dependencies.
func (*Provider) GetNddConstraints ¶
func (c *Provider) GetNddConstraints() *NddConstraints
GetNddConstraints gets the Provider package's ndd version constraints.
type ProviderList ¶ added in v0.2.0
type ProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Provider `json:"items"` }
A ProviderList is the description of a Ndd Provider package.
func (*ProviderList) DeepCopy ¶ added in v0.2.0
func (in *ProviderList) DeepCopy() *ProviderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderList.
func (*ProviderList) DeepCopyInto ¶ added in v0.2.0
func (in *ProviderList) DeepCopyInto(out *ProviderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProviderList) DeepCopyObject ¶ added in v0.2.0
func (in *ProviderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProviderSpec ¶
type ProviderSpec struct { // Type is the type of provider // +kubebuilder:default=controller Type ControllerType `json:"type,omitempty"` // Configuration for the packaged Provider's controller. Controller ControllerSpec `json:"controller"` MetaSpec `json:",inline"` }
ProviderSpec specifies the configuration of a Provider.
func (*ProviderSpec) DeepCopy ¶
func (in *ProviderSpec) DeepCopy() *ProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec.
func (*ProviderSpec) DeepCopyInto ¶
func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceDiscoveryType ¶ added in v0.2.11
type ServiceDiscoveryType string
const ( ServiceDiscoveryTypeConsul ServiceDiscoveryType = "consul" ServiceDiscoveryTypeK8s ServiceDiscoveryType = "k8s" )
type ServiceInfo ¶ added in v0.2.15
func (*ServiceInfo) DeepCopy ¶ added in v0.2.16
func (in *ServiceInfo) DeepCopy() *ServiceInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInfo.
func (*ServiceInfo) DeepCopyInto ¶ added in v0.2.16
func (in *ServiceInfo) DeepCopyInto(out *ServiceInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.