object

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUID

func CheckUID(target Target, observed metav1.Object) error

func Delete

func Delete(
	ctx context.Context, c *config.Configuration, target Target,
	options metav1.DeleteOptions, timeout time.Duration,
) error

func EnvRegistration

func EnvRegistration[In EnvResource, Out *EnvResourceOutput, P any](
	base runtime.ResourceRegistration,
	read func(context.Context, any, any, P) (any, error),
	known func(any, any, P, map[string][]string, bool) ([]string, error),
) envRegistration[P]

EnvRegistration uses the saved REST scope to classify namespace edits.

func FieldValues

func FieldValues(obj *unstructured.Unstructured, fields string) (map[string]any, error)

func OwnedFields

func OwnedFields(obj *unstructured.Unstructured, manager string) (string, error)

Types

type AnnotationsResource

type AnnotationsResource struct {
	APIVersion          string
	Kind                string
	Metadata            ObjectLookupMetadata
	Annotations         *map[string]string
	TemplateAnnotations *map[string]string
	FieldManager        *string
	ForceConflicts      *bool
}

func (AnnotationsResource) Constraints

func (r AnnotationsResource) Constraints() []constraint.Constraint

func (*AnnotationsResource) Create

func (AnnotationsResource) Defaults

func (r AnnotationsResource) Defaults() []defaults.Default

func (*AnnotationsResource) Delete

func (r *AnnotationsResource) Delete(
	ctx context.Context, c *config.Configuration, p annotationsPrior,
) error

func (*AnnotationsResource) Read

func (r *AnnotationsResource) Read(
	ctx context.Context, c *config.Configuration, p annotationsPrior,
) (*AnnotationsResourceOutput, error)

func (*AnnotationsResource) Update

func (r *AnnotationsResource) Update(
	ctx context.Context, c *config.Configuration, p annotationsPrior,
) (*AnnotationsResourceOutput, error)

type AnnotationsResourceOutput

type AnnotationsResourceOutput struct {
	Server              string
	APIVersion          string
	Kind                string
	Name                string
	Namespace           string
	UID                 string
	Annotations         map[string]string
	TemplateAnnotations map[string]string
}

type Client

type Client struct {
	Resource  dynamic.ResourceInterface
	Server    string
	Namespace string
}

func Connect

func Connect(
	c *config.Configuration, gvk schema.GroupVersionKind, namespace string,
) (*Client, error)

func TargetClient

func TargetClient(c *config.Configuration, target Target) (*Client, error)

type EnvFieldRef

type EnvFieldRef struct {
	APIVersion *string `json:"apiVersion,omitempty"`
	FieldPath  *string `json:"fieldPath,omitempty"`
}

type EnvKeyRef

type EnvKeyRef struct {
	Key      *string `json:"key,omitempty"`
	Name     *string `json:"name,omitempty"`
	Optional *bool   `json:"optional,omitempty"`
}

type EnvResource

type EnvResource struct {
	APIVersion     string
	Kind           string
	Metadata       ObjectLookupMetadata
	Container      *string
	InitContainer  *string
	Env            []EnvVar
	FieldManager   *string
	ForceConflicts *bool
	// contains filtered or unexported fields
}

func (EnvResource) Constraints

func (r EnvResource) Constraints() []constraint.Constraint

func (*EnvResource) Create

func (EnvResource) Defaults

func (r EnvResource) Defaults() []defaults.Default

func (*EnvResource) Delete

func (*EnvResource) Delete(ctx context.Context, c *config.Configuration, p envPrior) error

func (*EnvResource) Read

func (r *EnvResource) Read(
	ctx context.Context, c *config.Configuration, p envPrior,
) (*EnvResourceOutput, error)

func (*EnvResource) Update

func (r *EnvResource) Update(
	ctx context.Context, c *config.Configuration, p envPrior,
) (*EnvResourceOutput, error)

type EnvResourceFieldRef

type EnvResourceFieldRef struct {
	ContainerName *string `json:"containerName,omitempty"`
	Divisor       *string `json:"divisor,omitempty"`
	Resource      string  `json:"resource"`
}

type EnvResourceOutput

type EnvResourceOutput struct {
	Server     string
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
	UID        string
	Env        []EnvVar
}

type EnvValueFrom

type EnvValueFrom struct {
	ConfigMapKeyRef  *EnvKeyRef           `json:"configMapKeyRef,omitempty"`
	SecretKeyRef     *EnvKeyRef           `json:"secretKeyRef,omitempty"`
	FieldRef         *EnvFieldRef         `json:"fieldRef,omitempty"`
	ResourceFieldRef *EnvResourceFieldRef `json:"resourceFieldRef,omitempty"`
}

type EnvVar

type EnvVar struct {
	Name      string        `json:"name"`
	Value     *string       `json:"value,omitempty"`
	ValueFrom *EnvValueFrom `json:"valueFrom,omitempty"`
}

type LabelsResource

type LabelsResource struct {
	APIVersion     string
	Kind           string
	Metadata       ObjectLookupMetadata
	Labels         map[string]string
	FieldManager   *string
	ForceConflicts *bool
}

func (LabelsResource) Constraints

func (r LabelsResource) Constraints() []constraint.Constraint

func (*LabelsResource) Create

func (LabelsResource) Defaults

func (r LabelsResource) Defaults() []defaults.Default

func (*LabelsResource) Delete

func (r *LabelsResource) Delete(ctx context.Context, c *config.Configuration, p labelsPrior) error

func (*LabelsResource) Read

func (r *LabelsResource) Read(
	ctx context.Context, c *config.Configuration, p labelsPrior,
) (*LabelsResourceOutput, error)

func (*LabelsResource) Update

func (r *LabelsResource) Update(
	ctx context.Context, c *config.Configuration, p labelsPrior,
) (*LabelsResourceOutput, error)

type LabelsResourceOutput

type LabelsResourceOutput struct {
	Server     string
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
	UID        string
	Labels     map[string]string
}

type ObjectDataSource

type ObjectDataSource struct {
	APIVersion string
	Kind       string
	Metadata   ObjectLookupMetadata
}

func (ObjectDataSource) Constraints

func (d ObjectDataSource) Constraints() []constraint.Constraint

func (*ObjectDataSource) Read

type ObjectDataSourceOutput

type ObjectDataSourceOutput struct {
	Object *map[string]any `ub:",sensitive"`
}

type ObjectLookupMetadata

type ObjectLookupMetadata struct {
	Name      string
	Namespace *string
}

type ObjectResource

type ObjectResource struct {
	Manifest       string `ub:",sensitive"`
	FieldManager   *string
	ForceConflicts *bool
	DeleteTimeout  *string
}

func (*ObjectResource) Create

func (*ObjectResource) Delete

func (r *ObjectResource) Delete(ctx context.Context, c *config.Configuration, p prior) error

func (*ObjectResource) Read

func (r *ObjectResource) Read(
	ctx context.Context, c *config.Configuration, p prior,
) (*ObjectResourceOutput, error)

func (*ObjectResource) Update

func (r *ObjectResource) Update(
	ctx context.Context, c *config.Configuration, p prior,
) (*ObjectResourceOutput, error)

type ObjectResourceOutput

type ObjectResourceOutput struct {
	Server     string
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
	UID        string
	Fields     string         `ub:",sensitive"`
	Values     map[string]any `ub:",sensitive"`
}

type ObjectsDataSource

type ObjectsDataSource struct {
	APIVersion    string
	Kind          string
	Namespace     *string
	LabelSelector *string
	FieldSelector *string
	Limit         *float64
	// contains filtered or unexported fields
}

func (ObjectsDataSource) Constraints

func (d ObjectsDataSource) Constraints() []constraint.Constraint

func (*ObjectsDataSource) Read

func (*ObjectsDataSource) UnmarshalMapstructure

func (d *ObjectsDataSource) UnmarshalMapstructure(input any) error

type ObjectsDataSourceOutput

type ObjectsDataSourceOutput struct {
	Objects *[]map[string]any `ub:",sensitive"`
}

type Target

type Target struct {
	Server     string
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
	UID        string
}

Jump to

Keyboard shortcuts

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