Documentation
¶
Overview ¶
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
Index ¶
- Constants
- type Access
- type ClientCertificate
- type EngineOptions
- type IssuedClientCertificate
- type Namespace
- type OIDCOptions
- type Options
- type PostgresOptions
- type Provider
- func (p *Provider) ApplyDefaults(s *domain.ClusterSpec)
- func (*Provider) CanClaimOperation(c *domain.Cluster) (bool, error)
- func (p *Provider) Cleanup(ctx context.Context, rc *engine.Context, opts domain.DeleteOptions) (done bool, err error)
- func (*Provider) DeleteNamespace(ctx context.Context, rc *engine.Context, name string) error
- func (p *Provider) Describe() domain.ProviderInfo
- func (p *Provider) IssueClientCertificate(ctx context.Context, rc *engine.Context, cn string, ttl time.Duration) (IssuedClientCertificate, error)
- func (*Provider) ListClientCertificates(ctx context.Context, rc *engine.Context) ([]ClientCertificate, error)
- func (*Provider) ListNamespaces(ctx context.Context, rc *engine.Context) ([]Namespace, error)
- func (p *Provider) MemberConfig(ctx context.Context, rc *engine.Context, name string) (agentapi.MemberConfig, error)
- func (*Provider) Name() string
- func (*Provider) RequiredCapabilities(s domain.ClusterSpec) []string
- func (p *Provider) RunOperation(ctx context.Context, rc *engine.Context, op *domain.Operation) (result engine.OpResult, err error)
- func (*Provider) SetUIOIDCClientSecret(ctx context.Context, rc *engine.Context, secret string) error
- func (p *Provider) Status(ctx context.Context, rc *engine.Context) (domain.ClusterStatus, error)
- func (p *Provider) Sync(ctx context.Context, rc *engine.Context) (result engine.Result, err error)
- func (*Provider) SyncDuringOperation(*domain.Operation) bool
- func (p *Provider) Validate(_ context.Context, old, next *domain.Cluster) error
- func (*Provider) ValidateBackend(backend infra.Backend) error
Constants ¶
const ConfigSecretPrefix = "temporal/config/"
ConfigSecretPrefix stores full agent envelopes, including credentials. The cluster CA uses tls/ca.crt and tls/ca.key for the shared agent dialer. Leaf pairs are sealed at temporal/{agent,internode,frontend}-cert/<member>.
const FrontendServerName = "frontend.temporal.karakoram.internal"
FrontendServerName is the stable serving identity verified by UI and SDK clients.
const InternalStateKey = "temporal"
InternalStateKey journals component identities, binding ownership and ordered upgrades in Cluster.Internal. It never holds private keys or passwords.
const InternodeServerName = "internode.temporal.karakoram.internal"
InternodeServerName is the shared SAN for role-to-role mutual TLS.
const UIOIDCClientSecretKey = "temporal/ui-oidc-client-secret"
UIOIDCClientSecretKey stores the write-only UI OIDC secret in SecretStore. Updating this key triggers configuration publication on the next Sync.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access interface {
// IssueClientCertificate signs a client certificate (CN = commonName, ttl
// 1h–397d) from the cluster CA and records only its non-secret metadata.
IssueClientCertificate(ctx context.Context, rc *engine.Context, commonName string, ttl time.Duration) (IssuedClientCertificate, error)
ListClientCertificates(ctx context.Context, rc *engine.Context) ([]ClientCertificate, error)
// ListNamespaces reads namespaces through a Ready frontend member.
ListNamespaces(ctx context.Context, rc *engine.Context) ([]Namespace, error)
// DeleteNamespace requests asynchronous deletion; "default" and namespaces
// still declared in engineOptions.namespaces are refused (conflict).
DeleteNamespace(ctx context.Context, rc *engine.Context, name string) error
// SetUIOIDCClientSecret seals the write-only Web UI OIDC client secret.
SetUIOIDCClientSecret(ctx context.Context, rc *engine.Context, secret string) error
}
Access is the Temporal-specific API surface the HTTP server calls on the provider (internal/server/temporal.go).
type ClientCertificate ¶
type ClientCertificate struct {
Serial string `json:"serial"`
CommonName string `json:"commonName"`
FingerprintSHA256 string `json:"fingerprintSha256"`
IssuedAt time.Time `json:"issuedAt"`
NotAfter time.Time `json:"notAfter"`
// CAFingerprintSHA256 identifies the issuing CA; certificates of a rotated CA are invalid.
CAFingerprintSHA256 string `json:"caFingerprintSha256"`
// CurrentCA is derived on read, never persisted. During rotate-tls, current
// means the CA used to issue new client certificates now: the old CA during
// trust staging, then the new CA once the signing CA switches, even while
// both CAs remain trusted during the rolling transition.
CurrentCA bool `json:"currentCa"`
}
ClientCertificate is the retained, non-secret record of an issued client certificate. Private keys are never stored.
type EngineOptions ¶
type EngineOptions struct {
Persistence struct {
Postgres PostgresOptions `json:"postgres"`
} `json:"persistence"`
HistoryShards int `json:"historyShards"`
Frontend struct {
RequireClientAuth bool `json:"requireClientAuth"`
} `json:"frontend"`
Namespaces []tspec.Namespace `json:"namespaces,omitempty"`
UI struct {
PublicHTTPS bool `json:"publicHttps"`
OIDC *OIDCOptions `json:"oidc,omitempty"`
} `json:"ui"`
}
EngineOptions contains non-secret Temporal cluster configuration.
func ParseOptions ¶
func ParseOptions(raw json.RawMessage) (EngineOptions, error)
ParseOptions rejects unknown fields, including write-only OIDC credentials.
type IssuedClientCertificate ¶
type IssuedClientCertificate struct {
ClientCertificate
CertificatePEM string `json:"certificatePem"`
PrivateKeyPEM string `json:"privateKeyPem"`
CAPEM string `json:"caPem"`
// FrontendAddress and ServerName are what an SDK client needs to connect.
FrontendAddress string `json:"frontendAddress"`
ServerName string `json:"serverName"`
}
IssuedClientCertificate is returned exactly once by IssueClientCertificate.
type Namespace ¶
type Namespace struct {
Name string `json:"name"`
Retention string `json:"retention"`
Description string `json:"description,omitempty"`
State string `json:"state"`
// Managed is true when engineOptions.namespaces declares it (or it is "default").
Managed bool `json:"managed"`
}
Namespace is an observed Temporal namespace as exposed by the API.
type OIDCOptions ¶
OIDCOptions identifies the issuer and client; the secret is sealed separately.
type Options ¶
type Options struct {
ControlPlaneURL, InternalCAPEM string
Store *store.Store
Logger *slog.Logger
Bindings pgbinding.Service
}
Options supplies PostgreSQL binding and member runtime dependencies.
type PostgresOptions ¶
type PostgresOptions struct {
Cluster string `json:"cluster"`
Namespace string `json:"namespace,omitempty"`
Database string `json:"database,omitempty"`
VisibilityDatabase string `json:"visibilityDatabase,omitempty"`
}
PostgresOptions identifies the immutable source and bound database names.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider reconciles Temporal components and their bound PostgreSQL stores.
func (*Provider) ApplyDefaults ¶
func (p *Provider) ApplyDefaults(s *domain.ClusterSpec)
ApplyDefaults fills absent topology, component, TLS and engine option settings.
func (*Provider) CanClaimOperation ¶
CanClaimOperation defers new maintenance while lifecycle or recovery owns runtimes.
func (*Provider) Cleanup ¶
func (p *Provider) Cleanup(ctx context.Context, rc *engine.Context, opts domain.DeleteOptions) (done bool, err error)
Cleanup removes runtimes before releasing bound databases and sealed credentials.
func (*Provider) DeleteNamespace ¶
DeleteNamespace requests deletion only for non-reserved, unmanaged namespaces.
func (*Provider) Describe ¶
func (p *Provider) Describe() domain.ProviderInfo
Describe publishes the locked version catalog, topology bounds and presets.
func (*Provider) IssueClientCertificate ¶
func (p *Provider) IssueClientCertificate(ctx context.Context, rc *engine.Context, cn string, ttl time.Duration) (IssuedClientCertificate, error)
IssueClientCertificate returns a client identity once and journals public metadata.
func (*Provider) ListClientCertificates ¶
func (*Provider) ListClientCertificates(ctx context.Context, rc *engine.Context) ([]ClientCertificate, error)
ListClientCertificates returns metadata; CA fingerprint mismatch marks invalidation.
func (*Provider) ListNamespaces ¶
ListNamespaces reports observed namespaces and whether options manage them.
func (*Provider) MemberConfig ¶
func (p *Provider) MemberConfig(ctx context.Context, rc *engine.Context, name string) (agentapi.MemberConfig, error)
MemberConfig returns a sealed, secret-bearing envelope for a known member.
func (*Provider) RequiredCapabilities ¶
func (*Provider) RequiredCapabilities(s domain.ClusterSpec) []string
RequiredCapabilities declares public HTTPS and horizontal-scaling requirements.
func (*Provider) RunOperation ¶
func (p *Provider) RunOperation(ctx context.Context, rc *engine.Context, op *domain.Operation) (result engine.OpResult, err error)
RunOperation advances checkpointed restart, CA rotation, backup and restore work.
func (*Provider) SetUIOIDCClientSecret ¶
func (*Provider) SetUIOIDCClientSecret(ctx context.Context, rc *engine.Context, secret string) error
SetUIOIDCClientSecret seals a write-only secret for the next configuration roll.
func (*Provider) Status ¶
Status observes component health and publishes password-free binding metadata.
func (*Provider) Sync ¶
Sync converges bindings, runtime recovery, ordered components and namespaces.
func (*Provider) SyncDuringOperation ¶
SyncDuringOperation keeps imperative maintenance exclusive of normal convergence.