desiredspec

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package desiredspec decides which part of a PtahSchema's or a PtahMigration's spec is the desired state its plans come from: all of it but spec.suspend. Suspending and resuming change when the operator acts, not what it plans.

Admission judges the recorded spec writer by it (internal/admission, specWriterValues), so pausing a resource does not make the person who paused it its author. kubectl ptah approve holds a decision to it, so a suspend and a resume between the review and the answer do not void the review, and any other edit of the spec does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Of

func Of(spec any) (string, error)

Of is spec as canonical JSON without its top-level suspend key, so two specs that differ only in spec.suspend give the same string. spec is a typed spec or decoded JSON; a typed spec carries only the fields its type knows.

func WithoutSuspend

func WithoutSuspend(spec any) any

WithoutSuspend is spec, decoded from JSON, without its top-level suspend key. Only the top-level key is set aside: a key named suspend anywhere else in the spec is desired state like any other. A value that is not a JSON object is returned as it is.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL