k8s

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NSKubeSystem = "kube-system"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyOpts

type ApplyOpts struct {
	DryRun         bool
	ForceConflicts bool
	Release        string
}

type ApplyResourcesOpts

type ApplyResourcesOpts struct {
	SkipDryRun     bool
	ForceConflicts bool
	Release        string
}

type Client

type Client struct {
	Dynamic   *dynamic.DynamicClient
	Clientset *kubernetes.Clientset
	Meta      metadata.Interface
	Mapper    *restmapper.DeferredDiscoveryRESTMapper
}

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) CreateRevision

func (client Client) CreateRevision(ctx context.Context, release string, revision internal.Revision, resources []*unstructured.Unstructured) error

func (Client) DeleteRevisions

func (client Client) DeleteRevisions(ctx context.Context, revisions internal.Revisions) error

func (Client) EnsureNamespace

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

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

func (Client) GetRevisionResources

func (client Client) GetRevisionResources(ctx context.Context, revision internal.Revision) ([]*unstructured.Unstructured, error)

func (Client) GetRevisions

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

func (Client) IsReady added in v0.3.0

func (client Client) IsReady(ctx context.Context, resource *unstructured.Unstructured) (bool, 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) UpdateRevisionActiveState

func (client Client) UpdateRevisionActiveState(ctx context.Context, name string) error

func (Client) WaitForReady

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

func (Client) WaitForReadyMany

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

type WaitOptions

type WaitOptions struct {
	Timeout  time.Duration
	Interval time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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