Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the temporal.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=temporal.io
Index ¶
- Constants
- Variables
- type AllAtOnceRolloutStrategy
- type BaseWorkerDeploymentVersion
- type CurrentWorkerDeploymentVersion
- type DefaultVersionUpdateStrategy
- type DeprecatedWorkerDeploymentVersion
- type GateInputSource
- type GateWorkflowConfig
- type ManualRolloutStrategy
- type RolloutStep
- type RolloutStrategy
- type SecretReference
- type SunsetStrategy
- type TargetWorkerDeploymentVersion
- type TaskQueue
- type TemporalConnection
- type TemporalConnectionList
- type TemporalConnectionReference
- type TemporalConnectionSpec
- type TemporalConnectionStatus
- type TemporalWorkerDeployment
- func (in *TemporalWorkerDeployment) DeepCopy() *TemporalWorkerDeployment
- func (in *TemporalWorkerDeployment) DeepCopyInto(out *TemporalWorkerDeployment)
- func (in *TemporalWorkerDeployment) DeepCopyObject() runtime.Object
- func (r *TemporalWorkerDeployment) Default(ctx context.Context, obj runtime.Object) error
- func (r *TemporalWorkerDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *TemporalWorkerDeployment) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (r *TemporalWorkerDeployment) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (r *TemporalWorkerDeployment) ValidateUpdate(ctx context.Context, oldObj runtime.Object, newObj runtime.Object) (admission.Warnings, error)
- type TemporalWorkerDeploymentList
- type TemporalWorkerDeploymentReference
- type TemporalWorkerDeploymentSpec
- type TemporalWorkerDeploymentStatus
- type VersionStatus
- type WorkerOptions
- type WorkerResourceTemplate
- type WorkerResourceTemplateList
- type WorkerResourceTemplateSpec
- type WorkerResourceTemplateStatus
- type WorkerResourceTemplateValidator
- func (v *WorkerResourceTemplateValidator) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (v *WorkerResourceTemplateValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *WorkerResourceTemplateValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *WorkerResourceTemplateValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type WorkerResourceTemplateVersionStatus
- type WorkflowExecution
- type WorkflowExecutionStatus
Constants ¶
const ( // ConditionReady is True for TemporalWorkerDeployment when the Temporal // connection is reachable and the target version is the current version in Temporal. // It is True for WorkerResourceTemplate when all active Build ID instances of the // WorkerResourceTemplate have been successfully applied. ConditionReady = "Ready" // ConditionProgressing is True while a rollout is actively in-flight — // i.e., the target version has not yet been promoted to current. ConditionProgressing = "Progressing" )
Condition type constants.
const ( // Deprecated: Use ConditionReady and ConditionProgressing instead. ConditionTemporalConnectionHealthy = "TemporalConnectionHealthy" // Deprecated: Use ConditionReady instead. ConditionRolloutComplete = "RolloutComplete" )
Deprecated condition type constants. Maintained for backward compatibility with monitoring and automation built against v1.3.x. Use Ready and Progressing instead. These will be removed in the next major version of the CRD.
const ( // ReasonRolloutComplete is set on ConditionReady=True and ConditionProgressing=False // when the target version has been successfully registered as the current version. ReasonRolloutComplete = "RolloutComplete" // ReasonWaitingForPollers is set on ConditionProgressing=True when the target // version's Kubernetes Deployment has been created but the version is not yet // registered with Temporal (workers have not started polling yet). ReasonWaitingForPollers = "WaitingForPollers" // ReasonWaitingForPromotion is set on ConditionProgressing=True when the target // version is registered with Temporal (Inactive) but has not yet been promoted // to current or ramping. ReasonWaitingForPromotion = "WaitingForPromotion" // ReasonRamping is set on ConditionProgressing=True when the target version is // the ramping version and is receiving a configured percentage of new workflows. ReasonRamping = "Ramping" // ReasonTemporalConnectionNotFound is set on ConditionProgressing=False when the // referenced TemporalConnection resource cannot be found. ReasonTemporalConnectionNotFound = "TemporalConnectionNotFound" // ReasonAuthSecretInvalid is set on ConditionProgressing=False when the credential // secret referenced by the TemporalConnection is misconfigured. This covers: // (1) the secret reference has an empty name, (2) the named Kubernetes Secret // cannot be fetched or has an unexpected type, and (3) the mTLS certificate in // the secret is expired or about to expire. ReasonAuthSecretInvalid = "AuthSecretInvalid" // ReasonTemporalClientCreationFailed is set on ConditionProgressing=False when the // Temporal SDK client cannot connect to the server (dial failure or failed health // check). The credentials were valid; the server itself is unreachable. ReasonTemporalClientCreationFailed = "TemporalClientCreationFailed" // ReasonTemporalStateFetchFailed is set on ConditionProgressing=False when the // controller cannot query the current worker deployment state from Temporal. ReasonTemporalStateFetchFailed = "TemporalStateFetchFailed" // Deprecated: Use ReasonRolloutComplete on ConditionReady instead. ReasonTemporalConnectionHealthy = "TemporalConnectionHealthy" )
Condition reason constants for TemporalWorkerDeployment.
These strings appear in status.conditions[].reason and are part of the CRD's status API. Operators, monitoring rules, and scripts may depend on them. They should be treated as stable within an API version and renamed only with a corresponding version bump.
const ( // ReasonWRTAllVersionsApplied is the condition reason when all instances are successfully applied. ReasonWRTAllVersionsApplied = "AllVersionsApplied" // ReasonWRTApplyFailed is the condition reason when one or more instances failed to apply. ReasonWRTApplyFailed = "ApplyFailed" // ReasonWRTTWDNotFound is the condition reason when the referenced TemporalWorkerDeployment does not exist. ReasonWRTTWDNotFound = "TemporalWorkerDeploymentNotFound" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "temporal.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ControllerOwnedMetricLabelKeys = []string{
"temporal_worker_deployment_name",
"temporal_worker_build_id",
"temporal_namespace",
}
ControllerOwnedMetricLabelKeys are the metric selector label keys that the controller appends automatically to every metrics[*].external.metric.selector.matchLabels at render time. Users must not set these manually — the controller generates the correct per-version values and merges them into whatever matchLabels the user provides.
Functions ¶
This section is empty.
Types ¶
type AllAtOnceRolloutStrategy ¶
type AllAtOnceRolloutStrategy struct{}
func (*AllAtOnceRolloutStrategy) DeepCopy ¶
func (in *AllAtOnceRolloutStrategy) DeepCopy() *AllAtOnceRolloutStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllAtOnceRolloutStrategy.
func (*AllAtOnceRolloutStrategy) DeepCopyInto ¶
func (in *AllAtOnceRolloutStrategy) DeepCopyInto(out *AllAtOnceRolloutStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BaseWorkerDeploymentVersion ¶
type BaseWorkerDeploymentVersion struct {
// BuildID is the unique identifier for this version of the worker deployment.
BuildID string `json:"buildID"`
// Status indicates whether workers in this version may
// be eligible to receive tasks from the Temporal server.
Status VersionStatus `json:"status"`
// Healthy indicates whether the deployment version is healthy.
// +optional
HealthySince *metav1.Time `json:"healthySince,omitempty"`
// A pointer to the version's managed k8s deployment.
// +optional
Deployment *corev1.ObjectReference `json:"deployment,omitempty"`
// TaskQueues is a list of task queues that are associated with this version.
TaskQueues []TaskQueue `json:"taskQueues,omitempty"`
// ManagedBy is the identity of the client that is managing the rollout of this version.
// +optional
ManagedBy string `json:"managedBy,omitempty"`
}
BaseWorkerDeploymentVersion contains fields common to all worker deployment version types
func (*BaseWorkerDeploymentVersion) DeepCopy ¶
func (in *BaseWorkerDeploymentVersion) DeepCopy() *BaseWorkerDeploymentVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseWorkerDeploymentVersion.
func (*BaseWorkerDeploymentVersion) DeepCopyInto ¶
func (in *BaseWorkerDeploymentVersion) DeepCopyInto(out *BaseWorkerDeploymentVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CurrentWorkerDeploymentVersion ¶
type CurrentWorkerDeploymentVersion struct {
BaseWorkerDeploymentVersion `json:",inline"`
}
CurrentWorkerDeploymentVersion represents a worker deployment version that is currently the default version for new workflow executions.
func (*CurrentWorkerDeploymentVersion) DeepCopy ¶
func (in *CurrentWorkerDeploymentVersion) DeepCopy() *CurrentWorkerDeploymentVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CurrentWorkerDeploymentVersion.
func (*CurrentWorkerDeploymentVersion) DeepCopyInto ¶
func (in *CurrentWorkerDeploymentVersion) DeepCopyInto(out *CurrentWorkerDeploymentVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DefaultVersionUpdateStrategy ¶
type DefaultVersionUpdateStrategy string
DefaultVersionUpdateStrategy describes how to cut over new workflow executions to the target worker deployment version. +kubebuilder:validation:Enum=Manual;AllAtOnce;Progressive
const ( // UpdateManual scales worker resources up or down, but does not update the current or ramping worker deployment version. UpdateManual DefaultVersionUpdateStrategy = "Manual" // UpdateAllAtOnce starts 100% of new workflow executions on the new worker deployment version as soon as it's healthy. UpdateAllAtOnce DefaultVersionUpdateStrategy = "AllAtOnce" // UpdateProgressive ramps up the percentage of new workflow executions targeting the new worker deployment version over time. // // Note: If the Current Version of a Worker Deployment is nil and the controller cannot confirm that all Task Queues // in the Target Version have at least one unversioned poller, the controller will immediately set the new worker // deployment version to be Current and ignore the Progressive rollout steps. // Sending a percentage of traffic to a "nil" version means that traffic will be sent to unversioned workers. If // there are no unversioned workers, those tasks will get stuck. This behavior ensures that all traffic on the task // queues in this worker deployment can be handled by an active poller. UpdateProgressive DefaultVersionUpdateStrategy = "Progressive" )
type DeprecatedWorkerDeploymentVersion ¶
type DeprecatedWorkerDeploymentVersion struct {
BaseWorkerDeploymentVersion `json:",inline"`
// DrainedSince is the time at which the version became drained.
// Only set when Status is VersionStatusDrained.
// +optional
DrainedSince *metav1.Time `json:"drainedSince,omitempty"`
// A Version is considered eligible for deletion if it is drained and has no
// controller-managed workers with active replicas polling on its task queues.
// The server automatically deletes eligible versions when it needs to make room for new ones.
// If this version has pollers that are not managed by the controller, the server
// will not be able to delete the version. `EligibleForDeletion=true` does not consider
// that scenario, because it is rare and it is too expensive to cover (requires describing
// every drained version without controller-managed pollers and all task queues in
// that version).
// +optional
EligibleForDeletion bool `json:"eligibleForDeletion,omitempty"`
}
DeprecatedWorkerDeploymentVersion represents a worker deployment version that is no longer the default and is being phased out.
func (*DeprecatedWorkerDeploymentVersion) DeepCopy ¶
func (in *DeprecatedWorkerDeploymentVersion) DeepCopy() *DeprecatedWorkerDeploymentVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeprecatedWorkerDeploymentVersion.
func (*DeprecatedWorkerDeploymentVersion) DeepCopyInto ¶
func (in *DeprecatedWorkerDeploymentVersion) DeepCopyInto(out *DeprecatedWorkerDeploymentVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GateInputSource ¶ added in v1.1.1
type GateInputSource struct {
// Select a key of a ConfigMap in the same namespace
// +optional
ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
// Select a key of a Secret in the same namespace
// +optional
SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
}
GateInputSource references a value from a ConfigMap or a Secret
func (*GateInputSource) DeepCopy ¶ added in v1.3.0
func (in *GateInputSource) DeepCopy() *GateInputSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GateInputSource.
func (*GateInputSource) DeepCopyInto ¶ added in v1.3.0
func (in *GateInputSource) DeepCopyInto(out *GateInputSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GateWorkflowConfig ¶
type GateWorkflowConfig struct {
WorkflowType string `json:"workflowType"`
// Input is an arbitrary JSON object passed as the first parameter to the gate workflow.
// For inputs with secrets use SecretKeyRef in InputFrom to omit from logs.
// +optional
Input *apiextensionsv1.JSON `json:"input,omitempty"`
// InputFrom references a key in a ConfigMap or Secret whose contents are passed
// as the first parameter to the gate workflow. The referenced value should be a JSON document.
// For inputs with secrets use SecretKeyRef to omit from logs.
// +optional
InputFrom *GateInputSource `json:"inputFrom,omitempty"`
}
func (*GateWorkflowConfig) DeepCopy ¶
func (in *GateWorkflowConfig) DeepCopy() *GateWorkflowConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GateWorkflowConfig.
func (*GateWorkflowConfig) DeepCopyInto ¶
func (in *GateWorkflowConfig) DeepCopyInto(out *GateWorkflowConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManualRolloutStrategy ¶
type ManualRolloutStrategy struct{}
func (*ManualRolloutStrategy) DeepCopy ¶
func (in *ManualRolloutStrategy) DeepCopy() *ManualRolloutStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManualRolloutStrategy.
func (*ManualRolloutStrategy) DeepCopyInto ¶
func (in *ManualRolloutStrategy) DeepCopyInto(out *ManualRolloutStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RolloutStep ¶
type RolloutStep struct {
// RampPercentage indicates what percentage of new workflow executions should be
// routed to the new worker deployment version while this step is active.
// For example, 15 means 15%.
//
// Acceptable range is [1,99] (1% to 99%).
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=99
RampPercentage int `json:"rampPercentage"`
// PauseDuration indicates how long to pause before progressing to the next step.
PauseDuration metav1.Duration `json:"pauseDuration"`
}
func (*RolloutStep) DeepCopy ¶
func (in *RolloutStep) DeepCopy() *RolloutStep
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStep.
func (*RolloutStep) DeepCopyInto ¶
func (in *RolloutStep) DeepCopyInto(out *RolloutStep)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RolloutStrategy ¶
type RolloutStrategy struct {
// Specifies how to treat concurrent executions of a Job.
// Valid values are:
// - "Manual"
// - "AllAtOnce"
// - "Progressive"
Strategy DefaultVersionUpdateStrategy `json:"strategy"`
// Gate specifies a workflow type that must run once to completion on the new worker deployment version before
// any traffic is directed to the new version.
Gate *GateWorkflowConfig `json:"gate,omitempty"`
// Steps to execute progressive rollouts. Only required when strategy is "Progressive".
// +optional
Steps []RolloutStep `json:"steps,omitempty" protobuf:"bytes,3,rep,name=steps"`
}
RolloutStrategy defines strategy to apply during next rollout
func (*RolloutStrategy) DeepCopy ¶
func (in *RolloutStrategy) DeepCopy() *RolloutStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStrategy.
func (*RolloutStrategy) DeepCopyInto ¶
func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretReference ¶ added in v1.0.0
type SecretReference struct {
// Name of the Secret resource.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
Name string `json:"name"`
}
SecretReference contains the name of a Secret resource in the same namespace.
func (*SecretReference) DeepCopy ¶ added in v1.0.0
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶ added in v1.0.0
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SunsetStrategy ¶
type SunsetStrategy struct {
// ScaledownDelay specifies how long to wait after a version is drained before scaling its Deployment to zero.
// Defaults to 1 hour.
// +optional
// +kubebuilder:default="1h"
ScaledownDelay *metav1.Duration `json:"scaledownDelay"`
// DeleteDelay specifies how long to wait after a version is drained before deleting its Deployment.
// Defaults to 24 hours.
// +optional
// +kubebuilder:default="24h"
DeleteDelay *metav1.Duration `json:"deleteDelay"`
}
SunsetStrategy defines strategy to apply when sunsetting k8s deployments of drained versions.
func (*SunsetStrategy) DeepCopy ¶
func (in *SunsetStrategy) DeepCopy() *SunsetStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SunsetStrategy.
func (*SunsetStrategy) DeepCopyInto ¶
func (in *SunsetStrategy) DeepCopyInto(out *SunsetStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetWorkerDeploymentVersion ¶
type TargetWorkerDeploymentVersion struct {
BaseWorkerDeploymentVersion `json:",inline"`
// A TestWorkflow is used to validate the deployment version before making it the default.
// +optional
TestWorkflows []WorkflowExecution `json:"testWorkflows,omitempty"`
// RampPercentage is the percentage of new workflow executions that are
// configured to start on this version. For example, 1.5 means 1.5%.
// Only set when Status is VersionStatusRamping.
//
// Acceptable range is [0.0,100.0] (0% to 100%).
// +kubebuilder:validation:Minimum=0.0
// +kubebuilder:validation:Maximum=100.0
RampPercentage *float32 `json:"rampPercentage,omitempty"`
// RampingSince is time when the version first started ramping.
// Only set when Status is VersionStatusRamping.
// +optional
RampingSince *metav1.Time `json:"rampingSince,omitempty"`
// RampLastModifiedAt is the time when the ramp percentage was last changed for the target version.
// +optional
RampLastModifiedAt *metav1.Time `json:"rampLastModifiedAt,omitempty"`
}
TargetWorkerDeploymentVersion represents a worker deployment version that is the desired next version. It may be in various states during its lifecycle.
func (*TargetWorkerDeploymentVersion) DeepCopy ¶
func (in *TargetWorkerDeploymentVersion) DeepCopy() *TargetWorkerDeploymentVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetWorkerDeploymentVersion.
func (*TargetWorkerDeploymentVersion) DeepCopyInto ¶
func (in *TargetWorkerDeploymentVersion) DeepCopyInto(out *TargetWorkerDeploymentVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskQueue ¶
type TaskQueue struct {
// Name is the name of the task queue.
Name string `json:"name"`
}
func (*TaskQueue) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskQueue.
func (*TaskQueue) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemporalConnection ¶
type TemporalConnection struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TemporalConnectionSpec `json:"spec,omitempty"`
Status TemporalConnectionStatus `json:"status,omitempty"`
}
TemporalConnection is the Schema for the temporalconnections API
func (*TemporalConnection) DeepCopy ¶
func (in *TemporalConnection) DeepCopy() *TemporalConnection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalConnection.
func (*TemporalConnection) DeepCopyInto ¶
func (in *TemporalConnection) DeepCopyInto(out *TemporalConnection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemporalConnection) DeepCopyObject ¶
func (in *TemporalConnection) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TemporalConnectionList ¶
type TemporalConnectionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TemporalConnection `json:"items"`
}
TemporalConnectionList contains a list of TemporalConnection
func (*TemporalConnectionList) DeepCopy ¶
func (in *TemporalConnectionList) DeepCopy() *TemporalConnectionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalConnectionList.
func (*TemporalConnectionList) DeepCopyInto ¶
func (in *TemporalConnectionList) DeepCopyInto(out *TemporalConnectionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemporalConnectionList) DeepCopyObject ¶
func (in *TemporalConnectionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TemporalConnectionReference ¶ added in v1.0.0
type TemporalConnectionReference struct {
// Name of the TemporalConnection resource.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
Name string `json:"name"`
}
TemporalConnectionReference contains the name of a TemporalConnection resource in the same namespace as the TemporalWorkerDeployment.
func (*TemporalConnectionReference) DeepCopy ¶ added in v1.0.0
func (in *TemporalConnectionReference) DeepCopy() *TemporalConnectionReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalConnectionReference.
func (*TemporalConnectionReference) DeepCopyInto ¶ added in v1.0.0
func (in *TemporalConnectionReference) DeepCopyInto(out *TemporalConnectionReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemporalConnectionSpec ¶
type TemporalConnectionSpec struct {
// The host and port of the Temporal server.
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9.-]+:[0-9]+$`
HostPort string `json:"hostPort"`
// MutualTLSSecretRef is the name of the Secret that contains the TLS certificate and key
// for mutual TLS authentication. The secret must be `type: kubernetes.io/tls` and exist
// in the same Kubernetes namespace as the TemporalConnection resource.
//
// More information about creating a TLS secret:
// https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets
// +optional
MutualTLSSecretRef *SecretReference `json:"mutualTLSSecretRef,omitempty"`
// APIKeySecretRef selects the Secret key that contains the API key used for authentication.
// The Secret must be `type: kubernetes.io/opaque` and exist in the same Kubernetes namespace as
// the TemporalConnection resource. This is a corev1.SecretKeySelector and encodes both:
// - LocalObjectReference.Name: the name of the Secret resource
// - Key: the data key within Secret.Data whose value is the API key token
// +optional
APIKeySecretRef *corev1.SecretKeySelector `json:"apiKeySecretRef,omitempty"`
}
TemporalConnectionSpec defines the desired state of TemporalConnection +kubebuilder:validation:XValidation:rule="!(has(self.mutualTLSSecretRef) && has(self.apiKeySecretRef))",message="Only one of mutualTLSSecretRef or apiKeySecretRef may be set"
func (*TemporalConnectionSpec) DeepCopy ¶
func (in *TemporalConnectionSpec) DeepCopy() *TemporalConnectionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalConnectionSpec.
func (*TemporalConnectionSpec) DeepCopyInto ¶
func (in *TemporalConnectionSpec) DeepCopyInto(out *TemporalConnectionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemporalConnectionStatus ¶
type TemporalConnectionStatus struct {
}
TemporalConnectionStatus defines the observed state of TemporalConnection
func (*TemporalConnectionStatus) DeepCopy ¶
func (in *TemporalConnectionStatus) DeepCopy() *TemporalConnectionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalConnectionStatus.
func (*TemporalConnectionStatus) DeepCopyInto ¶
func (in *TemporalConnectionStatus) DeepCopyInto(out *TemporalConnectionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemporalWorkerDeployment ¶
type TemporalWorkerDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TemporalWorkerDeploymentSpec `json:"spec,omitempty"`
Status TemporalWorkerDeploymentStatus `json:"status,omitempty"`
}
TemporalWorkerDeployment is the Schema for the temporalworkerdeployments API
func (*TemporalWorkerDeployment) DeepCopy ¶
func (in *TemporalWorkerDeployment) DeepCopy() *TemporalWorkerDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalWorkerDeployment.
func (*TemporalWorkerDeployment) DeepCopyInto ¶
func (in *TemporalWorkerDeployment) DeepCopyInto(out *TemporalWorkerDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemporalWorkerDeployment) DeepCopyObject ¶
func (in *TemporalWorkerDeployment) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TemporalWorkerDeployment) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*TemporalWorkerDeployment) SetupWebhookWithManager ¶
func (r *TemporalWorkerDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*TemporalWorkerDeployment) ValidateCreate ¶
func (r *TemporalWorkerDeployment) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*TemporalWorkerDeployment) ValidateDelete ¶
func (r *TemporalWorkerDeployment) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
type TemporalWorkerDeploymentList ¶
type TemporalWorkerDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TemporalWorkerDeployment `json:"items"`
}
TemporalWorkerDeploymentList contains a list of TemporalWorkerDeployment
func (*TemporalWorkerDeploymentList) DeepCopy ¶
func (in *TemporalWorkerDeploymentList) DeepCopy() *TemporalWorkerDeploymentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalWorkerDeploymentList.
func (*TemporalWorkerDeploymentList) DeepCopyInto ¶
func (in *TemporalWorkerDeploymentList) DeepCopyInto(out *TemporalWorkerDeploymentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemporalWorkerDeploymentList) DeepCopyObject ¶
func (in *TemporalWorkerDeploymentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TemporalWorkerDeploymentReference ¶ added in v1.5.0
type TemporalWorkerDeploymentReference struct {
// Name of the TemporalWorkerDeployment resource in the same namespace.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
Name string `json:"name"`
}
TemporalWorkerDeploymentReference references a TemporalWorkerDeployment in the same Kubernetes namespace.
func (*TemporalWorkerDeploymentReference) DeepCopy ¶ added in v1.5.0
func (in *TemporalWorkerDeploymentReference) DeepCopy() *TemporalWorkerDeploymentReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalWorkerDeploymentReference.
func (*TemporalWorkerDeploymentReference) DeepCopyInto ¶ added in v1.5.0
func (in *TemporalWorkerDeploymentReference) DeepCopyInto(out *TemporalWorkerDeploymentReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemporalWorkerDeploymentSpec ¶
type TemporalWorkerDeploymentSpec struct {
// Number of desired pods. When set, the controller manages replicas for all active
// worker versions. When omitted (nil), the controller creates versioned Deployments
// with nil replicas and never calls UpdateScale on active versions — following the
// Kubernetes-recommended pattern for HPA and other external autoscalers
// (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling).
// The controller still scales drained versions (and inactive versions that are not
// the rollout target) to zero regardless.
// This field makes TemporalWorkerDeploymentSpec implement the scale subresource, which is compatible with auto-scalers.
// +optional
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
// Template describes the pods that will be created.
// The only allowed template.spec.restartPolicy value is "Always".
Template corev1.PodTemplateSpec `json:"template"`
// Minimum number of seconds for which a newly created pod should be ready
// without any of its container crashing, for it to be considered available.
// Defaults to 0 (pod will be considered available as soon as it is ready)
// +optional
// +kubebuilder:default=0
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
// The maximum time in seconds for a deployment to make progress before it
// is considered to be failed. The deployment controller will continue to
// process failed deployments and a condition with a ProgressDeadlineExceeded
// reason will be surfaced in the deployment status. Note that progress will
// not be estimated during the time a deployment is paused. Defaults to 600s.
// +kubebuilder:default=600
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
// How to rollout new workflow executions to the target version.
RolloutStrategy RolloutStrategy `json:"rollout"`
// How to manage sunsetting drained versions.
SunsetStrategy SunsetStrategy `json:"sunset"`
// WorkerOptions configures the worker's connection to Temporal.
WorkerOptions WorkerOptions `json:"workerOptions"`
}
TemporalWorkerDeploymentSpec defines the desired state of TemporalWorkerDeployment
func (*TemporalWorkerDeploymentSpec) DeepCopy ¶
func (in *TemporalWorkerDeploymentSpec) DeepCopy() *TemporalWorkerDeploymentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalWorkerDeploymentSpec.
func (*TemporalWorkerDeploymentSpec) DeepCopyInto ¶
func (in *TemporalWorkerDeploymentSpec) DeepCopyInto(out *TemporalWorkerDeploymentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemporalWorkerDeploymentStatus ¶
type TemporalWorkerDeploymentStatus struct {
// TargetVersion is the desired next version. If TargetVersion.Deployment is nil,
// then the controller should create it. If not nil, the controller should
// wait for it to become healthy and then move it to the CurrentVersion.
TargetVersion TargetWorkerDeploymentVersion `json:"targetVersion"`
// CurrentVersion is the version that is currently registered with
// Temporal as the current version of its worker deployment. This will be nil
// during initial bootstrap until a version is registered and set as current.
CurrentVersion *CurrentWorkerDeploymentVersion `json:"currentVersion,omitempty"`
// DeprecatedVersions are deployment versions that are no longer the default. Any
// deployment versions that are unreachable should be deleted by the controller.
DeprecatedVersions []*DeprecatedWorkerDeploymentVersion `json:"deprecatedVersions,omitempty"`
// VersionConflictToken prevents concurrent modifications to the deployment status.
// It ensures reconciliation operations don't inadvertently override changes made
// by external systems while processing is underway.
VersionConflictToken []byte `json:"versionConflictToken,omitempty"`
// LastModifierIdentity is the identity of the client that most recently modified the worker deployment.
// +optional
LastModifierIdentity string `json:"lastModifierIdentity,omitempty"`
// ManagerIdentity is the identity that has exclusive rights to modify this Worker Deployment's routing config.
// When set, clients whose identity does not match will be blocked from making routing changes.
// Empty by default. Use `temporal worker deployment manager-identity set/unset` to change.
// +optional
ManagerIdentity string `json:"managerIdentity,omitempty"`
// VersionCount is the total number of versions currently known by the worker deployment.
// This includes current, target, ramping, and deprecated versions.
// +optional
// +kubebuilder:validation:Minimum=0
VersionCount int32 `json:"versionCount,omitempty"`
// Conditions represent the latest available observations of the TemporalWorkerDeployment's current state.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
TemporalWorkerDeploymentStatus defines the observed state of TemporalWorkerDeployment
func (*TemporalWorkerDeploymentStatus) DeepCopy ¶
func (in *TemporalWorkerDeploymentStatus) DeepCopy() *TemporalWorkerDeploymentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalWorkerDeploymentStatus.
func (*TemporalWorkerDeploymentStatus) DeepCopyInto ¶
func (in *TemporalWorkerDeploymentStatus) DeepCopyInto(out *TemporalWorkerDeploymentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VersionStatus ¶
type VersionStatus string
VersionStatus indicates the status of a version. +enum
const ( // VersionStatusNotRegistered indicates that the version is not registered // with Temporal for any worker deployment. VersionStatusNotRegistered VersionStatus = "NotRegistered" // VersionStatusInactive indicates that the version is registered in a Temporal // worker deployment, but has not been set to current or ramping. // A version is registered in a worker deployment after a poller with appropriate // DeploymentOptions starts polling. VersionStatusInactive VersionStatus = "Inactive" // VersionStatusRamping indicates that the version is the ramping version of its // worker deployment. It is accepting some percentage of new workflow executions. VersionStatusRamping VersionStatus = "Ramping" // VersionStatusCurrent indicates that the version is the current version of its // worker deployment. It is accepting all new workflow executions except for the // percent that are sent to the ramping version, if one exists. VersionStatusCurrent VersionStatus = "Current" // VersionStatusDraining indicates that the version has stopped accepting new workflows // (is no longer ramping or current) and DOES have open workflows pinned to it. VersionStatusDraining VersionStatus = "Draining" // VersionStatusDrained indicates that the version has stopped accepting new workflows // (is no longer ramping or current) and does NOT have open workflows pinned to it. // This version MAY still receive query tasks associated with closed workflows. VersionStatusDrained VersionStatus = "Drained" )
type WorkerOptions ¶
type WorkerOptions struct {
// The name of a TemporalConnection in the same namespace as the TemporalWorkerDeployment.
TemporalConnectionRef TemporalConnectionReference `json:"connectionRef"`
// The Temporal namespace for the worker to connect to.
// +kubebuilder:validation:MinLength=1
TemporalNamespace string `json:"temporalNamespace"`
// UnsafeCustomBuildID optionally overrides the auto-generated build ID for this worker deployment.
// When set, the controller uses this value instead of computing a build ID from the
// pod template hash. This enables rolling updates for non-workflow code changes
// (bug fixes, config changes) while preserving the same build ID.
//
// WARNING: Using a custom build ID requires careful management. If workflow code changes
// but UnsafeCustomBuildID stays the same, pinned workflows may execute on workers running incompatible
// code. Only use this when you have a reliable way to detect changes in your workflow
// definitions (e.g., hashing workflow source files in CI/CD).
//
// When the UnsafeCustomBuildID is stable but pod template spec changes, the controller triggers
// a rolling update instead of creating a new deployment version. The controller uses
// a hash of the user-provided pod template spec to detect ANY changes, including
// container images, env vars, commands, volumes, resources, and all other fields.
// +optional
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$`
UnsafeCustomBuildID string `json:"unsafeCustomBuildID,omitempty"`
}
func (*WorkerOptions) DeepCopy ¶
func (in *WorkerOptions) DeepCopy() *WorkerOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerOptions.
func (*WorkerOptions) DeepCopyInto ¶
func (in *WorkerOptions) DeepCopyInto(out *WorkerOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerResourceTemplate ¶ added in v1.5.0
type WorkerResourceTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkerResourceTemplateSpec `json:"spec,omitempty"`
Status WorkerResourceTemplateStatus `json:"status,omitempty"`
}
WorkerResourceTemplate creates an arbitrary namespaced Kubernetes resource (HPA, PDB, WPA, custom CRDs, etc.) for each per-Build-ID versioned Deployment managed by a TemporalWorkerDeployment. One instance of the resource is created per active Build ID, and is owned by this WorkerResourceTemplate (so all instances are deleted when the WorkerResourceTemplate itself is deleted).
func (*WorkerResourceTemplate) DeepCopy ¶ added in v1.5.0
func (in *WorkerResourceTemplate) DeepCopy() *WorkerResourceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerResourceTemplate.
func (*WorkerResourceTemplate) DeepCopyInto ¶ added in v1.5.0
func (in *WorkerResourceTemplate) DeepCopyInto(out *WorkerResourceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkerResourceTemplate) DeepCopyObject ¶ added in v1.5.0
func (in *WorkerResourceTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkerResourceTemplateList ¶ added in v1.5.0
type WorkerResourceTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WorkerResourceTemplate `json:"items"`
}
WorkerResourceTemplateList contains a list of WorkerResourceTemplate.
func (*WorkerResourceTemplateList) DeepCopy ¶ added in v1.5.0
func (in *WorkerResourceTemplateList) DeepCopy() *WorkerResourceTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerResourceTemplateList.
func (*WorkerResourceTemplateList) DeepCopyInto ¶ added in v1.5.0
func (in *WorkerResourceTemplateList) DeepCopyInto(out *WorkerResourceTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkerResourceTemplateList) DeepCopyObject ¶ added in v1.5.0
func (in *WorkerResourceTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkerResourceTemplateSpec ¶ added in v1.5.0
type WorkerResourceTemplateSpec struct {
// TemporalWorkerDeploymentRef references the TemporalWorkerDeployment to attach this resource to.
// +kubebuilder:validation:Required
TemporalWorkerDeploymentRef TemporalWorkerDeploymentReference `json:"temporalWorkerDeploymentRef"`
// Template is the Kubernetes resource template applied per active Build ID.
// Must include apiVersion, kind, and spec. metadata.name and metadata.namespace
// are generated by the controller; do not set them.
//
// The controller auto-injects fields when they are present as an empty object ({}):
//
// scaleTargetRef: {}
// Injected to point at the versioned Deployment. Use this for HPAs, WPAs, and
// other autoscaler CRDs that need a scale target.
//
// spec.selector.matchLabels: {}
// Injected with the versioned Deployment's pod selector labels. Use this for
// PodDisruptionBudgets and other resources that select pods.
//
// spec.metrics[*].external.metric.selector.matchLabels: {} (or with user labels)
// The controller appends temporal_worker_deployment_name, temporal_worker_build_id, and
// temporal_namespace to any External metric selector where matchLabels is present.
// User labels (e.g. task_type: "Activity") coexist alongside the injected keys.
// Do not set temporal_worker_deployment_name, temporal_worker_build_id, or
// temporal_namespace manually — the webhook will reject them.
// +kubebuilder:validation:Required
// +kubebuilder:pruning:PreserveUnknownFields
Template runtime.RawExtension `json:"template"`
}
WorkerResourceTemplateSpec defines the desired state of WorkerResourceTemplate.
func (*WorkerResourceTemplateSpec) DeepCopy ¶ added in v1.5.0
func (in *WorkerResourceTemplateSpec) DeepCopy() *WorkerResourceTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerResourceTemplateSpec.
func (*WorkerResourceTemplateSpec) DeepCopyInto ¶ added in v1.5.0
func (in *WorkerResourceTemplateSpec) DeepCopyInto(out *WorkerResourceTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerResourceTemplateStatus ¶ added in v1.5.0
type WorkerResourceTemplateStatus struct {
// Versions describes the per-Build-ID status of worker resource template instances.
// +optional
Versions []WorkerResourceTemplateVersionStatus `json:"versions,omitempty"`
// Conditions describe the current state of the WorkerResourceTemplate.
// The Ready condition is True when all active Build ID instances have been
// successfully applied with the current template generation.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
WorkerResourceTemplateStatus defines the observed state of WorkerResourceTemplate.
func (*WorkerResourceTemplateStatus) DeepCopy ¶ added in v1.5.0
func (in *WorkerResourceTemplateStatus) DeepCopy() *WorkerResourceTemplateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerResourceTemplateStatus.
func (*WorkerResourceTemplateStatus) DeepCopyInto ¶ added in v1.5.0
func (in *WorkerResourceTemplateStatus) DeepCopyInto(out *WorkerResourceTemplateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerResourceTemplateValidator ¶ added in v1.5.0
type WorkerResourceTemplateValidator struct {
Client client.Client
RESTMapper meta.RESTMapper
ControllerSAName string
ControllerSANamespace string
// AllowedKinds is the explicit list of resource kinds permitted as WorkerResourceTemplate objects.
// Must be non-empty; when empty or nil, all kinds are rejected.
// Populated from the ALLOWED_KINDS environment variable (comma-separated).
AllowedKinds []string
}
WorkerResourceTemplateValidator validates WorkerResourceTemplate objects. It holds API-dependent dependencies (client, RESTMapper, controller SA identity). +kubebuilder:object:generate=false
func NewWorkerResourceTemplateValidator ¶ added in v1.5.0
func NewWorkerResourceTemplateValidator(mgr ctrl.Manager) *WorkerResourceTemplateValidator
NewWorkerResourceTemplateValidator creates a validator from a manager.
Three environment variables are read at startup (all injected by the Helm chart):
POD_NAMESPACE — namespace in which the controller pod runs; used as the service-account namespace when performing SubjectAccessReview checks for the controller SA. Populated via the downward API (fieldRef: metadata.namespace).
SERVICE_ACCOUNT_NAME — name of the Kubernetes ServiceAccount the controller pod runs as; used when performing SubjectAccessReview checks for the controller SA. Populated via the downward API (fieldRef: spec.serviceAccountName).
ALLOWED_KINDS — comma-separated list of kind names that are permitted as WorkerResourceTemplate objects (e.g. "HorizontalPodAutoscaler,PodDisruptionBudget"). Configurable via workerResourceTemplate.allowedResources[*].kinds in values.yaml. Must be set; when empty or unset, all WorkerResourceTemplate kind submissions are rejected.
func (*WorkerResourceTemplateValidator) SetupWebhookWithManager ¶ added in v1.5.0
func (v *WorkerResourceTemplateValidator) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager registers the validating webhook with the manager.
+kubebuilder:webhook:path=/validate-temporal-io-v1alpha1-workerresourcetemplate,mutating=false,failurePolicy=fail,sideEffects=None,groups=temporal.io,resources=workerresourcetemplates,verbs=create;update;delete,versions=v1alpha1,name=vworkerresourcetemplate.kb.io,admissionReviewVersions=v1
func (*WorkerResourceTemplateValidator) ValidateCreate ¶ added in v1.5.0
func (v *WorkerResourceTemplateValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate validates a new WorkerResourceTemplate.
func (*WorkerResourceTemplateValidator) ValidateDelete ¶ added in v1.5.0
func (v *WorkerResourceTemplateValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete checks that the requesting user and the controller service account are both authorized to delete the underlying resource kind. This prevents privilege escalation: a user who cannot directly delete HPAs should not be able to delete a WorkerResourceTemplate that manages HPAs and thereby trigger their removal.
func (*WorkerResourceTemplateValidator) ValidateUpdate ¶ added in v1.5.0
func (v *WorkerResourceTemplateValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate validates an updated WorkerResourceTemplate.
type WorkerResourceTemplateVersionStatus ¶ added in v1.5.0
type WorkerResourceTemplateVersionStatus struct {
// BuildID is the Build ID of the versioned Deployment this entry refers to.
BuildID string `json:"buildID"`
// ResourceName is the name of the applied Kubernetes resource.
// +optional
ResourceName string `json:"resourceName,omitempty"`
// LastAppliedGeneration is the WorkerResourceTemplate metadata.generation at the time
// of the last **successful** apply for this Build ID. A value of 0 means no successful
// apply has occurred yet.
//
// Reading the status:
// - 0 → never applied
// - 0 < lastAppliedGeneration < .metadata.generation → older spec applied; current spec pending or failing (see ApplyError)
// - lastAppliedGeneration == .metadata.generation → healthy, up-to-date
// - lastAppliedGeneration > 0 && message != "" → previously applied at that generation; current apply failing
// +optional
LastAppliedGeneration int64 `json:"lastAppliedGeneration,omitempty"`
// ApplyError is non-empty when the most recent apply attempt failed.
// +optional
ApplyError string `json:"applyError,omitempty"`
// LastAppliedHash is a hash of the rendered resource as of the last successful apply.
// The controller uses this internally to skip redundant SSA apply calls when the
// rendered output has not changed. Users can treat this as an opaque value.
// +optional
LastAppliedHash string `json:"lastAppliedHash,omitempty"`
// LastTransitionTime is the last time this status entry changed.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
}
WorkerResourceTemplateVersionStatus describes the per-Build-ID apply status of a WorkerResourceTemplate.
func (*WorkerResourceTemplateVersionStatus) DeepCopy ¶ added in v1.5.0
func (in *WorkerResourceTemplateVersionStatus) DeepCopy() *WorkerResourceTemplateVersionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerResourceTemplateVersionStatus.
func (*WorkerResourceTemplateVersionStatus) DeepCopyInto ¶ added in v1.5.0
func (in *WorkerResourceTemplateVersionStatus) DeepCopyInto(out *WorkerResourceTemplateVersionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowExecution ¶
type WorkflowExecution struct {
WorkflowID string `json:"workflowID"`
RunID string `json:"runID"`
Status WorkflowExecutionStatus `json:"status"`
TaskQueue string `json:"taskQueue"`
}
func (*WorkflowExecution) DeepCopy ¶
func (in *WorkflowExecution) DeepCopy() *WorkflowExecution
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowExecution.
func (*WorkflowExecution) DeepCopyInto ¶
func (in *WorkflowExecution) DeepCopyInto(out *WorkflowExecution)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowExecutionStatus ¶
type WorkflowExecutionStatus string
WorkflowExecutionStatus describes the current state of a workflow. +enum
const ( // WorkflowExecutionStatusRunning indicates that the workflow is currently running. WorkflowExecutionStatusRunning WorkflowExecutionStatus = "Running" // WorkflowExecutionStatusCompleted indicates that the workflow has completed successfully. WorkflowExecutionStatusCompleted WorkflowExecutionStatus = "Completed" // WorkflowExecutionStatusFailed indicates that the workflow has failed. WorkflowExecutionStatusFailed WorkflowExecutionStatus = "Failed" // WorkflowExecutionStatusCanceled indicates that the workflow has been canceled. WorkflowExecutionStatusCanceled WorkflowExecutionStatus = "Canceled" // WorkflowExecutionStatusTerminated indicates that the workflow has been terminated. WorkflowExecutionStatusTerminated WorkflowExecutionStatus = "Terminated" // WorkflowExecutionStatusTimedOut indicates that the workflow has timed out. WorkflowExecutionStatusTimedOut WorkflowExecutionStatus = "TimedOut" )