Documentation
¶
Overview ¶
Package v1 contains core API types used by most ndd resources. +kubebuilder:object:generate=true
Index ¶
- Constants
- type HealthCondition
- type HealthConditionedStatus
- func (in *HealthConditionedStatus) DeepCopy() *HealthConditionedStatus
- func (in *HealthConditionedStatus) DeepCopyInto(out *HealthConditionedStatus)
- func (s *HealthConditionedStatus) Equal(other *HealthConditionedStatus) bool
- func (s *HealthConditionedStatus) GetHealthCondition(resourceName, hck string) HealthCondition
- func (s *HealthConditionedStatus) SetHealthConditions(c ...HealthCondition)
- type LifecyclePolicy
- type OdaInfo
- func (in *OdaInfo) DeepCopy() *OdaInfo
- func (in *OdaInfo) DeepCopyInto(out *OdaInfo)
- func (x *OdaInfo) GetAvailabilityZone() string
- func (x *OdaInfo) GetDeployment() string
- func (x *OdaInfo) GetOda(k string) Tag
- func (x *OdaInfo) GetOrganization() string
- func (x *OdaInfo) SetAvailabilityZone(s string)
- func (x *OdaInfo) SetDeployment(s string)
- func (x *OdaInfo) SetOrganization(s string)
- func (s *OdaInfo) SetTags(c ...Tag)
- type OdaKind
- type ResourceSpec
- type ResourceStatus
- type Tag
Constants ¶
const ( LabelKeyLifecyclePolicy string = "app.yndd.io/lifecyclepolicy" // planned or active LabelKeyOwner string = "app.yndd.io/owner" // represented as org.depl.az.nddokind.crname LabelKeyOwnerGeneration string = "app.yndd.io/owner-generation" LabelKeyTarget string = "app.yndd.io/target" LabelKeyInterface string = "app.yndd.io/interface" LabelKeySubInterface string = "app.yndd.io/subinterface" LabelKeyNetworkInstance string = "app.yndd.io/network-instance" LabelKeyEndpointGroup string = "app.yndd.io/endpoint-group" LabelKeyOrganization string = "app.yndd.io/organization" LabelKeyDeployment string = "app.yndd.io/deployment" LabelKeyAvailabilityZone string = "app.yndd.io/availability-zone" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCondition ¶
type HealthCondition struct {
// Kind of this condition. At most one of each condition kind may apply to
// a resource at any point in time.
ResourceName string `json:"resourceName"`
HealthKind string `json:"healthKind"`
// Status of this condition; is it currently True, False, or Unknown?
Status corev1.ConditionStatus `json:"status"`
// LastTransitionTime is the last time this condition transitioned from one
// status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// A Reason for this condition's last transition from one status to another.
Reason string `json:"reason,omitempty"`
// A Message containing details about this condition's last transition from
// one status to another, if any.
// +optional
Message string `json:"message,omitempty"`
}
func (*HealthCondition) DeepCopy ¶
func (in *HealthCondition) DeepCopy() *HealthCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCondition.
func (*HealthCondition) DeepCopyInto ¶
func (in *HealthCondition) DeepCopyInto(out *HealthCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (HealthCondition) Equal ¶
func (c HealthCondition) Equal(other HealthCondition) bool
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (HealthCondition) WithMessage ¶
func (c HealthCondition) WithMessage(msg string) HealthCondition
WithMessage returns a condition by adding the provided message to existing condition.
type HealthConditionedStatus ¶
type HealthConditionedStatus struct {
// Status of the health in percentage
Percentage uint32 `json:"percentage,omitempty"`
// LastTransitionTime is the last time this condition transitioned from one
// status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// HealthConditions that determine the health status.
// +optional
HealthConditions []HealthCondition `json:"healthConditions,omitempty"`
}
func NewHealthConditionedStatus ¶
func NewHealthConditionedStatus(p uint32, c ...HealthCondition) *HealthConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*HealthConditionedStatus) DeepCopy ¶
func (in *HealthConditionedStatus) DeepCopy() *HealthConditionedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthConditionedStatus.
func (*HealthConditionedStatus) DeepCopyInto ¶
func (in *HealthConditionedStatus) DeepCopyInto(out *HealthConditionedStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HealthConditionedStatus) Equal ¶
func (s *HealthConditionedStatus) Equal(other *HealthConditionedStatus) bool
Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.
func (*HealthConditionedStatus) GetHealthCondition ¶
func (s *HealthConditionedStatus) GetHealthCondition(resourceName, hck string) HealthCondition
GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil
func (*HealthConditionedStatus) SetHealthConditions ¶
func (s *HealthConditionedStatus) SetHealthConditions(c ...HealthCondition)
SetConditions sets the supplied conditions, replacing any existing conditions of the same kind. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.
type LifecyclePolicy ¶
type LifecyclePolicy string
const ( // LifecyclePlanned means the app will allocate resources but will not // be deployed on the network element LifecyclePlanned LifecyclePolicy = "planned" // LifecycleActive means the app will be deployed on the network elements LifecycleActive LifecyclePolicy = "active" )
type OdaInfo ¶
type OdaInfo struct {
Oda []Tag `json:"oda,omitempty"`
}
func NewOdaInfo ¶
func (*OdaInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OdaInfo.
func (*OdaInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OdaInfo) GetAvailabilityZone ¶
func (*OdaInfo) GetDeployment ¶
func (*OdaInfo) GetOda ¶
GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil
func (*OdaInfo) GetOrganization ¶
func (*OdaInfo) SetAvailabilityZone ¶
func (*OdaInfo) SetDeployment ¶
func (*OdaInfo) SetOrganization ¶
type ResourceSpec ¶
type ResourceSpec struct {
// LifecyclePolicy specifies what will happen to the lifecycle of the resource
// +kubebuilder:validation:Enum=`planned`;`active`
// +kubebuilder:default=planned
LifecyclePolicy LifecyclePolicy `json:"deployment-policy,omitempty"`
}
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceStatus ¶
type ResourceStatus struct {
// the condition status
nddv1.ConditionedStatus `json:",inline"`
// the health condition status
Health HealthConditionedStatus `json:"health,omitempty"`
// the oda info
OdaInfo `json:",inline"`
}
ResourceStatus represents the observed state of a managed resource.
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Tag ¶
func (*Tag) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tag.
func (*Tag) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.