Documentation ¶
Overview ¶
Package v1beta1 contains resources relating to the Open Application Model. See https://github.com/oam-dev/spec for more details. +kubebuilder:object:generate=true +groupName=core.oam.dev +versionName=v1beta1
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AppPolicy
- type Application
- func (in *Application) DeepCopy() *Application
- func (in *Application) DeepCopyInto(out *Application)
- func (in *Application) DeepCopyObject() runtime.Object
- func (app *Application) GetComponent(workloadType string) *common.ApplicationComponent
- func (app *Application) GetCondition(t condition.ConditionType) condition.Condition
- func (*Application) Hub()
- func (app *Application) SetConditions(c ...condition.Condition)
- func (app *Application) Unstructured() (*unstructured.Unstructured, error)
- type ApplicationList
- type ApplicationRevision
- type ApplicationRevisionList
- type ApplicationRevisionSpec
- type ApplicationRevisionStatus
- type ApplicationSpec
- type ComponentDefinition
- func (in *ComponentDefinition) DeepCopy() *ComponentDefinition
- func (in *ComponentDefinition) DeepCopyInto(out *ComponentDefinition)
- func (in *ComponentDefinition) DeepCopyObject() runtime.Object
- func (cd *ComponentDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
- func (cd *ComponentDefinition) SetConditions(c ...condition.Condition)
- type ComponentDefinitionList
- type ComponentDefinitionSpec
- type ComponentDefinitionStatus
- type DefinitionRevision
- type DefinitionRevisionList
- type DefinitionRevisionSpec
- type ManagedResource
- func (in ManagedResource) ComponentKey() string
- func (in *ManagedResource) DeepCopy() *ManagedResource
- func (in *ManagedResource) DeepCopyInto(out *ManagedResource)
- func (in ManagedResource) DisplayName() string
- func (in ManagedResource) Equal(r ManagedResource) bool
- func (in ManagedResource) NamespacedName() types.NamespacedName
- func (in ManagedResource) ResourceKey() string
- func (in ManagedResource) ToUnstructured() *unstructured.Unstructured
- func (in ManagedResource) ToUnstructuredWithData() (*unstructured.Unstructured, error)
- func (in ManagedResource) UnmarshalTo(obj interface{}) error
- type PolicyDefinition
- func (in *PolicyDefinition) DeepCopy() *PolicyDefinition
- func (in *PolicyDefinition) DeepCopyInto(out *PolicyDefinition)
- func (in *PolicyDefinition) DeepCopyObject() runtime.Object
- func (d *PolicyDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
- func (d *PolicyDefinition) SetConditions(c ...condition.Condition)
- type PolicyDefinitionList
- type PolicyDefinitionSpec
- type PolicyDefinitionStatus
- type ResourceTracker
- func (in *ResourceTracker) AddManagedResource(rsc client.Object, metaOnly bool, skipGC bool, creator string) (updated bool)
- func (in *ResourceTracker) AddTrackedResource(rsc interfaces.TrackableResource) bool
- func (in *ResourceTracker) ContainsManagedResource(rsc client.Object) bool
- func (in *ResourceTracker) DeepCopy() *ResourceTracker
- func (in *ResourceTracker) DeepCopyInto(out *ResourceTracker)
- func (in *ResourceTracker) DeepCopyObject() runtime.Object
- func (in *ResourceTracker) DeleteManagedResource(rsc client.Object, remove bool) (updated bool)
- type ResourceTrackerCompression
- type ResourceTrackerList
- type ResourceTrackerSpec
- type ResourceTrackerStatus
- type ResourceTrackerType
- type ScopeDefinition
- type ScopeDefinitionList
- type ScopeDefinitionSpec
- type TraitDefinition
- func (in *TraitDefinition) DeepCopy() *TraitDefinition
- func (in *TraitDefinition) DeepCopyInto(out *TraitDefinition)
- func (in *TraitDefinition) DeepCopyObject() runtime.Object
- func (td *TraitDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
- func (td *TraitDefinition) SetConditions(c ...condition.Condition)
- type TraitDefinitionList
- type TraitDefinitionSpec
- type TraitDefinitionStatus
- type Workflow
- type WorkflowStepDefinition
- func (in *WorkflowStepDefinition) DeepCopy() *WorkflowStepDefinition
- func (in *WorkflowStepDefinition) DeepCopyInto(out *WorkflowStepDefinition)
- func (in *WorkflowStepDefinition) DeepCopyObject() runtime.Object
- func (d *WorkflowStepDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
- func (d *WorkflowStepDefinition) SetConditions(c ...condition.Condition)
- type WorkflowStepDefinitionList
- type WorkflowStepDefinitionSpec
- type WorkflowStepDefinitionStatus
- type WorkloadDefinition
- func (in *WorkloadDefinition) DeepCopy() *WorkloadDefinition
- func (in *WorkloadDefinition) DeepCopyInto(out *WorkloadDefinition)
- func (in *WorkloadDefinition) DeepCopyObject() runtime.Object
- func (wd *WorkloadDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
- func (wd *WorkloadDefinition) SetConditions(c ...condition.Condition)
- type WorkloadDefinitionList
- type WorkloadDefinitionSpec
- type WorkloadDefinitionStatus
Constants ¶
const ( ReasonHealthy condition.ConditionReason = "AllComponentsHealthy" ReasonUnhealthy condition.ConditionReason = "UnhealthyOrUnknownComponents" ReasonHealthCheckErr condition.ConditionReason = "HealthCheckeError" )
Reasons an application is or is not healthy
const ( Group = common.Group Version = "v1beta1" )
Package type metadata.
const ( // ResourceTrackerTypeRoot means resources in this resourceTracker will only be recycled when application is deleted ResourceTrackerTypeRoot = ResourceTrackerType("root") // ResourceTrackerTypeVersioned means resources in this resourceTracker will be recycled when this version is unused and this resource is not managed by latest RT ResourceTrackerTypeVersioned = ResourceTrackerType("versioned") // ResourceTrackerTypeComponentRevision stores all component revisions used ResourceTrackerTypeComponentRevision = ResourceTrackerType("component-revision") )
const ( // TypeHealthy application are believed to be determined as healthy by a health scope. TypeHealthy condition.ConditionType = "Healthy" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var ( ComponentDefinitionKind = reflect.TypeOf(ComponentDefinition{}).Name() ComponentDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: ComponentDefinitionKind}.String() ComponentDefinitionKindAPIVersion = ComponentDefinitionKind + "." + SchemeGroupVersion.String() ComponentDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(ComponentDefinitionKind) )
ComponentDefinition type metadata.
var ( WorkloadDefinitionKind = reflect.TypeOf(WorkloadDefinition{}).Name() WorkloadDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: WorkloadDefinitionKind}.String() WorkloadDefinitionKindAPIVersion = WorkloadDefinitionKind + "." + SchemeGroupVersion.String() WorkloadDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(WorkloadDefinitionKind) )
WorkloadDefinition type metadata.
var ( TraitDefinitionKind = reflect.TypeOf(TraitDefinition{}).Name() TraitDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: TraitDefinitionKind}.String() TraitDefinitionKindAPIVersion = TraitDefinitionKind + "." + SchemeGroupVersion.String() TraitDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(TraitDefinitionKind) )
TraitDefinition type metadata.
var ( PolicyDefinitionKind = reflect.TypeOf(PolicyDefinition{}).Name() PolicyDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: PolicyDefinitionKind}.String() PolicyDefinitionKindAPIVersion = PolicyDefinitionKind + "." + SchemeGroupVersion.String() PolicyDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(PolicyDefinitionKind) )
PolicyDefinition type metadata.
var ( WorkflowStepDefinitionKind = reflect.TypeOf(WorkflowStepDefinition{}).Name() WorkflowStepDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: WorkflowStepDefinitionKind}.String() WorkflowStepDefinitionKindAPIVersion = WorkflowStepDefinitionKind + "." + SchemeGroupVersion.String() WorkflowStepDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowStepDefinitionKind) )
WorkflowStepDefinition type metadata.
var ( DefinitionRevisionKind = reflect.TypeOf(DefinitionRevision{}).Name() DefinitionRevisionGroupKind = schema.GroupKind{Group: Group, Kind: DefinitionRevisionKind}.String() DefinitionRevisionKindAPIVersion = DefinitionRevisionKind + "." + SchemeGroupVersion.String() DefinitionRevisionGroupVersionKind = SchemeGroupVersion.WithKind(DefinitionRevisionKind) )
DefinitionRevision type metadata.
var ( ApplicationKind = reflect.TypeOf(Application{}).Name() ApplicationGroupKind = schema.GroupKind{Group: Group, Kind: ApplicationKind}.String() ApplicationKindAPIVersion = ApplicationKind + "." + SchemeGroupVersion.String() ApplicationKindVersionKind = SchemeGroupVersion.WithKind(ApplicationKind) )
Application type metadata.
var ( ApplicationRevisionKind = reflect.TypeOf(ApplicationRevision{}).Name() ApplicationRevisionGroupKind = schema.GroupKind{Group: Group, Kind: ApplicationRevisionKind}.String() ApplicationRevisionKindAPIVersion = ApplicationRevisionKind + "." + SchemeGroupVersion.String() ApplicationRevisionGroupVersionKind = SchemeGroupVersion.WithKind(ApplicationRevisionKind) )
ApplicationRevision type metadata
var ( ScopeDefinitionKind = reflect.TypeOf(ScopeDefinition{}).Name() ScopeDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: ScopeDefinitionKind}.String() ScopeDefinitionKindAPIVersion = ScopeDefinitionKind + "." + SchemeGroupVersion.String() ScopeDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(ScopeDefinitionKind) )
ScopeDefinition type metadata.
var ( ResourceTrackerKind = reflect.TypeOf(ResourceTracker{}).Name() ResourceTrackerGroupKind = schema.GroupKind{Group: Group, Kind: ResourceTrackerKind}.String() ResourceTrackerKindAPIVersion = ResourceTrackerKind + "." + SchemeGroupVersion.String() ResourceTrackerKindVersionKind = SchemeGroupVersion.WithKind(ResourceTrackerKind) )
ResourceTracker type metadata.
Functions ¶
func Resource ¶ added in v1.1.1
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AppPolicy ¶ added in v1.1.0
type AppPolicy struct { // Name is the unique name of the policy. Name string `json:"name"` Type string `json:"type"` // +kubebuilder:pruning:PreserveUnknownFields Properties *runtime.RawExtension `json:"properties,omitempty"` }
AppPolicy defines a global policy for all components in the app.
func (*AppPolicy) DeepCopy ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppPolicy.
func (*AppPolicy) DeepCopyInto ¶ added in v1.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Application ¶
type Application struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ApplicationSpec `json:"spec,omitempty"` Status common.AppStatus `json:"status,omitempty"` }
Application is the Schema for the applications API +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:categories={oam},shortName={app,velaapp} +kubebuilder:printcolumn:name="COMPONENT",type=string,JSONPath=`.spec.components[*].name` +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.spec.components[*].type` +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="HEALTHY",type=boolean,JSONPath=`.status.services[*].healthy` +kubebuilder:printcolumn:name="STATUS",type=string,JSONPath=`.status.services[*].message` +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Application) DeepCopy ¶
func (in *Application) DeepCopy() *Application
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.
func (*Application) DeepCopyInto ¶
func (in *Application) DeepCopyInto(out *Application)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Application) DeepCopyObject ¶
func (in *Application) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Application) GetComponent ¶
func (app *Application) GetComponent(workloadType string) *common.ApplicationComponent
GetComponent get the component from the application based on its workload type
func (*Application) GetCondition ¶ added in v1.1.0
func (app *Application) GetCondition(t condition.ConditionType) condition.Condition
GetCondition get condition by given condition type
func (*Application) SetConditions ¶ added in v1.1.0
func (app *Application) SetConditions(c ...condition.Condition)
SetConditions set condition to application
func (*Application) Unstructured ¶ added in v1.2.2
func (app *Application) Unstructured() (*unstructured.Unstructured, error)
Unstructured convert application to unstructured.Unstructured.
type ApplicationList ¶
type ApplicationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Application `json:"items"` }
ApplicationList contains a list of Application +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ApplicationList) DeepCopy ¶
func (in *ApplicationList) DeepCopy() *ApplicationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationList.
func (*ApplicationList) DeepCopyInto ¶
func (in *ApplicationList) DeepCopyInto(out *ApplicationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationList) DeepCopyObject ¶
func (in *ApplicationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationRevision ¶
type ApplicationRevision struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ApplicationRevisionSpec `json:"spec,omitempty"` Status ApplicationRevisionStatus `json:"status,omitempty"` }
ApplicationRevision is the Schema for the ApplicationRevision API +kubebuilder:storageversion +kubebuilder:resource:categories={oam},shortName=apprev +kubebuilder:subresource:status +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="PUBLISH_VERSION",type=string,JSONPath=`.metadata.annotations['app\.oam\.dev\/publishVersion']` +kubebuilder:printcolumn:name="SUCCEEDED",type=string,JSONPath=`.status.succeeded` +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ApplicationRevision) DeepCopy ¶
func (in *ApplicationRevision) DeepCopy() *ApplicationRevision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevision.
func (*ApplicationRevision) DeepCopyInto ¶
func (in *ApplicationRevision) DeepCopyInto(out *ApplicationRevision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationRevision) DeepCopyObject ¶
func (in *ApplicationRevision) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationRevisionList ¶
type ApplicationRevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ApplicationRevision `json:"items"` }
ApplicationRevisionList contains a list of ApplicationRevision +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ApplicationRevisionList) DeepCopy ¶
func (in *ApplicationRevisionList) DeepCopy() *ApplicationRevisionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevisionList.
func (*ApplicationRevisionList) DeepCopyInto ¶
func (in *ApplicationRevisionList) DeepCopyInto(out *ApplicationRevisionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationRevisionList) DeepCopyObject ¶
func (in *ApplicationRevisionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationRevisionSpec ¶
type ApplicationRevisionSpec struct { // Application records the snapshot of the created/modified Application Application Application `json:"application"` // ComponentDefinitions records the snapshot of the componentDefinitions related with the created/modified Application ComponentDefinitions map[string]ComponentDefinition `json:"componentDefinitions,omitempty"` // WorkloadDefinitions records the snapshot of the workloadDefinitions related with the created/modified Application WorkloadDefinitions map[string]WorkloadDefinition `json:"workloadDefinitions,omitempty"` // TraitDefinitions records the snapshot of the traitDefinitions related with the created/modified Application TraitDefinitions map[string]TraitDefinition `json:"traitDefinitions,omitempty"` // ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application ScopeDefinitions map[string]ScopeDefinition `json:"scopeDefinitions,omitempty"` // PolicyDefinitions records the snapshot of the PolicyDefinitions related with the created/modified Application PolicyDefinitions map[string]PolicyDefinition `json:"policyDefinitions,omitempty"` // WorkflowStepDefinitions records the snapshot of the WorkflowStepDefinitions related with the created/modified Application WorkflowStepDefinitions map[string]WorkflowStepDefinition `json:"workflowStepDefinitions,omitempty"` // ScopeGVK records the apiVersion to GVK mapping ScopeGVK map[string]metav1.GroupVersionKind `json:"scopeGVK,omitempty"` // Policies records the external policies Policies map[string]v1alpha1.Policy `json:"policies,omitempty"` // Workflow records the external workflow Workflow *workflowv1alpha1.Workflow `json:"workflow,omitempty"` // ReferredObjects records the referred objects used in the ref-object typed components // +kubebuilder:pruning:PreserveUnknownFields ReferredObjects []common.ReferredObject `json:"referredObjects,omitempty"` }
ApplicationRevisionSpec is the spec of ApplicationRevision
func (*ApplicationRevisionSpec) DeepCopy ¶
func (in *ApplicationRevisionSpec) DeepCopy() *ApplicationRevisionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevisionSpec.
func (*ApplicationRevisionSpec) DeepCopyInto ¶
func (in *ApplicationRevisionSpec) DeepCopyInto(out *ApplicationRevisionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationRevisionStatus ¶ added in v1.3.0
type ApplicationRevisionStatus struct { // Succeeded records if the workflow finished running with success Succeeded bool `json:"succeeded"` // Workflow the running status of the workflow Workflow *common.WorkflowStatus `json:"workflow,omitempty"` }
ApplicationRevisionStatus is the status of ApplicationRevision
func (*ApplicationRevisionStatus) DeepCopy ¶ added in v1.3.0
func (in *ApplicationRevisionStatus) DeepCopy() *ApplicationRevisionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevisionStatus.
func (*ApplicationRevisionStatus) DeepCopyInto ¶ added in v1.3.0
func (in *ApplicationRevisionStatus) DeepCopyInto(out *ApplicationRevisionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationSpec ¶
type ApplicationSpec struct { Components []common.ApplicationComponent `json:"components"` // Policies defines the global policies for all components in the app, e.g. security, metrics, gitops, // multi-cluster placement rules, etc. // Policies are applied after components are rendered and before workflow steps are executed. Policies []AppPolicy `json:"policies,omitempty"` // Workflow defines how to customize the control logic. // If workflow is specified, Vela won't apply any resource, but provide rendered output in AppRevision. // Workflow steps are executed in array order, and each step: // - will have a context in annotation. // - should mark "finish" phase in status.conditions. Workflow *Workflow `json:"workflow,omitempty"` }
ApplicationSpec is the spec of Application
func (*ApplicationSpec) DeepCopy ¶
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
func (*ApplicationSpec) DeepCopyInto ¶
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDefinition ¶
type ComponentDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ComponentDefinitionSpec `json:"spec,omitempty"` Status ComponentDefinitionStatus `json:"status,omitempty"` }
ComponentDefinition is the Schema for the componentdefinitions API +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=comp +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:printcolumn:name="WORKLOAD-KIND",type=string,JSONPath=".spec.workload.definition.kind" +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ComponentDefinition) DeepCopy ¶
func (in *ComponentDefinition) DeepCopy() *ComponentDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinition.
func (*ComponentDefinition) DeepCopyInto ¶
func (in *ComponentDefinition) DeepCopyInto(out *ComponentDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentDefinition) DeepCopyObject ¶
func (in *ComponentDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComponentDefinition) GetCondition ¶
func (cd *ComponentDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
GetCondition gets condition from ComponentDefinition
func (*ComponentDefinition) SetConditions ¶
func (cd *ComponentDefinition) SetConditions(c ...condition.Condition)
SetConditions set condition for ComponentDefinition
type ComponentDefinitionList ¶
type ComponentDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ComponentDefinition `json:"items"` }
ComponentDefinitionList contains a list of ComponentDefinition
func (*ComponentDefinitionList) DeepCopy ¶
func (in *ComponentDefinitionList) DeepCopy() *ComponentDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionList.
func (*ComponentDefinitionList) DeepCopyInto ¶
func (in *ComponentDefinitionList) DeepCopyInto(out *ComponentDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentDefinitionList) DeepCopyObject ¶
func (in *ComponentDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentDefinitionSpec ¶
type ComponentDefinitionSpec struct { // Workload is a workload type descriptor Workload common.WorkloadTypeDescriptor `json:"workload"` // ChildResourceKinds are the list of GVK of the child resources this workload generates ChildResourceKinds []common.ChildResourceKind `json:"childResourceKinds,omitempty"` // RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload // can be used by trait to create resource selectors(e.g. label selector for pods). // +optional RevisionLabel string `json:"revisionLabel,omitempty"` // PodSpecPath indicates where/if this workload has K8s podSpec field // if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields. // +optional PodSpecPath string `json:"podSpecPath,omitempty"` // Status defines the custom health policy and status message for workload // +optional Status *common.Status `json:"status,omitempty"` // Schematic defines the data format and template of the encapsulation of the workload // +optional Schematic *common.Schematic `json:"schematic,omitempty"` // Extension is used for extension needs by OAM platform builders // +optional // +kubebuilder:pruning:PreserveUnknownFields Extension *runtime.RawExtension `json:"extension,omitempty"` }
ComponentDefinitionSpec defines the desired state of ComponentDefinition
func (*ComponentDefinitionSpec) DeepCopy ¶
func (in *ComponentDefinitionSpec) DeepCopy() *ComponentDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionSpec.
func (*ComponentDefinitionSpec) DeepCopyInto ¶
func (in *ComponentDefinitionSpec) DeepCopyInto(out *ComponentDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDefinitionStatus ¶
type ComponentDefinitionStatus struct { // ConditionedStatus reflects the observed status of a resource condition.ConditionedStatus `json:",inline"` // ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters. ConfigMapRef string `json:"configMapRef,omitempty"` // LatestRevision of the component definition // +optional LatestRevision *common.Revision `json:"latestRevision,omitempty"` }
ComponentDefinitionStatus is the status of ComponentDefinition
func (*ComponentDefinitionStatus) DeepCopy ¶
func (in *ComponentDefinitionStatus) DeepCopy() *ComponentDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionStatus.
func (*ComponentDefinitionStatus) DeepCopyInto ¶
func (in *ComponentDefinitionStatus) DeepCopyInto(out *ComponentDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DefinitionRevision ¶ added in v1.0.4
type DefinitionRevision struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DefinitionRevisionSpec `json:"spec,omitempty"` }
DefinitionRevision is the Schema for the DefinitionRevision API +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=defrev +kubebuilder:printcolumn:name="REVISION",type=integer,JSONPath=".spec.revision" +kubebuilder:printcolumn:name="HASH",type=string,JSONPath=".spec.revisionHash" +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=".spec.definitionType" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*DefinitionRevision) DeepCopy ¶ added in v1.0.4
func (in *DefinitionRevision) DeepCopy() *DefinitionRevision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefinitionRevision.
func (*DefinitionRevision) DeepCopyInto ¶ added in v1.0.4
func (in *DefinitionRevision) DeepCopyInto(out *DefinitionRevision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DefinitionRevision) DeepCopyObject ¶ added in v1.0.4
func (in *DefinitionRevision) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DefinitionRevisionList ¶ added in v1.0.4
type DefinitionRevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DefinitionRevision `json:"items"` }
DefinitionRevisionList contains a list of DefinitionRevision
func (*DefinitionRevisionList) DeepCopy ¶ added in v1.0.4
func (in *DefinitionRevisionList) DeepCopy() *DefinitionRevisionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefinitionRevisionList.
func (*DefinitionRevisionList) DeepCopyInto ¶ added in v1.0.4
func (in *DefinitionRevisionList) DeepCopyInto(out *DefinitionRevisionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DefinitionRevisionList) DeepCopyObject ¶ added in v1.0.4
func (in *DefinitionRevisionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DefinitionRevisionSpec ¶ added in v1.0.4
type DefinitionRevisionSpec struct { // Revision record revision number of DefinitionRevision Revision int64 `json:"revision"` // RevisionHash record the hash value of the spec of DefinitionRevision object. RevisionHash string `json:"revisionHash"` // DefinitionType DefinitionType common.DefinitionType `json:"definitionType"` // ComponentDefinition records the snapshot of the created/modified ComponentDefinition ComponentDefinition ComponentDefinition `json:"componentDefinition,omitempty"` // TraitDefinition records the snapshot of the created/modified TraitDefinition TraitDefinition TraitDefinition `json:"traitDefinition,omitempty"` // PolicyDefinition records the snapshot of the created/modified PolicyDefinition PolicyDefinition PolicyDefinition `json:"policyDefinition,omitempty"` // WorkflowStepDefinition records the snapshot of the created/modified WorkflowStepDefinition WorkflowStepDefinition WorkflowStepDefinition `json:"workflowStepDefinition,omitempty"` }
DefinitionRevisionSpec is the spec of DefinitionRevision
func (*DefinitionRevisionSpec) DeepCopy ¶ added in v1.0.4
func (in *DefinitionRevisionSpec) DeepCopy() *DefinitionRevisionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefinitionRevisionSpec.
func (*DefinitionRevisionSpec) DeepCopyInto ¶ added in v1.0.4
func (in *DefinitionRevisionSpec) DeepCopyInto(out *DefinitionRevisionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagedResource ¶ added in v1.2.0
type ManagedResource struct { common.ClusterObjectReference `json:",inline"` common.OAMObjectReference `json:",inline"` // +kubebuilder:pruning:PreserveUnknownFields Data *runtime.RawExtension `json:"raw,omitempty"` // Deleted marks the resource to be deleted Deleted bool `json:"deleted,omitempty"` // SkipGC marks the resource to skip gc SkipGC bool `json:"skipGC,omitempty"` }
ManagedResource define the resource to be managed by ResourceTracker
func (ManagedResource) ComponentKey ¶ added in v1.2.0
func (in ManagedResource) ComponentKey() string
ComponentKey computes the key for the component which managed resource belongs to
func (*ManagedResource) DeepCopy ¶ added in v1.2.0
func (in *ManagedResource) DeepCopy() *ManagedResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedResource.
func (*ManagedResource) DeepCopyInto ¶ added in v1.2.0
func (in *ManagedResource) DeepCopyInto(out *ManagedResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedResource) DisplayName ¶ added in v1.2.0
func (in ManagedResource) DisplayName() string
DisplayName readable name for locating resource
func (ManagedResource) Equal ¶ added in v1.2.0
func (in ManagedResource) Equal(r ManagedResource) bool
Equal check if two managed resource equals
func (ManagedResource) NamespacedName ¶ added in v1.2.0
func (in ManagedResource) NamespacedName() types.NamespacedName
NamespacedName namespacedName
func (ManagedResource) ResourceKey ¶ added in v1.2.0
func (in ManagedResource) ResourceKey() string
ResourceKey computes the key for managed resource, resources with the same key points to the same resource
func (ManagedResource) ToUnstructured ¶ added in v1.2.0
func (in ManagedResource) ToUnstructured() *unstructured.Unstructured
ToUnstructured converts managed resource into unstructured
func (ManagedResource) ToUnstructuredWithData ¶ added in v1.2.0
func (in ManagedResource) ToUnstructuredWithData() (*unstructured.Unstructured, error)
ToUnstructuredWithData converts managed resource into unstructured and unmarshal data
func (ManagedResource) UnmarshalTo ¶ added in v1.2.0
func (in ManagedResource) UnmarshalTo(obj interface{}) error
UnmarshalTo unmarshal ManagedResource into target object
type PolicyDefinition ¶ added in v1.1.0
type PolicyDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PolicyDefinitionSpec `json:"spec,omitempty"` Status PolicyDefinitionStatus `json:"status,omitempty"` }
PolicyDefinition is the Schema for the policydefinitions API +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=def-policy +kubebuilder:storageversion +kubebuilder:subresource:status +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PolicyDefinition) DeepCopy ¶ added in v1.1.0
func (in *PolicyDefinition) DeepCopy() *PolicyDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyDefinition.
func (*PolicyDefinition) DeepCopyInto ¶ added in v1.1.0
func (in *PolicyDefinition) DeepCopyInto(out *PolicyDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyDefinition) DeepCopyObject ¶ added in v1.1.0
func (in *PolicyDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PolicyDefinition) GetCondition ¶ added in v1.1.0
func (d *PolicyDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
GetCondition gets condition from PolicyDefinition
func (*PolicyDefinition) SetConditions ¶ added in v1.1.0
func (d *PolicyDefinition) SetConditions(c ...condition.Condition)
SetConditions set condition for PolicyDefinition
type PolicyDefinitionList ¶ added in v1.1.0
type PolicyDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PolicyDefinition `json:"items"` }
PolicyDefinitionList contains a list of PolicyDefinition
func (*PolicyDefinitionList) DeepCopy ¶ added in v1.1.0
func (in *PolicyDefinitionList) DeepCopy() *PolicyDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyDefinitionList.
func (*PolicyDefinitionList) DeepCopyInto ¶ added in v1.1.0
func (in *PolicyDefinitionList) DeepCopyInto(out *PolicyDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyDefinitionList) DeepCopyObject ¶ added in v1.1.0
func (in *PolicyDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolicyDefinitionSpec ¶ added in v1.1.0
type PolicyDefinitionSpec struct { // Reference to the CustomResourceDefinition that defines this trait kind. Reference common.DefinitionReference `json:"definitionRef,omitempty"` // Schematic defines the data format and template of the encapsulation of the policy definition. // Only CUE schematic is supported for now. // +optional Schematic *common.Schematic `json:"schematic,omitempty"` // ManageHealthCheck means the policy will handle health checking and skip application controller // built-in health checking. ManageHealthCheck bool `json:"manageHealthCheck,omitempty"` }
PolicyDefinitionSpec defines the desired state of PolicyDefinition
func (*PolicyDefinitionSpec) DeepCopy ¶ added in v1.1.0
func (in *PolicyDefinitionSpec) DeepCopy() *PolicyDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyDefinitionSpec.
func (*PolicyDefinitionSpec) DeepCopyInto ¶ added in v1.1.0
func (in *PolicyDefinitionSpec) DeepCopyInto(out *PolicyDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyDefinitionStatus ¶ added in v1.1.0
type PolicyDefinitionStatus struct { // ConditionedStatus reflects the observed status of a resource condition.ConditionedStatus `json:",inline"` // ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters. ConfigMapRef string `json:"configMapRef,omitempty"` // LatestRevision of the component definition // +optional LatestRevision *common.Revision `json:"latestRevision,omitempty"` }
PolicyDefinitionStatus is the status of PolicyDefinition
func (*PolicyDefinitionStatus) DeepCopy ¶ added in v1.1.0
func (in *PolicyDefinitionStatus) DeepCopy() *PolicyDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyDefinitionStatus.
func (*PolicyDefinitionStatus) DeepCopyInto ¶ added in v1.1.0
func (in *PolicyDefinitionStatus) DeepCopyInto(out *PolicyDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceTracker ¶
type ResourceTracker struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ResourceTrackerSpec `json:"spec,omitempty"` Status ResourceTrackerStatus `json:"status,omitempty"` }
An ResourceTracker represents a tracker for track cross namespace resources +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.spec.type` +kubebuilder:printcolumn:name="APP",type=string,JSONPath=`.metadata.labels['app\.oam\.dev\/name']` +kubebuilder:printcolumn:name="APP-NS",type=string,JSONPath=`.metadata.labels['app\.oam\.dev\/namespace']` +kubebuilder:printcolumn:name="APP-GEN",type=number,JSONPath=`.spec.applicationGeneration` +kubebuilder:resource:scope=Cluster,categories={oam},shortName=rt
func (*ResourceTracker) AddManagedResource ¶ added in v1.2.0
func (in *ResourceTracker) AddManagedResource(rsc client.Object, metaOnly bool, skipGC bool, creator string) (updated bool)
AddManagedResource add object to managed resources, if exists, update
func (*ResourceTracker) AddTrackedResource ¶ added in v1.2.0
func (in *ResourceTracker) AddTrackedResource(rsc interfaces.TrackableResource) bool
AddTrackedResource add new object reference into tracked resources, return if already exists Deprecated
func (*ResourceTracker) ContainsManagedResource ¶ added in v1.4.0
func (in *ResourceTracker) ContainsManagedResource(rsc client.Object) bool
ContainsManagedResource check if resource exists in ResourceTracker
func (*ResourceTracker) DeepCopy ¶
func (in *ResourceTracker) DeepCopy() *ResourceTracker
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTracker.
func (*ResourceTracker) DeepCopyInto ¶
func (in *ResourceTracker) DeepCopyInto(out *ResourceTracker)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceTracker) DeepCopyObject ¶
func (in *ResourceTracker) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ResourceTracker) DeleteManagedResource ¶ added in v1.2.0
func (in *ResourceTracker) DeleteManagedResource(rsc client.Object, remove bool) (updated bool)
DeleteManagedResource if remove flag is on, it will remove the object from recorded resources. otherwise, it will mark the object as deleted instead of removing it workflow stage: resources are marked as deleted (and execute the deletion action) state-keep stage: resources marked as deleted and successfully deleted will be removed from resourcetracker
type ResourceTrackerCompression ¶ added in v1.6.0
type ResourceTrackerCompression struct { Type compression.Type `json:"type,omitempty"` Data string `json:"data,omitempty"` }
ResourceTrackerCompression the compression for ResourceTracker ManagedResources
func (*ResourceTrackerCompression) DeepCopy ¶ added in v1.6.0
func (in *ResourceTrackerCompression) DeepCopy() *ResourceTrackerCompression
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTrackerCompression.
func (*ResourceTrackerCompression) DeepCopyInto ¶ added in v1.6.0
func (in *ResourceTrackerCompression) DeepCopyInto(out *ResourceTrackerCompression)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceTrackerList ¶
type ResourceTrackerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ResourceTracker `json:"items"` }
ResourceTrackerList contains a list of ResourceTracker
func (*ResourceTrackerList) DeepCopy ¶
func (in *ResourceTrackerList) DeepCopy() *ResourceTrackerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTrackerList.
func (*ResourceTrackerList) DeepCopyInto ¶
func (in *ResourceTrackerList) DeepCopyInto(out *ResourceTrackerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceTrackerList) DeepCopyObject ¶
func (in *ResourceTrackerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceTrackerSpec ¶ added in v1.2.0
type ResourceTrackerSpec struct { Type ResourceTrackerType `json:"type,omitempty"` ApplicationGeneration int64 `json:"applicationGeneration"` ManagedResources []ManagedResource `json:"managedResources,omitempty"` Compression ResourceTrackerCompression `json:"compression,omitempty"` }
ResourceTrackerSpec define the spec of resourceTracker
func (*ResourceTrackerSpec) DeepCopy ¶ added in v1.2.0
func (in *ResourceTrackerSpec) DeepCopy() *ResourceTrackerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTrackerSpec.
func (*ResourceTrackerSpec) DeepCopyInto ¶ added in v1.2.0
func (in *ResourceTrackerSpec) DeepCopyInto(out *ResourceTrackerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceTrackerSpec) MarshalJSON ¶ added in v1.6.0
func (in *ResourceTrackerSpec) MarshalJSON() ([]byte, error)
MarshalJSON will encode ResourceTrackerSpec according to the compression type. If type specified, it will encode data to compression data. Note: this is not the standard json Marshal process but re-use the framework function.
func (*ResourceTrackerSpec) UnmarshalJSON ¶ added in v1.6.0
func (in *ResourceTrackerSpec) UnmarshalJSON(src []byte) error
UnmarshalJSON will decode ResourceTrackerSpec according to the compression type. If type specified, it will decode data from compression data. Note: this is not the standard json Unmarshal process but re-use the framework function.
type ResourceTrackerStatus ¶ added in v1.0.2
type ResourceTrackerStatus struct { // Deprecated TrackedResources []common.ClusterObjectReference `json:"trackedResources,omitempty"` }
ResourceTrackerStatus define the status of resourceTracker For backward-compatibility
func (*ResourceTrackerStatus) DeepCopy ¶ added in v1.0.2
func (in *ResourceTrackerStatus) DeepCopy() *ResourceTrackerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTrackerStatus.
func (*ResourceTrackerStatus) DeepCopyInto ¶ added in v1.0.2
func (in *ResourceTrackerStatus) DeepCopyInto(out *ResourceTrackerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceTrackerType ¶ added in v1.2.0
type ResourceTrackerType string
ResourceTrackerType defines the type of resourceTracker
type ScopeDefinition ¶
type ScopeDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ScopeDefinitionSpec `json:"spec,omitempty"` }
A ScopeDefinition registers a kind of Kubernetes custom resource as a valid OAM scope kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the scope when it is embedded in an OAM ApplicationConfiguration. +kubebuilder:printcolumn:JSONPath=".spec.definitionRef.name",name=DEFINITION-NAME,type=string +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=scope +kubebuilder:storageversion +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ScopeDefinition) DeepCopy ¶
func (in *ScopeDefinition) DeepCopy() *ScopeDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeDefinition.
func (*ScopeDefinition) DeepCopyInto ¶
func (in *ScopeDefinition) DeepCopyInto(out *ScopeDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScopeDefinition) DeepCopyObject ¶
func (in *ScopeDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ScopeDefinitionList ¶
type ScopeDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ScopeDefinition `json:"items"` }
ScopeDefinitionList contains a list of ScopeDefinition.
func (*ScopeDefinitionList) DeepCopy ¶
func (in *ScopeDefinitionList) DeepCopy() *ScopeDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeDefinitionList.
func (*ScopeDefinitionList) DeepCopyInto ¶
func (in *ScopeDefinitionList) DeepCopyInto(out *ScopeDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScopeDefinitionList) DeepCopyObject ¶
func (in *ScopeDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ScopeDefinitionSpec ¶
type ScopeDefinitionSpec struct { // Reference to the CustomResourceDefinition that defines this scope kind. Reference common.DefinitionReference `json:"definitionRef"` // WorkloadRefsPath indicates if/where a scope accepts workloadRef objects WorkloadRefsPath string `json:"workloadRefsPath,omitempty"` // AllowComponentOverlap specifies whether an OAM component may exist in // multiple instances of this kind of scope. AllowComponentOverlap bool `json:"allowComponentOverlap"` // Extension is used for extension needs by OAM platform builders // +optional // +kubebuilder:pruning:PreserveUnknownFields Extension *runtime.RawExtension `json:"extension,omitempty"` }
A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
func (*ScopeDefinitionSpec) DeepCopy ¶
func (in *ScopeDefinitionSpec) DeepCopy() *ScopeDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeDefinitionSpec.
func (*ScopeDefinitionSpec) DeepCopyInto ¶
func (in *ScopeDefinitionSpec) DeepCopyInto(out *ScopeDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TraitDefinition ¶
type TraitDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TraitDefinitionSpec `json:"spec,omitempty"` Status TraitDefinitionStatus `json:"status,omitempty"` }
A TraitDefinition registers a kind of Kubernetes custom resource as a valid OAM trait kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the trait when it is embedded in an OAM ApplicationConfiguration. +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=trait +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="APPLIES-TO",type=string,JSONPath=".spec.appliesToWorkloads" +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*TraitDefinition) DeepCopy ¶
func (in *TraitDefinition) DeepCopy() *TraitDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraitDefinition.
func (*TraitDefinition) DeepCopyInto ¶
func (in *TraitDefinition) DeepCopyInto(out *TraitDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TraitDefinition) DeepCopyObject ¶
func (in *TraitDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TraitDefinition) GetCondition ¶
func (td *TraitDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
GetCondition gets condition from TraitDefinition
func (*TraitDefinition) SetConditions ¶
func (td *TraitDefinition) SetConditions(c ...condition.Condition)
SetConditions set condition for TraitDefinition
type TraitDefinitionList ¶
type TraitDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TraitDefinition `json:"items"` }
TraitDefinitionList contains a list of TraitDefinition.
func (*TraitDefinitionList) DeepCopy ¶
func (in *TraitDefinitionList) DeepCopy() *TraitDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraitDefinitionList.
func (*TraitDefinitionList) DeepCopyInto ¶
func (in *TraitDefinitionList) DeepCopyInto(out *TraitDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TraitDefinitionList) DeepCopyObject ¶
func (in *TraitDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TraitDefinitionSpec ¶
type TraitDefinitionSpec struct { // Reference to the CustomResourceDefinition that defines this trait kind. Reference common.DefinitionReference `json:"definitionRef,omitempty"` // Revision indicates whether a trait is aware of component revision // +optional RevisionEnabled bool `json:"revisionEnabled,omitempty"` // WorkloadRefPath indicates where/if a trait accepts a workloadRef object // +optional WorkloadRefPath string `json:"workloadRefPath,omitempty"` // PodDisruptive specifies whether using the trait will cause the pod to restart or not. // +optional PodDisruptive bool `json:"podDisruptive,omitempty"` // AppliesToWorkloads specifies the list of workload kinds this trait // applies to. Workload kinds are specified in resource.group/version format, // e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to // all workload kinds. // +optional AppliesToWorkloads []string `json:"appliesToWorkloads,omitempty"` // ConflictsWith specifies the list of traits(CRD name, Definition name, CRD group) // which could not apply to the same workloads with this trait. // Traits that omit this field can work with any other traits. // Example rules: // "service" # Trait definition name // "services.k8s.io" # API resource/crd name // "*.networking.k8s.io" # API group // "labelSelector:foo=bar" # label selector // labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse // +optional ConflictsWith []string `json:"conflictsWith,omitempty"` // Schematic defines the data format and template of the encapsulation of the trait. // Only CUE and Kube schematic are supported for now. // +optional Schematic *common.Schematic `json:"schematic,omitempty"` // Status defines the custom health policy and status message for trait // +optional Status *common.Status `json:"status,omitempty"` // Extension is used for extension needs by OAM platform builders // +optional // +kubebuilder:pruning:PreserveUnknownFields Extension *runtime.RawExtension `json:"extension,omitempty"` // ManageWorkload defines the trait would be responsible for creating the workload // +optional ManageWorkload bool `json:"manageWorkload,omitempty"` // ControlPlaneOnly defines which cluster is dispatched to // +optional ControlPlaneOnly bool `json:"controlPlaneOnly,omitempty"` }
A TraitDefinitionSpec defines the desired state of a TraitDefinition.
func (*TraitDefinitionSpec) DeepCopy ¶
func (in *TraitDefinitionSpec) DeepCopy() *TraitDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraitDefinitionSpec.
func (*TraitDefinitionSpec) DeepCopyInto ¶
func (in *TraitDefinitionSpec) DeepCopyInto(out *TraitDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TraitDefinitionStatus ¶
type TraitDefinitionStatus struct { // ConditionedStatus reflects the observed status of a resource condition.ConditionedStatus `json:",inline"` // ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters. ConfigMapRef string `json:"configMapRef,omitempty"` // LatestRevision of the component definition // +optional LatestRevision *common.Revision `json:"latestRevision,omitempty"` }
TraitDefinitionStatus is the status of TraitDefinition
func (*TraitDefinitionStatus) DeepCopy ¶
func (in *TraitDefinitionStatus) DeepCopy() *TraitDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraitDefinitionStatus.
func (*TraitDefinitionStatus) DeepCopyInto ¶
func (in *TraitDefinitionStatus) DeepCopyInto(out *TraitDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workflow ¶ added in v1.1.0
type Workflow struct { Ref string `json:"ref,omitempty"` Mode *workflowv1alpha1.WorkflowExecuteMode `json:"mode,omitempty"` Steps []workflowv1alpha1.WorkflowStep `json:"steps,omitempty"` }
Workflow defines workflow steps and other attributes
func (*Workflow) DeepCopy ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
func (*Workflow) DeepCopyInto ¶ added in v1.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStepDefinition ¶ added in v1.1.0
type WorkflowStepDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkflowStepDefinitionSpec `json:"spec,omitempty"` Status WorkflowStepDefinitionStatus `json:"status,omitempty"` }
WorkflowStepDefinition is the Schema for the workflowstepdefinitions API +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workflowstep +kubebuilder:storageversion +kubebuilder:subresource:status +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkflowStepDefinition) DeepCopy ¶ added in v1.1.0
func (in *WorkflowStepDefinition) DeepCopy() *WorkflowStepDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepDefinition.
func (*WorkflowStepDefinition) DeepCopyInto ¶ added in v1.1.0
func (in *WorkflowStepDefinition) DeepCopyInto(out *WorkflowStepDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowStepDefinition) DeepCopyObject ¶ added in v1.1.0
func (in *WorkflowStepDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WorkflowStepDefinition) GetCondition ¶ added in v1.1.0
func (d *WorkflowStepDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
GetCondition gets condition from WorkflowStepDefinition
func (*WorkflowStepDefinition) SetConditions ¶ added in v1.1.0
func (d *WorkflowStepDefinition) SetConditions(c ...condition.Condition)
SetConditions set condition for WorkflowStepDefinition
type WorkflowStepDefinitionList ¶ added in v1.1.0
type WorkflowStepDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []WorkflowStepDefinition `json:"items"` }
WorkflowStepDefinitionList contains a list of WorkflowStepDefinition
func (*WorkflowStepDefinitionList) DeepCopy ¶ added in v1.1.0
func (in *WorkflowStepDefinitionList) DeepCopy() *WorkflowStepDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepDefinitionList.
func (*WorkflowStepDefinitionList) DeepCopyInto ¶ added in v1.1.0
func (in *WorkflowStepDefinitionList) DeepCopyInto(out *WorkflowStepDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowStepDefinitionList) DeepCopyObject ¶ added in v1.1.0
func (in *WorkflowStepDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowStepDefinitionSpec ¶ added in v1.1.0
type WorkflowStepDefinitionSpec struct { // Reference to the CustomResourceDefinition that defines this trait kind. Reference common.DefinitionReference `json:"definitionRef,omitempty"` // Schematic defines the data format and template of the encapsulation of the workflow step definition. // Only CUE schematic is supported for now. // +optional Schematic *common.Schematic `json:"schematic,omitempty"` }
WorkflowStepDefinitionSpec defines the desired state of WorkflowStepDefinition
func (*WorkflowStepDefinitionSpec) DeepCopy ¶ added in v1.1.0
func (in *WorkflowStepDefinitionSpec) DeepCopy() *WorkflowStepDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepDefinitionSpec.
func (*WorkflowStepDefinitionSpec) DeepCopyInto ¶ added in v1.1.0
func (in *WorkflowStepDefinitionSpec) DeepCopyInto(out *WorkflowStepDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStepDefinitionStatus ¶ added in v1.1.0
type WorkflowStepDefinitionStatus struct { // ConditionedStatus reflects the observed status of a resource condition.ConditionedStatus `json:",inline"` // ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters. ConfigMapRef string `json:"configMapRef,omitempty"` // LatestRevision of the component definition // +optional LatestRevision *common.Revision `json:"latestRevision,omitempty"` }
WorkflowStepDefinitionStatus is the status of WorkflowStepDefinition
func (*WorkflowStepDefinitionStatus) DeepCopy ¶ added in v1.1.0
func (in *WorkflowStepDefinitionStatus) DeepCopy() *WorkflowStepDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepDefinitionStatus.
func (*WorkflowStepDefinitionStatus) DeepCopyInto ¶ added in v1.1.0
func (in *WorkflowStepDefinitionStatus) DeepCopyInto(out *WorkflowStepDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadDefinition ¶
type WorkloadDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkloadDefinitionSpec `json:"spec,omitempty"` Status WorkloadDefinitionStatus `json:"status,omitempty"` }
A WorkloadDefinition registers a kind of Kubernetes custom resource as a valid OAM workload kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the workload when it is embedded in an OAM Component. +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workload +kubebuilder:storageversion +kubebuilder:printcolumn:name="DEFINITION-NAME",type=string,JSONPath=".spec.definitionRef.name" +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkloadDefinition) DeepCopy ¶
func (in *WorkloadDefinition) DeepCopy() *WorkloadDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadDefinition.
func (*WorkloadDefinition) DeepCopyInto ¶
func (in *WorkloadDefinition) DeepCopyInto(out *WorkloadDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadDefinition) DeepCopyObject ¶
func (in *WorkloadDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WorkloadDefinition) GetCondition ¶
func (wd *WorkloadDefinition) GetCondition(conditionType condition.ConditionType) condition.Condition
GetCondition gets condition from WorkloadDefinition
func (*WorkloadDefinition) SetConditions ¶
func (wd *WorkloadDefinition) SetConditions(c ...condition.Condition)
SetConditions set condition for WorkloadDefinition
type WorkloadDefinitionList ¶
type WorkloadDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []WorkloadDefinition `json:"items"` }
WorkloadDefinitionList contains a list of WorkloadDefinition. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkloadDefinitionList) DeepCopy ¶
func (in *WorkloadDefinitionList) DeepCopy() *WorkloadDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadDefinitionList.
func (*WorkloadDefinitionList) DeepCopyInto ¶
func (in *WorkloadDefinitionList) DeepCopyInto(out *WorkloadDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadDefinitionList) DeepCopyObject ¶
func (in *WorkloadDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadDefinitionSpec ¶
type WorkloadDefinitionSpec struct { // Reference to the CustomResourceDefinition that defines this workload kind. Reference common.DefinitionReference `json:"definitionRef"` // ChildResourceKinds are the list of GVK of the child resources this workload generates ChildResourceKinds []common.ChildResourceKind `json:"childResourceKinds,omitempty"` // RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload // can be used by trait to create resource selectors(e.g. label selector for pods). // +optional RevisionLabel string `json:"revisionLabel,omitempty"` // PodSpecPath indicates where/if this workload has K8s podSpec field // if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields. // +optional PodSpecPath string `json:"podSpecPath,omitempty"` // Status defines the custom health policy and status message for workload // +optional Status *common.Status `json:"status,omitempty"` // Schematic defines the data format and template of the encapsulation of the workload // +optional Schematic *common.Schematic `json:"schematic,omitempty"` // Extension is used for extension needs by OAM platform builders // +optional // +kubebuilder:pruning:PreserveUnknownFields Extension *runtime.RawExtension `json:"extension,omitempty"` }
A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
func (*WorkloadDefinitionSpec) DeepCopy ¶
func (in *WorkloadDefinitionSpec) DeepCopy() *WorkloadDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadDefinitionSpec.
func (*WorkloadDefinitionSpec) DeepCopyInto ¶
func (in *WorkloadDefinitionSpec) DeepCopyInto(out *WorkloadDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadDefinitionStatus ¶
type WorkloadDefinitionStatus struct {
condition.ConditionedStatus `json:",inline"`
}
WorkloadDefinitionStatus is the status of WorkloadDefinition
func (*WorkloadDefinitionStatus) DeepCopy ¶
func (in *WorkloadDefinitionStatus) DeepCopy() *WorkloadDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadDefinitionStatus.
func (*WorkloadDefinitionStatus) DeepCopyInto ¶
func (in *WorkloadDefinitionStatus) DeepCopyInto(out *WorkloadDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.