executor

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package executor performs identity-constrained server-side apply as an explicit service account.

Index

Constants

View Source
const MaxParticipants = 256

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Dynamic      dynamic.Interface
	Discovery    discovery.DiscoveryInterface
	FieldManager string
}

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, p Participant, prepared *Prepared, phase string) (gone bool, err error)

Apply never creates a resource. UID and resourceVersion preconditions protect deletion/recreation and concurrent writes, including subresource writes.

func (*Client) Get

func (*Client) List

func (c *Client) List(ctx context.Context, t policy.Target, namespace string) ([]unstructured.Unstructured, error)

func (*Client) Prepare

func (c *Client) Prepare(_ context.Context, p Participant, step *api.ActionStep, data map[string]any) (*Prepared, error)

type Factory

func NewFactory

func NewFactory(config *rest.Config, disc discovery.DiscoveryInterface) Factory

type Participant

type Participant struct {
	Resource   schema.GroupVersionResource `json:"resource"`
	APIVersion string                      `json:"apiVersion"`
	Kind       string                      `json:"kind"`
	Namespace  string                      `json:"namespace"`
	Name       string                      `json:"name"`
	UID        types.UID                   `json:"uid"`
	Action     string                      `json:"action"`
	Captured   map[string]json.RawMessage  `json:"captured,omitempty"`
	Start      *Prepared                   `json:"start,omitempty"`
	End        *Prepared                   `json:"end,omitempty"`
	// Attempted is persisted before applying; a lost response still requires restore.
	Attempted bool `json:"attempted,omitempty"`
	Started   bool `json:"started,omitempty"`
	Finished  bool `json:"finished,omitempty"`
}

type Prepared

type Prepared struct {
	Subresource string         `json:"subresource,omitempty"`
	Force       bool           `json:"force,omitempty"`
	Object      map[string]any `json:"object"`
}

Jump to

Keyboard shortcuts

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