Documentation
¶
Index ¶
Constants ¶
const ( // SSAManager is the default numaplane manager name used by server-side apply syncs SSAManager = "numaplane-controller" // EnvLogLevel log level that is defined by `--loglevel` option EnvLogLevel = "NUMAPLANE_LOG_LEVEL" // NumaflowAPIGroup is the group of the Numaflow API NumaflowAPIGroup = "numaflow.numaproj.io" // NumaflowAPIVersion is the version of the Numaflow API NumaflowAPIVersion = "v1alpha1" // NumaflowPipelineKind is the kind of the Numaflow Pipeline NumaflowPipelineKind = "Pipeline" // NumaflowMonoVertexKind is the kind of the Numaflow MonoVertex NumaflowMonoVertexKind = "MonoVertex" // NumaflowISBServiceKind is the kind of the Numaflow ISB Service NumaflowISBServiceKind = "InterStepBufferService" FinalizerName = KeyNumaplanePrefix + "numaplane-controller" KeyNumaplanePrefix = "numaplane.numaproj.io/" KeyNumaflowPrefix = "numaflow.numaproj.io/" // LabelKeyNumaplaneInstance Resource metadata labels (keys and values) used for tracking LabelKeyNumaplaneInstance = KeyNumaplanePrefix + "tracking-id" // LabelKeyNumaplaneControllerConfig is the label key used to identify additional Numaplane ConfigMaps (ex: Numaflow Controller definitions, USDE, etc.) LabelKeyNumaplaneControllerConfig = KeyNumaplanePrefix + "config" // LabelValueNumaflowControllerDefinitions is the label value used to identify the Numaplane ConfigMap for the Numaflow Controller definitions LabelValueNumaflowControllerDefinitions = "numaflow-controller-definitions" // LabelValueUSDEConfig is the label value used to identify the USDE ConfigMap LabelValueUSDEConfig = "usde-config" // LabelValueNamespaceConfig is the label value used to identify the user's namespace-level ConfigMap LabelValueNamespaceConfig = "namespace-level-config" // LabelKeyISBServiceRONameForPipeline is the label key used to identify the ISBServiceRollout that a Pipeline is associated with LabelKeyISBServiceRONameForPipeline = KeyNumaplanePrefix + "isbsvc-name" // TODO: this is still named "isbsvc-name" instead of "isbsvc-rollout-name" - consider deprecating this and creating a separate label for isbsvc-rollout-name? // LabelKeyISBServiceChildNameForPipeline is the label key used to identify the InterstepBufferService that a Pipeline is associated with LabelKeyISBServiceChildNameForPipeline = KeyNumaplanePrefix + "isbsvc-child-name" // LabelKeyControllerInstanceID identifies the NumaflowController instance to which a Pipeline or MonoVertex is bound. // This is Numaplane's own bookkeeping label; it is never read by the Numaflow controller itself (which reads // AnnotationKeyNumaflowInstanceID instead). It exists because Kubernetes indexes and supports server-side // selection by label, not by annotation. LabelKeyControllerInstanceID = KeyNumaplanePrefix + "controller-instance-id" // LabelKeyParentRollout is the label key used to identify the Rollout that a child Resource is managed by // This is useful as a Label to quickly locate all children of a given Rollout LabelKeyParentRollout = KeyNumaplanePrefix + "parent-rollout-name" // LabelKeyAllowDataLoss is the label key on a Pipeline to indicate that PPND strategy can skip the usual pausing required // this includes both the case of pausing for Pipeline updating as well as for NumaflowController and isbsvc updating LabelKeyAllowDataLoss = KeyNumaplanePrefix + "allow-data-loss" // LabelKeyProgressiveResultState is the health of this child on its own during a progressive upgrade. // It does not reflect the other members of its chain: a chain failure is recorded with // LabelKeyProgressiveChainFailed. The label is absent while this child's own assessment is not final. // Argo CD health reads it, so only the resource that failed shows as Degraded. LabelKeyProgressiveResultState = KeyNumaplanePrefix + "progressive-result-state" // LabelValueResultStateFailed means this child's own progressive assessment failed. LabelValueResultStateFailed ResultState = "failed" // LabelValueResultStateForcePromoted means a user override decided this child's health instead of // its own assessment: the Progressive strategy's forcePromote, or force-promote or // force-promote-chain on a child whose own assessment had not succeeded. LabelValueResultStateForcePromoted ResultState = "force-promoted" // LabelValueResultStateSucceeded means this child's own progressive assessment succeeded. // The child may still wait for the rest of its chain before it is promoted. LabelValueResultStateSucceeded ResultState = "succeeded" // LabelKeyUpgradeState is the label key used to identify the upgrade state of a resource that is managed by // a NumaRollout. LabelKeyUpgradeState = KeyNumaplanePrefix + "upgrade-state" // LabelKeyUpgradeStateReason is an optional label to provide more information on top of the LabelKeyUpgradeState LabelKeyUpgradeStateReason = KeyNumaplanePrefix + "upgrade-state-reason" // LabelValueUpgradePromoted is the label value indicating that the resource managed by a NumaRollout is promoted // after an upgrade. LabelValueUpgradePromoted UpgradeState = "promoted" // LabelValueUpgradeTrial is the label value indicating that the resource managed by a NumaRollout is the trial resource // of an upgrade. LabelValueUpgradeTrial UpgradeState = "trial" // LabelValueUpgradeRecyclable is the label value indicating that the resource managed by a NumaRollout is recyclable // after an upgrade. LabelValueUpgradeRecyclable UpgradeState = "recyclable" // LabelValueUpgradeRecyclableExpired is the label value indicating that the resource managed by a NumaRollout was recyclable // after an upgrade but did not drain fully in the time allowed. LabelValueUpgradeRecyclableExpired UpgradeState = "recyclable-expired" // LabelValueProgressiveSuccess is the value used for the Label `LabelKeyUpgradeStateReason` when `LabelKeyUpgradeState`="recyclable" due to Progressive child succeeding LabelValueProgressiveSuccess UpgradeStateReason = "progressive-success" // LabelValueProgressiveReplaced is the value used for the Label `LabelKeyUpgradeStateReason` when `LabelKeyUpgradeState`="recyclable" due to Progressive child having been replaced LabelValueProgressiveReplaced UpgradeStateReason = "progressive-replaced" // LabelValueProgressiveReplacedFailed is the value used for the Label `LabelKeyUpgradeStateReason` when `LabelKeyUpgradeState`="recyclable" due to Progressive child having been // replaced after having failed LabelValueProgressiveReplacedFailed UpgradeStateReason = "progressive-replaced-failed" // LabelValueDeleteRecreateChild is the value used for the Label `LabelKeyUpgradeStateReason` when `LabelKeyUpgradeState`="recyclable" due to a child being deleted and recreated LabelValueDeleteRecreateChild UpgradeStateReason = "delete-recreate" // LabelValueDiscontinueProgressive is the value used for the Label `LabelKeyUpgradeStateReason` when `LabelKeyUpgradeState`="recyclable" due to discontinuing Progressive upgrade process LabelValueDiscontinueProgressive UpgradeStateReason = "discontinue-progressive" // LabelValuePurgeOld is the value used for the Label `LabelKeyUpgradeStateReason` when `LabelKeyUpgradeState`="recyclable" if there's a strange case in which there are multiple of a given // child and there should only be one // TODO: reevaluate if we really need that LabelValuePurgeOld UpgradeStateReason = "purge" // LabelKeyNumaflowPipelineName is the label key used to identify a pod or a Vertex with a specific pipeline LabelKeyNumaflowPipelineName = KeyNumaflowPrefix + "pipeline-name" // LabelKeyNumaflowPodMonoVertexName is the label key used to identify the pod with a specific monovertex LabelKeyNumaflowPodMonoVertexName = "app.kubernetes.io/name" // LabelKeyNumaflowPipelineVertexName is the label key used to identify a pod with a specific pipeline vertex LabelKeyNumaflowPipelineVertexName = KeyNumaflowPrefix + "vertex-name" // LabelKeyNumaflowMonoVertexName is the label key used to identify the pod with a specific monovertex vertex LabelKeyNumaflowMonoVertexName = KeyNumaflowPrefix + "mono-vertex-name" // LabelKeyProgressiveChainFailed is set on every current trial child when its chain assessment // has failed and the chain has more than one rollout. A resource upgrading on its own does not get it. // Argo CD uses it to show Force Promote Chain instead of Force Promote. On the trial // NumaflowController it also keeps new workloads Pending after a failed member is replaced and // the chain assessment returns to Unknown, until the chain succeeds, is reverted, or is force-promoted. LabelKeyProgressiveChainFailed = KeyNumaplanePrefix + "progressive-chain-failed" // LabelKeyForcePromote is the label key used to force promote the upgrading child during a progressive upgrade. // It is ignored while a chain of more than one rollout has failed. Use LabelKeyForcePromoteChain instead. LabelKeyForcePromote = KeyNumaplanePrefix + "force-promote" // LabelKeyForcePromoteChain promotes every current trial resource in the chain. // Set it on any trial child. It is the override for a chain that is still unhealthy. LabelKeyForcePromoteChain = KeyNumaplanePrefix + "force-promote-chain" // AnnotationKeyChainPromote marks an exact trial child (name/UID) whose stored resource // assessments are all Success, so that child can be promoted without another health check. // Value format is "<child-name>/<uid>". AnnotationKeyChainPromote = KeyNumaplanePrefix + "chain-promote" // AnnotationKeyNumaflowInstanceID is the annotation passed to Numaflow Controller so it knows whether it should reconcile the resource AnnotationKeyNumaflowInstanceID = KeyNumaflowPrefix + "instance" // AnnotationKeyHash is used to maintain a hash of a Rider to know whether it's changed AnnotationKeyHash = KeyNumaplanePrefix + "hash" // AnnotationKeyForceDrainSpecsStarted is used on a Pipeline in the process of recycling it for describing the promoted Pipelines' specs which // have been force applied to it for draining AnnotationKeyForceDrainSpecsStarted = KeyNumaplanePrefix + "force-drain-specs-started" // AnnotationKeyForceDrainSpecsCompleted is used on a Pipeline in the process of recycling it for describing the promoted Pipelines' specs which // have been force applied to it for draining, which have completed the drain attempt AnnotationKeyForceDrainSpecsCompleted = KeyNumaplanePrefix + "force-drain-specs-completed" // AnnotationKeyRequiresDrain is annotated on a pipeline if at least some point in its lifetime it has had Source scaled > 0 and desiredPhase=Running // (if not, it is safe to delete without needing to drain it first) AnnotationKeyRequiresDrain = KeyNumaplanePrefix + "requires-drain" // AnnotationKeyMarkedForDeletion is annotated on a pipeline when it is marked for deletion. // (this only applies for recyclable pipelines) AnnotationKeyMarkedForDeletion = KeyNumaplanePrefix + "marked-for-deletion" // AnnotationKeyRecyclableStartTime is annotated on a pipeline when it is marked as recyclable AnnotationKeyRecyclableStartTime = KeyNumaplanePrefix + "recyclable-start-time" // NumaplaneSystemNamespace is the namespace where the Numaplane Controller is deployed NumaplaneSystemNamespace = "numaplane-system" // TemplatePipelineName can be used as a templated argument in a PipelineRollout's pipeline spec TemplatePipelineName = ".pipeline-name" // TemplateVertexName can be used as a templated argument in a PipelineRollout's pipeline spec TemplateVertexName = ".vertex-name" // TemplatePipelineNamespace can be used as a templated argument in a PipelineRollout's pipeline spec TemplatePipelineNamespace = ".pipeline-namespace" // TemplateMonoVertexName can be used as a templated argument in a MonoVertexRollout's mvtx spec TemplateMonoVertexName = ".monovertex-name" // TemplateMonoVertexNamespace can be used as a templated argument in a MonoVertexRollout's mvtx spec TemplateMonoVertexNamespace = ".monovertex-namespace" )
const ( // DefaultRequeueDelay indicates the default requeue time (in seconds) used by Reconcilers DefaultRequeueDelay = 20 * time.Second // MaxNameCount represents the maximum index value used as a suffix for a given child Numaflow resource // (after reaching this value, we roll over back to 0) MaxNameCount int32 = 999 )
Variables ¶
var ( NumaflowGroupVersion = fmt.Sprintf("%s/%s", NumaflowAPIGroup, NumaflowAPIVersion) PipelineGVR = schema.GroupVersionResource{ Group: NumaflowAPIGroup, Version: NumaflowAPIVersion, Resource: "pipelines", } MonoVertexGVR = schema.GroupVersionResource{ Group: NumaflowAPIGroup, Version: NumaflowAPIVersion, Resource: "monovertices", } ISBServiceGVR = schema.GroupVersionResource{ Group: NumaflowAPIGroup, Version: NumaflowAPIVersion, Resource: "interstepbufferservices", } )
Functions ¶
This section is empty.
Types ¶
type ResultState ¶ added in v0.29.0
type ResultState string
ResultState is the enum to the track the possible result state of a resource upgrade: it can be `failed`, `succeeded`, or `force-promoted`.
type UpgradeState ¶ added in v0.6.0
type UpgradeState string
UpgradeState is the enum to track the possible state of a resource upgrade: it can be `promoted`, `in-progress`, or `recyclable`.
type UpgradeStateReason ¶ added in v0.13.0
type UpgradeStateReason string
UpgradeStateReason is the enum to track reasons for UpgradeState, to provide additional information when useful