v1

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 24

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

View Source
const (
	Group   = "meta.pkg.ndd.yndd.io"
	Version = "v1"
)

Package type metadata.

View Source
const (
	GnmiServerPort       = 9999
	PrefixService        = "nddo-svc"
	Namespace            = "ndd-system"
	NamespaceLocalK8sDNS = Namespace + "." + "svc.cluster.local:"
	LabelPkgMeta         = "nddo-intent"
)

Variables

View Source
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
)
View Source
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.

View Source
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.

Functions

This section is empty.

Types

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 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 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

func (in *Intent) DeepCopy() *Intent

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Intent.

func (*Intent) DeepCopyInto added in v0.1.3

func (in *Intent) DeepCopyInto(out *Intent)

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

func (in *Intent) DeepCopyObject() runtime.Object

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.

func (*Intent) Hub added in v0.1.3

func (p *Intent) Hub()

Hub marks this type as the conversion hub.

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

func (in *MetaSpec) DeepCopy() *MetaSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaSpec.

func (*MetaSpec) DeepCopyInto

func (in *MetaSpec) DeepCopyInto(out *MetaSpec)

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 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

func (in *Provider) DeepCopy() *Provider

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Provider.

func (*Provider) DeepCopyInto

func (in *Provider) DeepCopyInto(out *Provider)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Provider) DeepCopyObject

func (in *Provider) DeepCopyObject() runtime.Object

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.

func (*Provider) Hub

func (p *Provider) Hub()

Hub marks this type as the conversion hub.

type ProviderSpec

type ProviderSpec struct {
	// 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL