Documentation
¶
Index ¶
- type BranchTagKind
- type Condition
- func Action(msg string) Condition
- func DSFailed(msg string) Condition
- func DSReady() Condition
- func EPAction(msg string) Condition
- func EPFailed(msg string) Condition
- func EPNotReady(msg string) Condition
- func EPReady() Condition
- func EPUnknown() Condition
- func Failed(msg string) Condition
- func NotReady(msg string) Condition
- func Ready() Condition
- func ReconcileError(err error) Condition
- func ReconcileSuccess() Condition
- func Unknown() Condition
- func Wired() Condition
- func Wiring(msg string) Condition
- func WiringFailed(msg string) Condition
- func WiringUknown() Condition
- type ConditionReason
- type ConditionType
- type ConditionedStatus
- type Schema
- type SchemaList
- type SchemaSpec
- type SchemaSpecSchema
- type SchemaStatus
- type SrcDstPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchTagKind ¶
type BranchTagKind string
const ( BranchTagKindTag BranchTagKind = "tag" BranchTagKindBranch BranchTagKind = "branch" )
type Condition ¶
func EPNotReady ¶
EPNotReady returns a condition that indicates the resource is in an not ready status.
func EPReady ¶
func EPReady() Condition
EPReady returns a condition that indicates the resource is ready for use.
func EPUnknown ¶
func EPUnknown() Condition
Unknown returns a condition that indicates the resource is in an unknown status.
func Ready ¶
func Ready() Condition
Ready returns a condition that indicates the resource is ready for use.
func ReconcileError ¶
ReconcileError returns a condition indicating that the controller encountered an error while reconciling the resource.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition indicating that the controller successfully completed the reconciliation of the resource.
func Unknown ¶
func Unknown() Condition
Unknown returns a condition that indicates the resource is in an unknown status.
func Wired ¶
func Wired() Condition
Wired returns a condition indicating that the wiring was successfull
func WiringFailed ¶
Wired returns a condition indicating that the wiring failed
func WiringUknown ¶
func WiringUknown() Condition
WiringUknown returns a condition indicating that the wiring is unknown
func (Condition) Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (Condition) WithMessage ¶
WithMessage returns a condition by adding the provided message to existing condition.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition.
const ( ConditionReasonReady ConditionReason = "Ready" ConditionReasonFailed ConditionReason = "Failed" ConditionReasonUnknown ConditionReason = "Unknown" ConditionReasonNotReady ConditionReason = "NotReady" ConditionReasonAction ConditionReason = "Action" )
Reasons a resource is ready or not
const ( ConditionReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ConditionReasonReconcileFailure ConditionReason = "ReconcileFailure" )
Reasons a resource is synced or not
const ( ConditionReasonWireSuccess ConditionReason = "Success" ConditionReasonWireFailure ConditionReason = "Failure" ConditionReasonWireUnknown ConditionReason = "Unknown" ConditionReasonWireWiring ConditionReason = "Wiring" )
Reasons a resource is synced or not
type ConditionType ¶
type ConditionType string
A ConditionType represents a condition type for a given KRM resource
const ( // ConditionTypeSynced represents the reconciliation state condition ConditionTypeSynced ConditionType = "Synced" // ConditionTypeReady represents the resource ready condition ConditionTypeReady ConditionType = "Ready" // ConditionTypeWired represents the resource wire condition ConditionTypeWired ConditionType = "Wired" // ConditionTypeEPReady represents the resource epready condition ConditionTypeEPReady ConditionType = "EPReady" // ConditionTypeDSReady represents the resource datastore ready state condition ConditionTypeDSReady ConditionType = "DSReady" )
Condition Types.
type ConditionedStatus ¶
type ConditionedStatus struct { // Conditions of the resource. // +optional Conditions []Condition `json:"conditions,omitempty"` }
A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*ConditionedStatus) Equal ¶
func (r *ConditionedStatus) Equal(other *ConditionedStatus) bool
Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.
func (*ConditionedStatus) GetCondition ¶
func (r *ConditionedStatus) GetCondition(t ConditionType) Condition
GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil
func (*ConditionedStatus) SetConditions ¶
func (r *ConditionedStatus) SetConditions(c ...Condition)
SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.
type Schema ¶
type Schema struct { metav1.TypeMeta `json:",inline" yaml:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` Spec SchemaSpec `json:"spec,omitempty" yaml:"spec,omitempty"` Status SchemaStatus `json:"status,omitempty" yaml:"status,omitempty"` }
+kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".spec.repoURL" +kubebuilder:printcolumn:name="REF",type="string",JSONPath=".spec.ref" +kubebuilder:printcolumn:name="PROVIDER",type="string",JSONPath=".spec.provider" +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".spec.version" +kubebuilder:resource:categories={sdc,inv} Schema is the Schema for the Schema API +k8s:openapi-gen=true
type SchemaList ¶
type SchemaList struct { metav1.TypeMeta `json:",inline" yaml:",inline"` metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` Items []Schema `json:"items" yaml:"items"` }
+kubebuilder:object:root=true SchemaList contains a list of Schemas +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type SchemaSpec ¶
type SchemaSpec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="url is immutable" // URL specifies the base URL for a given repository RepositoryURL string `json:"repoURL" yaml:"repoURL"` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="provider is immutable" // Provider specifies the provider of the schema. Provider string `json:"provider" yaml:"provider"` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="version is immutable" // Version defines the version of the schema Version string `json:"version" yaml:"version"` // +kubebuilder:validation:Enum=branch;tag; // Kind defines the that the BranchOrTag string is a repository branch or a tag Kind BranchTagKind `json:"kind" yaml:"kind"` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ref is immutable" // Ref defines the branch or tag of the repository corresponding to the // provider schema version Ref string `json:"ref" yaml:"ref"` // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="dirs is immutable" // Dirs defines the list of directories that identified the provider schema in src/dst pairs // relative within the repository Dirs []SrcDstPath `json:"dirs" yaml:"dirs"` // Schema provides the details of which files must be used for the models and which files/directories // cana be excludes Schema SchemaSpecSchema `json:"schema" yaml:"schema"` }
SchemaSpec defines the desired state of Schema
func (*SchemaSpec) GetBasePath ¶
func (r *SchemaSpec) GetBasePath(baseDir string) string
func (*SchemaSpec) GetNewSchemaBase ¶
func (r *SchemaSpec) GetNewSchemaBase(basePath string) SchemaSpecSchema
type SchemaSpecSchema ¶
type SchemaSpecSchema struct { // +kubebuilder:validation:MaxItems=64 // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="models is immutable" // Models defines the list of files/directories to be used as a model Models []string `json:"models" yaml:"models"` // +kubebuilder:validation:MaxItems=64 // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="includes is immutable" // Excludes defines the list of files/directories to be excluded Includes []string `json:"includes" yaml:"includes"` // +kubebuilder:validation:MaxItems=64 // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="excludes is immutable" // Excludes defines the list of files/directories to be excluded Excludes []string `json:"excludes" yaml:"excludes"` }
type SchemaStatus ¶
type SchemaStatus struct { // ConditionedStatus provides the status of the Schema using conditions // 2 conditions are used: // - a condition for the reconcilation status // - a condition for the ready status // if both are true the other attributes in the status are meaningful ConditionedStatus `json:",inline" yaml:",inline"` }
SchemaStatus defines the observed state of Schema
type SrcDstPath ¶
type SrcDstPath struct { // Src is the relative directory in the repository URL Src string `json:"src" yaml:"src"` // Dst is the relative directory in the schema server Dst string `json:"dst" yaml:"dst"` }
SrcDstPath provide a src/dst pair for the loader to download the schema from a specific src in the repository to a given destination in the schema server