v1

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the pkg v1 API group +kubebuilder:object:generate=true +groupName=pkg.ndd.yndd.io

Package v1 contains API Schema definitions for the pkg v1 API group +kubebuilder:object:generate=true +groupName=pkg.ndd.yndd.io

Index

Constants

View Source
const (
	// A PackageInstalled indicates whether a package has been installed.
	ConditionKindPackageInstalled nddv1.ConditionKind = "PackageInstalled"

	// A PackageHealthy indicates whether a package is healthy.
	ConditionKindPackageHealthy nddv1.ConditionKind = "PackageHealthy"
)

Condition Kinds.

View Source
const (
	ConditionReasonUnpacking     nddv1.ConditionReason = "UnpackingPackage"
	ConditionReasonInactive      nddv1.ConditionReason = "InactivePackageRevision"
	ConditionReasonActive        nddv1.ConditionReason = "ActivePackageRevision"
	ConditionReasonUnhealthy     nddv1.ConditionReason = "UnhealthyPackageRevision"
	ConditionReasonHealthy       nddv1.ConditionReason = "HealthyPackageRevision"
	ConditionReasonUnknownHealth nddv1.ConditionReason = "UnknownPackageRevisionHealth"
)

ConditionReasons a package is or is not installed.

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

Package type metadata.

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 (
	ProviderRevisionKind             = reflect.TypeOf(ProviderRevision{}).Name()
	ProviderRevisionGroupKind        = schema.GroupKind{Group: Group, Kind: ProviderRevisionKind}.String()
	ProviderRevisionKindAPIVersion   = ProviderRevisionKind + "." + GroupVersion.String()
	ProviderRevisionGroupVersionKind = GroupVersion.WithKind(ProviderRevisionKind)
)

ProviderRevision type metadata.

View Source
var (
	LockKind             = reflect.TypeOf(Lock{}).Name()
	LockGroupKind        = schema.GroupKind{Group: Group, Kind: LockKind}.String()
	LockKindAPIVersion   = LockKind + "." + GroupVersion.String()
	LockGroupVersionKind = GroupVersion.WithKind(LockKind)
)

Lock type metadata.

Functions

func Active

func Active() nddv1.Condition

Active indicates that the package manager has installed and activated a package revision.

func Healthy

func Healthy() nddv1.Condition

Healthy indicates that the current revision is healthy.

func Inactive

func Inactive() nddv1.Condition

Inactive indicates that the package manager is waiting for a package revision to be transitioned to an active state.

func RefNames

func RefNames(refs []corev1.LocalObjectReference) []string

RefNames converts a slice of LocalObjectReferences to a slice of strings.

func ToNodes

func ToNodes(pkgs ...LockPackage) []dag.Node

ToNodes converts LockPackages to DAG nodes.

func Unhealthy

func Unhealthy() nddv1.Condition

Unhealthy indicates that the current revision is unhealthy.

func UnknownHealth

func UnknownHealth() nddv1.Condition

UnknownHealth indicates that the health of the current revision is unknown.

func Unpacking

func Unpacking() nddv1.Condition

Unpacking indicates that the package manager is waiting for a package revision to be unpacked.

Types

type ControllerConfig

type ControllerConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ControllerConfigSpec `json:"spec,omitempty"`
}

ControllerConfig is the CRD type for a packaged controller configuration. +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster

func (*ControllerConfig) DeepCopy

func (in *ControllerConfig) DeepCopy() *ControllerConfig

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

func (*ControllerConfig) DeepCopyInto

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

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ControllerConfigList

type ControllerConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ControllerConfig `json:"items"`
}

ControllerConfigList contains a list of ControllerConfig.

func (*ControllerConfigList) DeepCopy

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

func (*ControllerConfigList) DeepCopyInto

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

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ControllerConfigSpec

type ControllerConfigSpec struct {
	// Metadata that will be added to the provider Pod.
	// +optional
	Metadata *PodObjectMeta `json:"metadata,omitempty"`

	// Number of desired pods. This is a pointer to distinguish between explicit
	// zero and not specified. Defaults to 1.
	// Note: If more than 1 replica is set and leader election is not enabled then
	// controllers could conflict. Environment variable "LEADER_ELECTION" can be
	// used to enable leader election process.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// Docker image name.
	// More info: https://kubernetes.io/docs/concepts/containers/images
	// This field is optional to allow higher level config management to default or override
	// container images in workload controllers like Deployments and StatefulSets.
	// +optional
	Image *string `json:"image,omitempty"`
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
	// +optional
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`
	// NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
	// the scheduler simply schedules this pod onto that node, assuming that it fits resource
	// requirements.
	// +optional
	NodeName *string `json:"nodeName,omitempty"`
	// PodSecurityContext holds pod-level security attributes and common container settings.
	// Optional: Defaults to empty.  See type description for default values of each field.
	// +optional
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// SecurityContext holds container-level security attributes and common container settings.
	// Optional: Defaults to empty.  See type description for default values of each field.
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
	// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
	// in the case of docker, only DockerConfig type secrets are honored.
	// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
	// Setting ImagePullSecrets will replace any secrets that have been
	// propagated to a controller Deployment, typically via packagePullSecrets.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// Image pull policy.
	// One of Always, Never, IfNotPresent.
	// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// If specified, indicates the pod's priority. "system-node-critical" and
	// "system-cluster-critical" are two special keywords which indicate the
	// highest priorities with the former being the highest priority. Any other
	// name must be defined by creating a PriorityClass object with that name.
	// If not specified, the pod priority will be default or zero if there is no
	// default.
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`
	// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used
	// to run this pod.  If no RuntimeClass resource matches the named class, the pod will not be run.
	// If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an
	// empty definition that uses the default runtime handler.
	// More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
	// This is a beta feature as of Kubernetes v1.14.
	// +optional
	RuntimeClassName *string `json:"runtimeClassName,omitempty"`
	// Compute Resources required by this container.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	// +optional
	ResourceRequirements *corev1.ResourceRequirements `json:"resources,omitempty"`
	// Arguments to the entrypoint.
	// The docker image's CMD is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
	// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
	// regardless of whether the variable exists or not.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	// +optional
	Args []string `json:"args,omitempty"`
	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// List of container ports to expose on the container
	// +optional
	Ports []corev1.ContainerPort `json:"ports,omitempty"`
}

ControllerConfigSpec specifies the configuration for a packaged controller. Values provided will override package manager defaults. Labels and annotations are passed to both the controller Deployment and ServiceAccount.

func (*ControllerConfigSpec) DeepCopy

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

func (*ControllerConfigSpec) DeepCopyInto

func (in *ControllerConfigSpec) DeepCopyInto(out *ControllerConfigSpec)

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

type Lock

type Lock struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Packages []LockPackage `json:"packages,omitempty"`
}

LockSpec is the CRD type that tracks package dependencies. +kubebuilder:subresource:status +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,categories={ndd,pkg},shortName=lock

func (*Lock) DeepCopy

func (in *Lock) DeepCopy() *Lock

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

func (*Lock) DeepCopyInto

func (in *Lock) DeepCopyInto(out *Lock)

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

func (*Lock) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LockList

type LockList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Lock `json:"items"`
}

LockList contains a list of Lock.

func (*LockList) DeepCopy

func (in *LockList) DeepCopy() *LockList

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

func (*LockList) DeepCopyInto

func (in *LockList) DeepCopyInto(out *LockList)

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

func (*LockList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LockPackage

type LockPackage struct {
	// Name corresponds to the name of the package revision for this package.
	Name string `json:"name"`

	// Type is the type of package. Can be Provider, maybe later other types can be created
	Type pkgmetav1.PackageType `json:"type"`

	// Source is the OCI image name without a tag or digest.
	Source string `json:"source"`

	// Version is the tag or digest of the OCI image.
	Version string `json:"version"`

	// Dependencies are the list of dependencies of this package. The order of
	// the dependencies will dictate the order in which they are resolved.
	Dependencies []pkgmetav1.Dependency `json:"dependencies"`
}

LockPackage is a package that is in the lock.

func (*LockPackage) AddNeighbors

func (l *LockPackage) AddNeighbors(nodes ...dag.Node) error

AddNeighbors adds dependencies to a LockPackage. A LockPackage should always have all dependencies declared before being added to the Lock, so we no-op when adding a neighbor.

func (*LockPackage) DeepCopy

func (in *LockPackage) DeepCopy() *LockPackage

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

func (*LockPackage) DeepCopyInto

func (in *LockPackage) DeepCopyInto(out *LockPackage)

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

func (*LockPackage) Identifier

func (l *LockPackage) Identifier() string

Identifier returns the source of a LockPackage.

func (*LockPackage) Neighbors

func (l *LockPackage) Neighbors() []dag.Node

Neighbors returns dependencies of a LockPackage.

type Package

type Package interface {
	resource.Object
	resource.Conditioned

	GetAutoPilot() bool
	SetAutoPilot(b bool)

	GetSource() string
	SetSource(s string)

	GetActivationPolicy() *RevisionActivationPolicy
	SetActivationPolicy(a *RevisionActivationPolicy)

	GetPackagePullSecrets() []corev1.LocalObjectReference
	SetPackagePullSecrets(s []corev1.LocalObjectReference)

	GetPackagePullPolicy() *corev1.PullPolicy
	SetPackagePullPolicy(i *corev1.PullPolicy)

	GetRevisionHistoryLimit() *int64
	SetRevisionHistoryLimit(l *int64)

	GetControllerConfigRef() *nddv1.Reference
	SetControllerConfigRef(r *nddv1.Reference)

	GetCurrentRevision() string
	SetCurrentRevision(r string)

	GetCurrentIdentifier() string
	SetCurrentIdentifier(r string)

	GetSkipDependencyResolution() *bool
	SetSkipDependencyResolution(*bool)
}

+k8s:deepcopy-gen=false

type PackageRevision

type PackageRevision interface {
	resource.Object
	resource.Conditioned

	GetObjects() []nddv1.TypedReference
	SetObjects(c []nddv1.TypedReference)

	GetControllerReference() nddv1.Reference
	SetControllerReference(c nddv1.Reference)

	GetSource() string
	SetSource(s string)

	GetPackagePullSecrets() []corev1.LocalObjectReference
	SetPackagePullSecrets(s []corev1.LocalObjectReference)

	GetPackagePullPolicy() *corev1.PullPolicy
	SetPackagePullPolicy(i *corev1.PullPolicy)

	GetDesiredState() PackageRevisionDesiredState
	SetDesiredState(d PackageRevisionDesiredState)

	GetControllerConfigRef() *nddv1.Reference
	SetControllerConfigRef(r *nddv1.Reference)

	GetRevision() int64
	SetRevision(r int64)

	GetAutoPilot() bool
	SetAutoPilot(b bool)

	GetSkipDependencyResolution() *bool
	SetSkipDependencyResolution(*bool)

	GetDependencyStatus() (found, installed, invalid int64)
	SetDependencyStatus(found, installed, invalid int64)
}

PackageRevision is the interface satisfied by package revision types. +k8s:deepcopy-gen=false

type PackageRevisionDesiredState

type PackageRevisionDesiredState string

PackageRevisionDesiredState is the desired state of the package revision.

const (
	// PackageRevisionActive is an active package revision.
	PackageRevisionActive PackageRevisionDesiredState = "Active"

	// PackageRevisionInactive is an inactive package revision.
	PackageRevisionInactive PackageRevisionDesiredState = "Inactive"
)

type PackageRevisionList

type PackageRevisionList interface {
	client.ObjectList

	// GetRevisions gets the list of PackageRevisions in a PackageRevisionList.
	// This is a costly operation, but allows for treating different revision
	// list types as a single interface. If causing a performance bottleneck in
	// a shared reconciler, consider refactoring the controller to use a
	// reconciler for the specific type.
	GetRevisions() []PackageRevision
}

PackageRevisionList is the interface satisfied by package revision list types. +k8s:deepcopy-gen=false

type PackageRevisionSpec

type PackageRevisionSpec struct {
	// ControllerConfigRef references a ControllerConfig resource that will be
	// used to configure the packaged controller Deployment.
	// +optional
	ControllerConfigReference *nddv1.Reference `json:"controllerConfigRef,omitempty"`

	// DesiredState of the PackageRevision. Can be either Active or Inactive.
	DesiredState PackageRevisionDesiredState `json:"desiredState"`

	// Package image used by install Pod to extract package contents.
	PackageImage string `json:"packageImage"`

	// PackagePullSecrets are named secrets in the same namespace that can be
	// used to fetch packages from private registries. They are also applied to
	// any images pulled for the package, such as a provider's controller image.
	// +optional
	PackagePullSecrets []corev1.LocalObjectReference `json:"packagePullSecrets,omitempty"`

	// PackagePullPolicy defines the pull policy for the package. It is also
	// applied to any images pulled for the package, such as a provider's
	// controller image.
	// Default is IfNotPresent.
	// +optional
	// +kubebuilder:default=IfNotPresent
	PackagePullPolicy *corev1.PullPolicy `json:"packagePullPolicy,omitempty"`

	// Revision number. Indicates when the revision will be garbage collected
	// based on the parent's RevisionHistoryLimit.
	Revision int64 `json:"revision"`

	// AutoPilot specifies how the provider operates
	// When set to true the provider applies delta/diff changes to the device
	// manged resources automatically, if set to false the provider will report
	// the delta and the operator should intervene what to do with the delta/diffs
	// Defaults to true. Can be disabled by explicitly setting to flase.
	// +optional
	// +kubebuilder:default=true
	AutoPilot *bool `json:"autoPilot,omitempty"`

	// SkipDependencyResolution indicates to the package manager whether to skip
	// resolving dependencies for a package. Setting this value to true may have
	// unintended consequences.
	// Default is false.
	// +optional
	// +kubebuilder:default=false
	SkipDependencyResolution *bool `json:"skipDependencyResolution,omitempty"`
}

PackageRevisionSpec defines the desired state of Revision

func (*PackageRevisionSpec) DeepCopy

func (in *PackageRevisionSpec) DeepCopy() *PackageRevisionSpec

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

func (*PackageRevisionSpec) DeepCopyInto

func (in *PackageRevisionSpec) DeepCopyInto(out *PackageRevisionSpec)

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

type PackageRevisionStatus

type PackageRevisionStatus struct {
	nddv1.ConditionedStatus `json:",inline"`
	ControllerRef           nddv1.Reference `json:"controllerRef,omitempty"`

	// References to objects owned by PackageRevision.
	ObjectRefs []nddv1.TypedReference `json:"objectRefs,omitempty"`

	// Dependency information.
	FoundDependencies     int64 `json:"foundDependencies,omitempty"`
	InstalledDependencies int64 `json:"installedDependencies,omitempty"`
	InvalidDependencies   int64 `json:"invalidDependencies,omitempty"`

	// PermissionRequests made by this package. The package declares that its
	// controller needs these permissions to run. The RBAC manager is
	// responsible for granting them.
	PermissionRequests []rbacv1.PolicyRule `json:"permissionRequests,omitempty"`
}

PackageRevisionStatus defines the observed state of a PackageRevision

func (*PackageRevisionStatus) DeepCopy

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

func (*PackageRevisionStatus) DeepCopyInto

func (in *PackageRevisionStatus) DeepCopyInto(out *PackageRevisionStatus)

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

type PackageSpec

type PackageSpec struct {
	// Package is the name of the package that is being requested.
	Package string `json:"package"`

	// AutoPilot specifies how the provider operates
	// When set to true the provider applies delta/diff changes to the device
	// manged resources automatically, if set to false the provider will report
	// the delta and the operator should intervene what to do with the delta/diffs
	// Defaults to true. Can be disabled by explicitly setting to flase.
	// +optional
	// +kubebuilder:default=true
	AutoPilot *bool `json:"autoPilot,omitempty"`

	// RevisionActivationPolicy specifies how the package controller should
	// update from one revision to the next. Options are Automatic or Manual.
	// Default is Automatic.
	// +optional
	// +kubebuilder:default=Automatic
	RevisionActivationPolicy *RevisionActivationPolicy `json:"revisionActivationPolicy,omitempty"`

	// RevisionHistoryLimit dictates how the package controller cleans up old
	// inactive package revisions.
	// Defaults to 1. Can be disabled by explicitly setting to 0.
	// +optional
	// +kubebuilder:default=1
	RevisionHistoryLimit *int64 `json:"revisionHistoryLimit,omitempty"`

	// PackagePullSecrets are named secrets in the same namespace that can be used
	// to fetch packages from private registries.
	// +optional
	PackagePullSecrets []corev1.LocalObjectReference `json:"packagePullSecrets,omitempty"`

	// PackagePullPolicy defines the pull policy for the package.
	// Default is IfNotPresent.
	// +optional
	// +kubebuilder:default=IfNotPresent
	PackagePullPolicy *corev1.PullPolicy `json:"packagePullPolicy,omitempty"`

	// SkipDependencyResolution indicates to the package manager whether to skip
	// resolving dependencies for a package. Setting this value to true may have
	// unintended consequences.
	// Default is false.
	// +optional
	// +kubebuilder:default=false
	SkipDependencyResolution *bool `json:"skipDependencyResolution,omitempty"`
}

PackageSpec defines the desired state of Package

func (*PackageSpec) DeepCopy

func (in *PackageSpec) DeepCopy() *PackageSpec

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

func (*PackageSpec) DeepCopyInto

func (in *PackageSpec) DeepCopyInto(out *PackageSpec)

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

type PackageStatus

type PackageStatus struct {
	// CurrentRevision is the name of the current package revision. It will
	// reflect the most up to date revision, whether it has been activated or
	// not.
	CurrentRevision string `json:"currentRevision,omitempty"`

	// CurrentIdentifier is the most recent package source that was used to
	// produce a revision. The package manager uses this field to determine
	// whether to check for package updates for a given source when
	// packagePullPolicy is set to IfNotPresent. Manually removing this field
	// will cause the package manager to check that the current revision is
	// correct for the given package source.
	CurrentIdentifier string `json:"currentIdentifier,omitempty"`
}

PackageStatus defines the observed state of Package

func (*PackageStatus) DeepCopy

func (in *PackageStatus) DeepCopy() *PackageStatus

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

func (*PackageStatus) DeepCopyInto

func (in *PackageStatus) DeepCopyInto(out *PackageStatus)

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

type PodObjectMeta

type PodObjectMeta struct {
	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

PodObjectMeta is metadata that is added to the Pods in a provider's Deployment.

func (*PodObjectMeta) DeepCopy

func (in *PodObjectMeta) DeepCopy() *PodObjectMeta

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

func (*PodObjectMeta) DeepCopyInto

func (in *PodObjectMeta) DeepCopyInto(out *PodObjectMeta)

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,omitempty"`
	Status ProviderStatus `json:"status,omitempty"`
}

Provider is the CRD type for a request to add a provider to Network Device Driver.. +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="INSTALLED",type="string",JSONPath=".status.conditions[?(@.kind=='PackageInstalled')].status" +kubebuilder:printcolumn:name="HEALTHY",type="string",JSONPath=".status.conditions[?(@.kind=='PackageHealthy')].status" +kubebuilder:printcolumn:name="PACKAGE",type="string",JSONPath=".spec.package" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,categories={ndd,pkg},shortName=pvd

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

func (p *Provider) GetActivationPolicy() *RevisionActivationPolicy

GetActivationPolicy of this Provider.

func (*Provider) GetAutoPilot added in v0.1.10

func (p *Provider) GetAutoPilot() bool

GetAutoPilot of this Provider.

func (*Provider) GetCondition

func (p *Provider) GetCondition(ct nddv1.ConditionKind) nddv1.Condition

GetCondition of this Provider.

func (*Provider) GetControllerConfigRef

func (p *Provider) GetControllerConfigRef() *nddv1.Reference

GetControllerConfigRef of this Provider.

func (*Provider) GetCurrentIdentifier

func (p *Provider) GetCurrentIdentifier() string

GetCurrentIdentifier of this Provider.

func (*Provider) GetCurrentRevision

func (p *Provider) GetCurrentRevision() string

GetCurrentRevision of this Provider.

func (*Provider) GetPackagePullPolicy

func (p *Provider) GetPackagePullPolicy() *corev1.PullPolicy

GetPackagePullPolicy of this Provider.

func (*Provider) GetPackagePullSecrets

func (p *Provider) GetPackagePullSecrets() []corev1.LocalObjectReference

GetPackagePullSecrets of this Provider.

func (*Provider) GetRevisionHistoryLimit

func (p *Provider) GetRevisionHistoryLimit() *int64

GetRevisionHistoryLimit of this Provider.

func (*Provider) GetSkipDependencyResolution

func (p *Provider) GetSkipDependencyResolution() *bool

GetSkipDependencyResolution of this Provider.

func (*Provider) GetSource

func (p *Provider) GetSource() string

GetSource of this Provider.

func (*Provider) SetActivationPolicy

func (p *Provider) SetActivationPolicy(a *RevisionActivationPolicy)

SetActivationPolicy of this Provider.

func (*Provider) SetAutoPilot added in v0.1.10

func (p *Provider) SetAutoPilot(b bool)

SetAutoPilot of this Provider.

func (*Provider) SetConditions

func (p *Provider) SetConditions(c ...nddv1.Condition)

SetConditions of this Provider.

func (*Provider) SetControllerConfigRef

func (p *Provider) SetControllerConfigRef(r *nddv1.Reference)

SetControllerConfigRef of this Provider.

func (*Provider) SetCurrentIdentifier

func (p *Provider) SetCurrentIdentifier(s string)

SetCurrentIdentifier of this Provider.

func (*Provider) SetCurrentRevision

func (p *Provider) SetCurrentRevision(s string)

SetCurrentRevision of this Provider.

func (*Provider) SetPackagePullPolicy

func (p *Provider) SetPackagePullPolicy(i *corev1.PullPolicy)

SetPackagePullPolicy of this Provider.

func (*Provider) SetPackagePullSecrets

func (p *Provider) SetPackagePullSecrets(s []corev1.LocalObjectReference)

SetPackagePullSecrets of this Provider.

func (*Provider) SetRevisionHistoryLimit

func (p *Provider) SetRevisionHistoryLimit(l *int64)

SetRevisionHistoryLimit of this Provider.

func (*Provider) SetSkipDependencyResolution

func (p *Provider) SetSkipDependencyResolution(b *bool)

SetSkipDependencyResolution of this Provider.

func (*Provider) SetSource

func (p *Provider) SetSource(s string)

SetSource of this Provider.

type ProviderList

type ProviderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Provider `json:"items"`
}

func (*ProviderList) DeepCopy

func (in *ProviderList) DeepCopy() *ProviderList

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

func (*ProviderList) DeepCopyInto

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

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ProviderRevision

type ProviderRevision struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PackageRevisionSpec   `json:"spec,omitempty"`
	Status PackageRevisionStatus `json:"status,omitempty"`
}

A ProviderRevision that has been added to Network device Driver. +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="HEALTHY",type="string",JSONPath=".status.conditions[?(@.kind=='PackageHealthy')].status" +kubebuilder:printcolumn:name="REVISION",type="string",JSONPath=".spec.revision" +kubebuilder:printcolumn:name="PKGIMAGE",type="string",JSONPath=".spec.packageImage" +kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".spec.desiredState" +kubebuilder:printcolumn:name="DEP-FOUND",type="string",JSONPath=".status.foundDependencies" +kubebuilder:printcolumn:name="DEP-INSTALLED",type="string",JSONPath=".status.installedDependencies" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,categories={ndd,pkg},shortName=pvr

func (*ProviderRevision) DeepCopy

func (in *ProviderRevision) DeepCopy() *ProviderRevision

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

func (*ProviderRevision) DeepCopyInto

func (in *ProviderRevision) DeepCopyInto(out *ProviderRevision)

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

func (*ProviderRevision) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ProviderRevision) GetAutoPilot added in v0.1.10

func (p *ProviderRevision) GetAutoPilot() bool

GetAutoPilot of this ProviderRevision.

func (*ProviderRevision) GetCondition

func (p *ProviderRevision) GetCondition(ct nddv1.ConditionKind) nddv1.Condition

GetCondition of this ProviderRevision.

func (*ProviderRevision) GetControllerConfigRef

func (p *ProviderRevision) GetControllerConfigRef() *nddv1.Reference

GetControllerConfigRef of this ProviderRevision.

func (*ProviderRevision) GetControllerReference

func (p *ProviderRevision) GetControllerReference() nddv1.Reference

GetControllerReference of this ProviderRevision.

func (*ProviderRevision) GetDependencyStatus

func (p *ProviderRevision) GetDependencyStatus() (found, installed, invalid int64)

GetDependencyStatus of this ProviderRevision.

func (*ProviderRevision) GetDesiredState

func (p *ProviderRevision) GetDesiredState() PackageRevisionDesiredState

GetDesiredState of this ProviderRevision.

func (*ProviderRevision) GetObjects

func (p *ProviderRevision) GetObjects() []nddv1.TypedReference

GetObjects of this ProviderRevision.

func (*ProviderRevision) GetPackagePullPolicy

func (p *ProviderRevision) GetPackagePullPolicy() *corev1.PullPolicy

GetPackagePullPolicy of this ProviderRevision.

func (*ProviderRevision) GetPackagePullSecrets

func (p *ProviderRevision) GetPackagePullSecrets() []corev1.LocalObjectReference

GetPackagePullSecrets of this ProviderRevision.

func (*ProviderRevision) GetRevision

func (p *ProviderRevision) GetRevision() int64

GetRevision of this ProviderRevision.

func (*ProviderRevision) GetSkipDependencyResolution

func (p *ProviderRevision) GetSkipDependencyResolution() *bool

GetSkipDependencyResolution of this ProviderRevision.

func (*ProviderRevision) GetSource

func (p *ProviderRevision) GetSource() string

GetSource of this ProviderRevision.

func (*ProviderRevision) SetAutoPilot added in v0.1.10

func (p *ProviderRevision) SetAutoPilot(b bool)

SetAutoPilot of this ProviderRevision.

func (*ProviderRevision) SetConditions

func (p *ProviderRevision) SetConditions(c ...nddv1.Condition)

SetConditions of this ProviderRevision.

func (*ProviderRevision) SetControllerConfigRef

func (p *ProviderRevision) SetControllerConfigRef(r *nddv1.Reference)

SetControllerConfigRef of this ProviderREvsion.

func (*ProviderRevision) SetControllerReference

func (p *ProviderRevision) SetControllerReference(c nddv1.Reference)

SetControllerReference of this ProviderRevision.

func (*ProviderRevision) SetDependencyStatus

func (p *ProviderRevision) SetDependencyStatus(found, installed, invalid int64)

SetDependencyStatus of this ProviderRevision.

func (*ProviderRevision) SetDesiredState

func (p *ProviderRevision) SetDesiredState(s PackageRevisionDesiredState)

SetDesiredState of this ProviderRevision.

func (*ProviderRevision) SetObjects

func (p *ProviderRevision) SetObjects(c []nddv1.TypedReference)

SetObjects of this ProviderRevision.

func (*ProviderRevision) SetPackagePullPolicy

func (p *ProviderRevision) SetPackagePullPolicy(i *corev1.PullPolicy)

SetPackagePullPolicy of this ProviderRevision.

func (*ProviderRevision) SetPackagePullSecrets

func (p *ProviderRevision) SetPackagePullSecrets(s []corev1.LocalObjectReference)

SetPackagePullSecrets of this ProviderRevision.

func (*ProviderRevision) SetRevision

func (p *ProviderRevision) SetRevision(r int64)

SetRevision of this ProviderRevision.

func (*ProviderRevision) SetSkipDependencyResolution

func (p *ProviderRevision) SetSkipDependencyResolution(b *bool)

SetSkipDependencyResolution of this ProviderRevision.

func (*ProviderRevision) SetSource

func (p *ProviderRevision) SetSource(s string)

SetSource of this ProviderRevision.

type ProviderRevisionList

type ProviderRevisionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ProviderRevision `json:"items"`
}

ProviderRevisionList contains a list of ProviderRevision.

func (*ProviderRevisionList) DeepCopy

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

func (*ProviderRevisionList) DeepCopyInto

func (in *ProviderRevisionList) DeepCopyInto(out *ProviderRevisionList)

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

func (*ProviderRevisionList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ProviderRevisionList) GetRevisions

func (p *ProviderRevisionList) GetRevisions() []PackageRevision

GetRevisions of this ProviderRevisionList.

type ProviderSpec

type ProviderSpec struct {
	PackageSpec `json:",inline"`

	// ControllerConfigRef references a ControllerConfig resource that will be
	// used to configure the packaged controller Deployment.
	// +optional
	ControllerConfigReference *nddv1.Reference `json:"controllerConfigRef,omitempty"`
}

ProviderSpec specifies details about a request to install a provider to the network device driver.

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 ProviderStatus

type ProviderStatus struct {
	nddv1.ConditionedStatus `json:",inline"`
	PackageStatus           `json:",inline"`
}

ProviderStatus defines the observed state of Provider

func (*ProviderStatus) DeepCopy

func (in *ProviderStatus) DeepCopy() *ProviderStatus

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

func (*ProviderStatus) DeepCopyInto

func (in *ProviderStatus) DeepCopyInto(out *ProviderStatus)

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

type RevisionActivationPolicy

type RevisionActivationPolicy string

RevisionActivationPolicy indicates how a package should activate its revisions.

var (
	// AutomaticActivation indicates that package should automatically activate
	// package revisions.
	AutomaticActivation RevisionActivationPolicy = "Automatic"
	// ManualActivation indicates that a user will manually activate package
	// revisions.
	ManualActivation RevisionActivationPolicy = "Manual"
)

Jump to

Keyboard shortcuts

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