k8s

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceReleaseMapping = "yoke-resource-release-mapping"
	NSKubeSystem           = "kube-system"

	KeyRevisions = "revisions"
	KeyRelease   = "release"
)

Variables

This section is empty.

Functions

func IsNamespaced

func IsNamespaced(resource dynamic.ResourceInterface) bool

Types

type ApplyOpts

type ApplyOpts struct {
	DryRun         bool
	ForceConflicts bool
}

type ApplyResourcesOpts

type ApplyResourcesOpts struct {
	SkipDryRun     bool
	ForceConflicts bool
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *rest.Config) (*Client, error)

func NewClientFromKubeConfig

func NewClientFromKubeConfig(path string) (*Client, error)

func (Client) ApplyResource

func (client Client) ApplyResource(ctx context.Context, resource *unstructured.Unstructured, opts ApplyOpts) error

func (Client) ApplyResources

func (client Client) ApplyResources(ctx context.Context, resources []*unstructured.Unstructured, opts ApplyResourcesOpts) error

func (Client) DeleteRevisions

func (client Client) DeleteRevisions(ctx context.Context, release string) error

func (Client) EnsureNamespace added in v0.0.4

func (client Client) EnsureNamespace(ctx context.Context, namespace string) error

func (Client) GetAllRevisions

func (client Client) GetAllRevisions(ctx context.Context) ([]internal.Revisions, error)

func (Client) GetDynamicResourceInterface

func (client Client) GetDynamicResourceInterface(resource *unstructured.Unstructured) (dynamic.ResourceInterface, error)

func (Client) GetInClusterState added in v0.0.5

func (client Client) GetInClusterState(ctx context.Context, resource *unstructured.Unstructured) (*unstructured.Unstructured, error)

func (Client) GetResourceReleaseMapping

func (client Client) GetResourceReleaseMapping(ctx context.Context) (map[string]string, error)

func (Client) GetRevisions

func (client Client) GetRevisions(ctx context.Context, release string) (*internal.Revisions, error)

func (*Client) LookupResourceMapping

func (client *Client) LookupResourceMapping(resource *unstructured.Unstructured) (*meta.RESTMapping, error)

func (Client) RemoveOrphans

func (client Client) RemoveOrphans(ctx context.Context, previous, current []*unstructured.Unstructured) ([]*unstructured.Unstructured, error)

func (Client) UpdateResourceReleaseMapping

func (client Client) UpdateResourceReleaseMapping(ctx context.Context, release string, create, remove []string) error

func (Client) UpsertRevisions

func (client Client) UpsertRevisions(ctx context.Context, release string, revisions *internal.Revisions) error

func (Client) ValidateOwnership

func (client Client) ValidateOwnership(ctx context.Context, release string, resources []*unstructured.Unstructured) error

Jump to

Keyboard shortcuts

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