Documentation
¶
Index ¶
- Constants
- Variables
- func FlightIsReady(resource *unstructured.Unstructured) bool
- func PatchEscape(value string) string
- type ApplyOpts
- type ApplyResourcesOpts
- type Client
- func (client *Client) AirwayIntf() TypedIntf[v1alpha1.Airway]
- func (client Client) ApplyResource(ctx context.Context, resource *unstructured.Unstructured, opts ApplyOpts) error
- func (client Client) ApplyResources(ctx context.Context, resources []*unstructured.Unstructured, ...) error
- func (client Client) CapReleaseHistory(ctx context.Context, name, ns string, size int) error
- func (client Client) CreateRevision(ctx context.Context, release, ns string, revision internal.Revision, ...) error
- func (client Client) DeleteRevisions(ctx context.Context, revisions internal.Release) error
- func (client Client) EnsureNamespace(ctx context.Context, namespace string) error
- func (client Client) GetDynamicResourceInterface(resource *unstructured.Unstructured) (dynamic.ResourceInterface, error)
- func (client Client) GetInClusterState(ctx context.Context, resource *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (client Client) GetRelease(ctx context.Context, name, ns string) (*internal.Release, error)
- func (client Client) GetReleases(ctx context.Context) ([]internal.Release, error)
- func (client Client) GetReleasesByNS(ctx context.Context, ns string) ([]internal.Release, error)
- func (client Client) GetRevisionResources(ctx context.Context, revision internal.Revision) (internal.Stages, error)
- func (client Client) IsReady(ctx context.Context, resource *unstructured.Unstructured) (bool, error)
- func (client Client) IsRemovedFromCluster(ctx context.Context, resource *unstructured.Unstructured) (bool, error)
- func (client Client) LockRelease(ctx context.Context, release internal.Release) error
- func (client *Client) LookupResourceMapping(resource *unstructured.Unstructured) (*meta.RESTMapping, error)
- func (client Client) OrhpanResource(ctx context.Context, resource *unstructured.Unstructured) error
- func (client Client) Patch(ctx context.Context, resource *unstructured.Unstructured, patch []PatchAction) error
- func (client Client) PatchMany(ctx context.Context, resources []*unstructured.Unstructured, ...) error
- func (client Client) PruneReleaseDiff(ctx context.Context, previous, next internal.Stages, opts PruneOpts) (removed, orphaned []*unstructured.Unstructured, err error)
- func (client Client) UnlockRelease(ctx context.Context, release internal.Release) error
- func (client Client) UpdateRevisionActiveState(ctx context.Context, revision internal.Revision) error
- func (client Client) WaitForReady(ctx context.Context, resource *unstructured.Unstructured, opts WaitOptions) error
- func (client Client) WaitForReadyMany(ctx context.Context, resources []*unstructured.Unstructured, opts WaitOptions) error
- func (client Client) WaitIsRemoveFromClusterMany(ctx context.Context, resources []*unstructured.Unstructured, opts WaitOptions) error
- func (client Client) WaitIsRemovedFromCluster(ctx context.Context, resource *unstructured.Unstructured, opts WaitOptions) error
- type MetaObject
- type PatchAction
- type PatchOp
- type PruneOpts
- type TypedIntf
- func (c TypedIntf[T]) Apply(ctx context.Context, api *T, options metav1.ApplyOptions) (*T, error)
- func (c TypedIntf[T]) Create(ctx context.Context, api *T, options metav1.CreateOptions) (*T, error)
- func (c TypedIntf[T]) Delete(ctx context.Context, name string, options metav1.DeleteOptions) error
- func (c TypedIntf[T]) Get(ctx context.Context, name string, options metav1.GetOptions) (*T, error)
- func (c TypedIntf[T]) List(ctx context.Context, options metav1.ListOptions) ([]*T, error)
- func (c TypedIntf[T]) Namespace(ns string) TypedIntf[T]
- func (c TypedIntf[T]) Update(ctx context.Context, api *T, options metav1.UpdateOptions) (*T, error)
- func (c TypedIntf[T]) UpdateStatus(ctx context.Context, api *T, options metav1.UpdateOptions) (*T, error)
- type WaitOptions
Constants ¶
View Source
const NoTimeout = -1
NoTimeout as a timeout values will cause Wait for ready to never timeout. Any negative number will do. This constant is added for semantic clarity.
Variables ¶
View Source
var ( PatchOpAdd = "add" PatchOpRemove = "remove" PatchOpReplace = "replace" PatchOpMove = "move" PatchOpCopy = "copy" )
View Source
var ErrLockTaken = errors.New("lock is already taken")
Functions ¶
func FlightIsReady ¶ added in v0.13.0
func FlightIsReady(resource *unstructured.Unstructured) bool
func PatchEscape ¶ added in v0.18.0
Types ¶
type ApplyResourcesOpts ¶
type Client ¶
type Client struct {
Dynamic *dynamic.DynamicClient
Clientset *kubernetes.Clientset
Meta metadata.Interface
Mapper *restmapper.DeferredDiscoveryRESTMapper
DefaultNamespace string
}
func NewClientFromConfigFlags ¶ added in v0.10.10
func NewClientFromConfigFlags(cfgFlags *genericclioptions.ConfigFlags) (*Client, error)
func NewClientFromKubeConfig ¶
func (*Client) AirwayIntf ¶ added in v0.16.7
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) CapReleaseHistory ¶ added in v0.12.2
func (Client) CreateRevision ¶
func (Client) DeleteRevisions ¶
func (Client) EnsureNamespace ¶
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) GetReleases ¶ added in v0.6.0
func (Client) GetReleasesByNS ¶ added in v0.6.0
func (Client) GetRevisionResources ¶
func (Client) IsReady ¶ added in v0.3.0
func (client Client) IsReady(ctx context.Context, resource *unstructured.Unstructured) (bool, error)
func (Client) IsRemovedFromCluster ¶ added in v0.19.2
func (client Client) IsRemovedFromCluster(ctx context.Context, resource *unstructured.Unstructured) (bool, error)
func (Client) LockRelease ¶ added in v0.14.3
func (*Client) LookupResourceMapping ¶
func (client *Client) LookupResourceMapping(resource *unstructured.Unstructured) (*meta.RESTMapping, error)
func (Client) OrhpanResource ¶ added in v0.14.0
func (client Client) OrhpanResource(ctx context.Context, resource *unstructured.Unstructured) error
func (Client) Patch ¶ added in v0.14.0
func (client Client) Patch(ctx context.Context, resource *unstructured.Unstructured, patch []PatchAction) error
func (Client) PatchMany ¶ added in v0.14.0
func (client Client) PatchMany(ctx context.Context, resources []*unstructured.Unstructured, patch []PatchAction) error
func (Client) PruneReleaseDiff ¶ added in v0.14.0
func (client Client) PruneReleaseDiff(ctx context.Context, previous, next internal.Stages, opts PruneOpts) (removed, orphaned []*unstructured.Unstructured, err error)
func (Client) UnlockRelease ¶ added in v0.14.3
func (Client) UpdateRevisionActiveState ¶
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
func (Client) WaitIsRemoveFromClusterMany ¶ added in v0.19.2
func (client Client) WaitIsRemoveFromClusterMany(ctx context.Context, resources []*unstructured.Unstructured, opts WaitOptions) error
func (Client) WaitIsRemovedFromCluster ¶ added in v0.19.2
func (client Client) WaitIsRemovedFromCluster(ctx context.Context, resource *unstructured.Unstructured, opts WaitOptions) error
type MetaObject ¶ added in v0.16.7
type PatchAction ¶ added in v0.18.0
type TypedIntf ¶ added in v0.16.7
type TypedIntf[T any] struct { // contains filtered or unexported fields }
func TypedInterface ¶ added in v0.16.7
func TypedInterface[T any, obj MetaObject[T]](client *Client, resource schema.GroupVersionResource) TypedIntf[T]
func (TypedIntf[T]) UpdateStatus ¶ added in v0.16.7
Click to show internal directories.
Click to hide internal directories.