Documentation ¶
Overview ¶
Package oam contains miscellaneous OAM helper types.
Index ¶
Constants ¶
const ( // LabelAppName records the name of AppConfig LabelAppName = "app.oam.dev/name" // LabelAppRevision records the name of Application, it's equal to name of AppConfig created by Application LabelAppRevision = "app.oam.dev/appRevision" // LabelAppDeployment records the name of AppDeployment. LabelAppDeployment = "app.oam.dev/appDeployment" // LabelAppComponent records the name of Component LabelAppComponent = "app.oam.dev/component" // LabelAppComponentRevision records the revision name of Component LabelAppComponentRevision = "app.oam.dev/revision" // LabelOAMResourceType whether a CR is workload or trait LabelOAMResourceType = "app.oam.dev/resourceType" // LabelAppRevisionHash records the Hash value of the application revision LabelAppRevisionHash = "app.oam.dev/app-revision-hash" // LabelAppNamespace records the namespace of Application LabelAppNamespace = "app.oam.dev/namespace" // WorkloadTypeLabel indicates the type of the workloadDefinition WorkloadTypeLabel = "workload.oam.dev/type" // TraitTypeLabel indicates the type of the traitDefinition TraitTypeLabel = "trait.oam.dev/type" // TraitResource indicates which resource it is when a trait is composed by multiple resources in KubeVela TraitResource = "trait.oam.dev/resource" // LabelComponentDefinitionName records the name of ComponentDefinition LabelComponentDefinitionName = "componentdefinition.oam.dev/name" // LabelTraitDefinitionName records the name of TraitDefinition LabelTraitDefinitionName = "trait.oam.dev/name" // LabelManageWorkloadTrait indicates if the trait will manage the lifecycle of the workload LabelManageWorkloadTrait = "trait.oam.dev/manage-workload" // LabelPolicyDefinitionName records the name of PolicyDefinition LabelPolicyDefinitionName = "policydefinition.oam.dev/name" // LabelWorkflowStepDefinitionName records the name of WorkflowStepDefinition LabelWorkflowStepDefinitionName = "workflowstepdefinition.oam.dev/name" // LabelControllerRevisionComponent indicate which component the revision belong to LabelControllerRevisionComponent = "controller.oam.dev/component" // LabelComponentRevisionHash records the hash value of a component LabelComponentRevisionHash = "app.oam.dev/component-revision-hash" // LabelAddonsName records the name of initializer stored in configMap LabelAddonsName = "addons.oam.dev/type" // LabelAddonName indicates the name of the corresponding Addon LabelAddonName = "addons.oam.dev/name" // LabelProject Namesapce records the project name of namespace LabelProjectNamesapce = "namespace.oam.dev/project" )
Label key strings. AppConfig controller will add these labels into workloads.
const ( // ResourceTypeTrait mark this K8s Custom Resource is an OAM trait ResourceTypeTrait = "TRAIT" // ResourceTypeWorkload mark this K8s Custom Resource is an OAM workload ResourceTypeWorkload = "WORKLOAD" )
const ( // AnnotationAppGeneration records the generation of AppConfig AnnotationAppGeneration = "app.oam.dev/generation" // AnnotationLastAppliedConfig records the previous configuration of a // resource for use in a three way diff during a patching apply AnnotationLastAppliedConfig = "app.oam.dev/last-applied-configuration" // AnnotationAppRollout indicates that the application is still rolling out // the application controller should treat it differently AnnotationAppRollout = "app.oam.dev/rollout-template" // AnnotationInplaceUpgrade indicates the workload should upgrade with the the same name // the name of the workload instance should not changing along with the revision AnnotationInplaceUpgrade = "app.oam.dev/inplace-upgrade" // AnnotationRollingComponent indicates that the component is rolling out // this is to enable any concerned controllers to handle the first component apply logic differently // the value of the annotation is a list of component name of all the new component AnnotationRollingComponent = "app.oam.dev/rolling-components" // AnnotationAppRevision indicates that the object is an application revision // its controller should not try to reconcile it AnnotationAppRevision = "app.oam.dev/app-revision" // AnnotationAppRevisionOnly the Application update should only generate revision, // not any appContexts or components. AnnotationAppRevisionOnly = "app.oam.dev/revision-only" // AnnotationWorkflowContext is used to pass in the workflow context marshalled in json format. AnnotationWorkflowContext = "app.oam.dev/workflow-context" // AnnotationKubeVelaVersion is used to record current KubeVela version AnnotationKubeVelaVersion = "oam.dev/kubevela-version" // AnnotationFilterAnnotationKeys is used to filter annotations passed to workload and trait, split by comma AnnotationFilterAnnotationKeys = "filter.oam.dev/annotation-keys" // AnnotationFilterLabelKeys is used to filter labels passed to workload and trait, split by comma AnnotationFilterLabelKeys = "filter.oam.dev/label-keys" // AnnotationSkipGC is used to tell application to skip gc workload/trait AnnotationSkipGC = "app.oam.dev/skipGC" // AnnotationDefinitionRevisionName is used to specify the name of DefinitionRevision in component/trait definition AnnotationDefinitionRevisionName = "definitionrevision.oam.dev/name" // AnnotationResourceTrackerLifeLong is used to identify life-long resourcetracker which should only be recycled when application is deleted AnnotationResourceTrackerLifeLong = "resourcetracker.oam.dev/life-long" // AnnotationAddonsName records the name of initializer stored in configMap AnnotationAddonsName = "addons.oam.dev/name" // AnnotationLastAppliedConfiguration is kubectl annotations for 3-way merge AnnotationLastAppliedConfiguration = "kubectl.kubernetes.io/last-applied-configuration" // AnnotationDeployVersion know the version number of the deployment. AnnotationDeployVersion = "app.oam.dev/deployVersion" // AnnotationPublishVersion is annotation that record the application workflow version. AnnotationPublishVersion = "app.oam.dev/publishVersion" // AnnotationWorkflowName specifies the workflow name for execution. AnnotationWorkflowName = "app.oam.dev/workflowName" // AnnotationAppName specifies the name for application in db. AnnotationAppName = "app.oam.dev/appName" // AnnotationAppAlias specifies the alias for application in db. AnnotationAppAlias = "app.oam.dev/appAlias" // AnnotationWorkloadGVK indicates the managed workload's GVK by trait AnnotationWorkloadGVK = "trait.oam.dev/workload-gvk" // AnnotationWorkloadName indicates the managed workload's name by trait AnnotationWorkloadName = "trait.oam.dev/workload-name" )
Variables ¶
var (
SystemDefinitonNamespace string = "vela-system"
)
SystemDefinitonNamespace golbal value for controller and webhook systemlevel namespace
Functions ¶
This section is empty.
Types ¶
type Conditioned ¶ added in v0.2.0
type Conditioned interface { SetConditions(c ...condition.Condition) GetCondition(condition.ConditionType) condition.Condition }
A Conditioned may have conditions set or retrieved. Conditions are typically indicate the status of both a resource and its reconciliation process.
type Finalizer ¶ added in v0.2.0
type Finalizer interface { AddFinalizer(ctx context.Context, obj Object) error RemoveFinalizer(ctx context.Context, obj Object) error }
A Finalizer manages the finalizers on the resource.
type Scope ¶ added in v0.2.0
type Scope interface { Object Conditioned WorkloadsReferencer }
A Scope is a type of OAM scope.
type ScopeKind ¶ added in v0.2.0
type ScopeKind schema.GroupVersionKind
ScopeKind contains the type metadata for a kind of an OAM scope resource.
type Trait ¶ added in v0.2.0
type Trait interface { Object Conditioned WorkloadReferencer }
A Trait is a type of OAM trait.
type TraitKind ¶ added in v0.2.0
type TraitKind schema.GroupVersionKind
TraitKind contains the type metadata for a kind of an OAM trait resource.
type Workload ¶ added in v0.2.0
type Workload interface { Object Conditioned }
A Workload is a type of OAM workload.
type WorkloadKind ¶ added in v0.2.0
type WorkloadKind schema.GroupVersionKind
WorkloadKind contains the type metadata for a kind of an OAM workload resource.
type WorkloadReferencer ¶ added in v0.2.0
type WorkloadReferencer interface { GetWorkloadReference() corev1.ObjectReference SetWorkloadReference(corev1.ObjectReference) }
A WorkloadReferencer may reference an OAM workload.
type WorkloadsReferencer ¶ added in v0.2.0
type WorkloadsReferencer interface { GetWorkloadReferences() []corev1.ObjectReference AddWorkloadReference(corev1.ObjectReference) }
A WorkloadsReferencer may reference an OAM workload.
Directories ¶
Path | Synopsis |
---|---|
Package mock provides fake OAM resources for use in tests.
|
Package mock provides fake OAM resources for use in tests. |