Documentation
¶
Overview ¶
Package providerinstall runs durable Helm installations through Kubernetes Edges. The Job and Helm release live on the selected cluster. The sealed provider Workspace records the plan; neither a browser nor a tenant-authored catalog entry can change the target or chart of a running attempt.
Index ¶
- func SetupCleanupController(mgr manager.Manager, installer *Installer) error
- type Installer
- func (i *Installer) Authorize(ctx context.Context, org, workspace, edge, user string) error
- func (i *Installer) Cleanup(ctx context.Context, org, name, job string)
- func (i *Installer) PrepareDelete(ctx context.Context, org, name string) error
- func (i *Installer) PrepareDeleteWithUID(ctx context.Context, org, name, expectedOwner string) (string, error)
- func (i *Installer) ReconcileCleanup(ctx context.Context, org, name string) error
- func (i *Installer) Start(ctx context.Context, org, name string, proposed *Plan, credential []byte, ...) (*Status, error)
- func (i *Installer) Status(ctx context.Context, org, name string, ready bool) (*Status, error)
- func (i *Installer) Target(ctx context.Context, org, name string) (*kcp.EdgeRoute, error)
- type Plan
- type Status
- type WorkspaceAccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupCleanupController ¶
SetupCleanupController registers the watch-driven installer cleanup source on the organization manager. The manager's Organization cache discovers one provider-parent Workspace informer per known organization. Those informer handles are transient and owned by this manager's leader term; all cleanup decisions are re-read from the provider Workspace by Installer.
Types ¶
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
func (*Installer) Authorize ¶
Authorize checks the caller's permission on this exact Edge before the hub uses its own credential for provisioning. Organization registration policy alone must not confer access to an Edge's Kubernetes API.
func (*Installer) Cleanup ¶
Cleanup removes the expired runner's remaining execution identity after a terminal result is observed. The provider credential remains for its runtime.
func (*Installer) PrepareDelete ¶
PrepareDelete fences future Start requests and removes only the current attempt's execution identity. It intentionally leaves the provider release, namespace, PVCs, and provider kubeconfig in place for a later registration.
func (*Installer) PrepareDeleteWithUID ¶
func (i *Installer) PrepareDeleteWithUID(ctx context.Context, org, name, expectedOwner string) (string, error)
PrepareDeleteWithUID returns the Workspace UID that was cleaned. Callers pass expectedOwner from an earlier observation when reconciling asynchronous deletion, so a stale reconcile cannot switch to a same-name replacement.
func (*Installer) ReconcileCleanup ¶
ReconcileCleanup persists a terminal Job result before revoking runner credentials and releasing the Job finalizer. It is safe to call repeatedly.
func (*Installer) Start ¶
func (i *Installer) Start(ctx context.Context, org, name string, proposed *Plan, credential []byte, retryFailed bool) (*Status, error)
Start is idempotent while an attempt is active. A retry creates a new Job only after the previous one has failed, using its original pinned recipe.
type Plan ¶
type Plan struct {
Namespace string `json:"namespace"`
Release string `json:"release"`
Chart string `json:"chart"`
Version string `json:"version"`
Values map[string]any `json:"values"`
Org string `json:"org,omitempty"`
Provider string `json:"provider,omitempty"`
EdgeWorkspaceUUID string `json:"edgeWorkspaceUUID,omitempty"`
EdgeName string `json:"edgeName,omitempty"`
Cluster string `json:"cluster,omitempty"`
NamespaceAdmissionKnown bool `json:"namespaceAdmissionKnown,omitempty"`
NamespaceAdmitted bool `json:"namespaceAdmitted,omitempty"`
NamespaceUID string `json:"namespaceUID,omitempty"`
Job string `json:"job"`
JobUID string `json:"jobUID,omitempty"`
Attempt int `json:"attempt"`
Owner string `json:"owner"`
AttemptID string `json:"attemptID,omitempty"`
PreparationID string `json:"preparationID,omitempty"`
PreparationExpiresAt time.Time `json:"preparationExpiresAt,omitzero"`
Deleting bool `json:"deleting,omitempty"`
JobResult string `json:"jobResult,omitempty"`
FinishedAt time.Time `json:"finishedAt,omitzero"`
CleanedUp bool `json:"cleanedUp,omitempty"`
}
func ResolvePlan ¶
ResolvePlan takes only the platform's declared recipe. No shell text, chart URLs, Kubernetes objects, or values supplied by a browser are executed.