Documentation
¶
Overview ¶
Package plan computes the desired set of Kubernetes objects for a Temporal custom resource. It is pure (no client, no IO) so it can be shared by the operator's controllers and by the WebAssembly preview tool.
Index ¶
- type Phase
- type PlannedObject
- func PlanFromSpec(cluster *temporalv1alpha1.TemporalCluster) ([]PlannedObject, error)
- func PlanMTLS(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
- func PlanMonitoring(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
- func PlanSchemaJobs(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
- func PlanServices(cluster *temporalv1alpha1.TemporalCluster, in ServicesInput) ([]PlannedObject, error)
- func PlanUI(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
- type ServicesInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Phase ¶
type Phase string
Phase labels which operator concern produces an object. It is surfaced in the preview UI as a badge and documents why each object exists.
type PlannedObject ¶
PlannedObject is a desired object tagged with the phase that produces it.
func PlanFromSpec ¶
func PlanFromSpec(cluster *temporalv1alpha1.TemporalCluster) ([]PlannedObject, error)
PlanFromSpec computes the full desired object set for a cluster using only its spec, with placeholder credentials. It is the entry point for the WebAssembly preview. The cluster is expected to already be defaulted by the caller.
func PlanMTLS ¶
func PlanMTLS(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
PlanMTLS returns the internode and frontend Certificates when cert-manager mTLS is enabled, and nothing otherwise.
func PlanMonitoring ¶
func PlanMonitoring(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
PlanMonitoring returns the ServiceMonitor when it is enabled in the spec. The controller additionally gates creation on the ServiceMonitor CRD being installed; that is a runtime concern and stays in the controller.
func PlanSchemaJobs ¶
func PlanSchemaJobs(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
PlanSchemaJobs returns the initial setup-schema Job for the default and visibility stores. The operator additionally runs update-schema Jobs based on live schema introspection; the preview shows the from-scratch setup case, which is the representative "what gets created" view.
func PlanServices ¶
func PlanServices(cluster *temporalv1alpha1.TemporalCluster, in ServicesInput) ([]PlannedObject, error)
PlanServices returns the config Secret, dynamic-config ConfigMap, and the Deployment/headless Service/PodDisruptionBudget for each enabled service (plus the frontend Service). Ordering matches the controller's reconcileServices so golden comparisons stay stable.
func PlanUI ¶
func PlanUI(cluster *temporalv1alpha1.TemporalCluster) []PlannedObject
PlanUI returns the temporal-ui objects when the UI is enabled: an optional client certificate (under mTLS), the Deployment, the Service, and an optional Ingress. It mirrors the controller's reconcileUI ordering.
type ServicesInput ¶
type ServicesInput struct {
RenderedConfig string
RenderedDynamicConfig string
ConfigHash string
ServiceVersions map[string]string
MTLS *resources.MTLSMounts
}
ServicesInput carries the inputs the controller derives from IO (rendered config, config hash, per-service image versions, and mTLS mounts) so that PlanServices itself stays pure. The preview supplies placeholder-credentialed renders and an empty cert hash.