k8s

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyOpts

type ApplyOpts struct {
	DryRun         bool
	ForceConflicts bool
}

type ApplyResourcesOpts

type ApplyResourcesOpts struct {
	DryRunOnly     bool
	SkipDryRun     bool
	ForceConflicts bool
}

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, ns string, revision internal.Revision, resources []*unstructured.Unstructured) error

func (Client) DeleteRevisions

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

func (Client) EnsureNamespace

func (client Client) EnsureNamespace(ctx context.Context, namespace string) 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) GetRelease added in v0.6.0

func (client Client) GetRelease(ctx context.Context, release, ns string) (*internal.Release, error)

func (Client) GetReleases added in v0.6.0

func (client Client) GetReleases(ctx context.Context) ([]internal.Release, error)

func (Client) GetReleasesByNS added in v0.6.0

func (client Client) GetReleasesByNS(ctx context.Context, ns string) ([]internal.Release, error)

func (Client) GetRevisionResources

func (client Client) GetRevisionResources(ctx context.Context, revision internal.Revision) ([]*unstructured.Unstructured, 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, revision internal.Revision) 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