Documentation
¶
Overview ¶
Package extension provides public interfaces that a private commercial module can implement to extend podman-api without modifying OSS internals.
Current extension points: BlobStore (backup artifact storage) and SidecarInjector (inject sidecar containers into rendered pod YAML). Future releases will add extension points for RBAC auth and custom ingress controllers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobStore ¶
type BlobStore interface {
Put(ctx context.Context, key string) (BlobWriter, error)
Get(ctx context.Context, key string) (io.ReadCloser, error)
// DeleteAll removes every blob under the directory-like key prefix.
// Removing an absent prefix is a no-op.
DeleteAll(ctx context.Context, prefix string) error
}
BlobStore is where backup artifacts rest. The OSS implementation is a local directory (internal/backup.LocalDir); the commercial S3 backend implements the same seam. Keys are slash-separated relative paths (fs.ValidPath); Get returns an error satisfying errors.Is(err, fs.ErrNotExist) for a missing blob.
type BlobWriter ¶
BlobWriter is one streamed blob write. Exactly one of Commit or Abort must be called; only Commit makes the blob visible to Get. This is the temp-file+rename contract: a failed backup never leaves a partial blob that looks complete.
type SidecarInjector ¶ added in v1.0.8
type SidecarInjector interface {
InjectSidecars(ctx context.Context, renderedYAML string, meta TemplateMeta, params map[string]any, slug string) (string, error)
}
SidecarInjector is a commercial extension point that injects sidecar containers into an instance's pod YAML after the template body has been rendered but before it is applied.
The implementation receives the rendered pod YAML, the projected template metadata, the resolved template parameters, and the instance slug. It returns the (possibly modified) YAML. Return the input unchanged to pass through.
type TemplateMeta ¶ added in v1.0.8
type TemplateMeta struct {
// ID is the template identifier (render.Meta.ID).
ID string
// Volumes lists the template's declared volumes and their backup targets.
// The Backup marker is meta-only — it is not present in the rendered pod
// YAML — so a backup/PITR sidecar needs it from here.
Volumes []TemplateVolume
}
TemplateMeta is a read-only projection of a template's metadata, handed to a SidecarInjector. It is a public type so the commercial module can consume it: the internal render.Meta cannot cross the module boundary (it lives under internal/), so the OSS core projects the fields an injector needs into this stable struct. New fields are added here as injectors come to need them.
type TemplateVolume ¶ added in v1.0.8
type TemplateVolume struct {
Name string // volume name as referenced in the pod spec
Backup string // backup target/identifier; empty when not marked for backup
}
TemplateVolume is one volume declared by a template.