Documentation ¶
Index ¶
- Constants
- func ConfigureKubeConfigFlags(hf common.HasFlags)
- func GetObjectReference(object runtime.Object, by ObjectValidator) (model.ObjectReference, error)
- func GroupVersionKindToTypeMeta(kind model.GroupVersionKind) metav1.TypeMeta
- func HasServerDryRunSupport(gvk model.GroupVersionKind, client dynamic.Interface, runtime Runtime) (bool, error)
- func IsReady(object runtime.Object) *bool
- func NewKubeClientConfig() (clientcmd.ClientConfig, string, error)
- func OptimizeError(input error) error
- func Pbool(v bool) *bool
- func Pint32(v int32) *int32
- func PrintLogs(ctx context.Context, using LogProvider, to WriterProvider) (err error)
- func ResolveDryRun(in model.DryRunOn, gvk model.GroupVersionKind, client dynamic.Interface, ...) (model.DryRunOn, error)
- func TryCastToInt32(value interface{}) *int32
- type Aggregation
- type AnonymousAggregation
- func (instance AnonymousAggregation) Available() *int64
- func (instance AnonymousAggregation) Desired() *int64
- func (instance AnonymousAggregation) IsReady() *bool
- func (instance AnonymousAggregation) Ready() *int64
- func (instance AnonymousAggregation) State() *State
- func (instance AnonymousAggregation) UpToDate() *int64
- type Apply
- type ApplyObject
- func (instance *ApplyObject) Delete(scope string) (err error)
- func (instance *ApplyObject) Execute(scope string, dryRunOn model.DryRunOn) (err error)
- func (instance *ApplyObject) Rollback(scope string)
- func (instance ApplyObject) String() string
- func (instance *ApplyObject) Wait(scope string, global model.WaitUntil) (relevantDuration time.Duration, err error)
- type ApplySet
- func (instance *ApplySet) Add(apply Apply)
- func (instance ApplySet) Execute(scope string, dryRunOn model.DryRunOn) (err error)
- func (instance ApplySet) Rollback(scope string)
- func (instance ApplySet) String() string
- func (instance ApplySet) Wait(scope string, wu model.WaitUntil) (relevantDuration time.Duration, err error)
- type CleanupMode
- type CleanupTask
- type DaemonSetAggregation
- func (instance DaemonSetAggregation) Available() *int64
- func (instance DaemonSetAggregation) Desired() *int64
- func (instance DaemonSetAggregation) IsReady() *bool
- func (instance DaemonSetAggregation) Ready() *int64
- func (instance DaemonSetAggregation) State() *State
- func (instance DaemonSetAggregation) UpToDate() *int64
- type DeploymentAggregation
- func (instance DeploymentAggregation) Available() *int64
- func (instance DeploymentAggregation) Desired() *int64
- func (instance DeploymentAggregation) IsReady() *bool
- func (instance DeploymentAggregation) Ready() *int64
- func (instance DeploymentAggregation) State() *State
- func (instance DeploymentAggregation) UpToDate() *int64
- type LogProvider
- type ObjectInfo
- type ObjectResource
- func (instance ObjectResource) Clone() ObjectResource
- func (instance ObjectResource) CloneForCreate(project *model.Project) (ObjectResource, error)
- func (instance ObjectResource) CloneForUpdate(project *model.Project, original unstructured.Unstructured) (ObjectResource, error)
- func (instance ObjectResource) Create(options *metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
- func (instance ObjectResource) Delete(options *metav1.DeleteOptions, subresources ...string) error
- func (instance ObjectResource) Get(options *metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
- func (instance ObjectResource) Update(options *metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
- func (instance ObjectResource) Watch(options *metav1.ListOptions) (watch.Interface, error)
- type ObjectValidator
- type PodAggregation
- type PodLogProvider
- type Runtime
- type StagedApplySet
- func (instance *StagedApplySet) Add(stage model.Stage, apply Apply)
- func (instance StagedApplySet) Execute(scope string, dry model.DryRunOn, wu *model.WaitUntil, rollbackIfNeeded bool) (relevantDuration time.Duration, err error)
- func (instance StagedApplySet) ExecuteStage(scope string, stage model.Stage, dryRunOn model.DryRunOn, wu *model.WaitUntil) (relevantDuration time.Duration, err error)
- type State
- type StatefulSetAggregation
- func (instance StatefulSetAggregation) Available() *int64
- func (instance StatefulSetAggregation) Desired() *int64
- func (instance StatefulSetAggregation) IsReady() *bool
- func (instance StatefulSetAggregation) Ready() *int64
- func (instance StatefulSetAggregation) State() *State
- func (instance StatefulSetAggregation) UpToDate() *int64
- type WriterProvider
Constants ¶
View Source
const ( StateUnknown = State(0) StatePending = State(1) StateRunning = State(2) StateSucceeded = State(3) StateFailed = State(4) )
View Source
const ( CleanupModeOrphans = CleanupMode(0) CleanupModeDelete = CleanupMode(1) )
Variables ¶
This section is empty.
Functions ¶
func GetObjectReference ¶ added in v0.6.0
func GetObjectReference(object runtime.Object, by ObjectValidator) (model.ObjectReference, error)
func GroupVersionKindToTypeMeta ¶
func GroupVersionKindToTypeMeta(kind model.GroupVersionKind) metav1.TypeMeta
func HasServerDryRunSupport ¶
func NewKubeClientConfig ¶
func NewKubeClientConfig() (clientcmd.ClientConfig, string, error)
func OptimizeError ¶
func PrintLogs ¶ added in v0.6.0
func PrintLogs(ctx context.Context, using LogProvider, to WriterProvider) (err error)
func ResolveDryRun ¶ added in v0.6.0
func TryCastToInt32 ¶
func TryCastToInt32(value interface{}) *int32
Types ¶
type Aggregation ¶
type Aggregation interface { Desired() *int64 Ready() *int64 UpToDate() *int64 Available() *int64 IsReady() *bool State() *State }
func NewAggregationFor ¶
func NewAggregationFor(object *unstructured.Unstructured) Aggregation
type AnonymousAggregation ¶
type AnonymousAggregation struct {
*unstructured.Unstructured
}
func (AnonymousAggregation) Available ¶
func (instance AnonymousAggregation) Available() *int64
func (AnonymousAggregation) Desired ¶
func (instance AnonymousAggregation) Desired() *int64
func (AnonymousAggregation) IsReady ¶
func (instance AnonymousAggregation) IsReady() *bool
func (AnonymousAggregation) Ready ¶
func (instance AnonymousAggregation) Ready() *int64
func (AnonymousAggregation) State ¶ added in v0.6.0
func (instance AnonymousAggregation) State() *State
func (AnonymousAggregation) UpToDate ¶
func (instance AnonymousAggregation) UpToDate() *int64
type ApplyObject ¶
type ApplyObject struct { KeepAliveInterval time.Duration // contains filtered or unexported fields }
func NewApplyObject ¶
func NewApplyObject( project *model.Project, source string, object *unstructured.Unstructured, client dynamic.Interface, runtime Runtime, ) (*ApplyObject, error)
func (*ApplyObject) Delete ¶ added in v0.6.0
func (instance *ApplyObject) Delete(scope string) (err error)
func (*ApplyObject) Execute ¶
func (instance *ApplyObject) Execute(scope string, dryRunOn model.DryRunOn) (err error)
func (*ApplyObject) Rollback ¶
func (instance *ApplyObject) Rollback(scope string)
func (ApplyObject) String ¶
func (instance ApplyObject) String() string
type CleanupMode ¶ added in v0.6.0
type CleanupMode uint8
func (CleanupMode) AffectedDescription ¶ added in v0.6.0
func (instance CleanupMode) AffectedDescription(plural bool, capitalize bool) (result string)
func (CleanupMode) String ¶ added in v0.6.0
func (instance CleanupMode) String() string
type CleanupTask ¶ added in v0.6.0
type CleanupTask struct {
// contains filtered or unexported fields
}
func NewCleanupTask ¶ added in v0.6.0
func NewCleanupTask(project *model.Project, client dynamic.Interface, mode CleanupMode) (CleanupTask, error)
func (*CleanupTask) Add ¶ added in v0.6.0
func (instance *CleanupTask) Add(reference model.ObjectReference)
func (*CleanupTask) Execute ¶ added in v0.6.0
func (instance *CleanupTask) Execute() error
type DaemonSetAggregation ¶
type DaemonSetAggregation struct {
AnonymousAggregation
}
func (DaemonSetAggregation) Available ¶
func (instance DaemonSetAggregation) Available() *int64
func (DaemonSetAggregation) Desired ¶
func (instance DaemonSetAggregation) Desired() *int64
func (DaemonSetAggregation) IsReady ¶
func (instance DaemonSetAggregation) IsReady() *bool
func (DaemonSetAggregation) Ready ¶
func (instance DaemonSetAggregation) Ready() *int64
func (DaemonSetAggregation) State ¶ added in v0.6.0
func (instance DaemonSetAggregation) State() *State
func (DaemonSetAggregation) UpToDate ¶
func (instance DaemonSetAggregation) UpToDate() *int64
type DeploymentAggregation ¶
type DeploymentAggregation struct {
AnonymousAggregation
}
func (DeploymentAggregation) Available ¶
func (instance DeploymentAggregation) Available() *int64
func (DeploymentAggregation) Desired ¶
func (instance DeploymentAggregation) Desired() *int64
func (DeploymentAggregation) IsReady ¶
func (instance DeploymentAggregation) IsReady() *bool
func (DeploymentAggregation) Ready ¶
func (instance DeploymentAggregation) Ready() *int64
func (DeploymentAggregation) State ¶ added in v0.6.0
func (instance DeploymentAggregation) State() *State
func (DeploymentAggregation) UpToDate ¶
func (instance DeploymentAggregation) UpToDate() *int64
type LogProvider ¶ added in v0.6.0
type LogProvider interface {
Open() (io.ReadCloser, error)
}
func LogProviderFor ¶ added in v0.6.0
func LogProviderFor(runtime Runtime, object kruntime.Object, container string) LogProvider
type ObjectInfo ¶
type ObjectInfo struct { model.ObjectReference TypeMeta metav1.TypeMeta Resource schema.GroupVersionResource }
func GetObjectInfo ¶
func GetObjectInfo(object runtime.Object, by ObjectValidator) (ObjectInfo, error)
func (ObjectInfo) String ¶
func (instance ObjectInfo) String() string
type ObjectResource ¶
type ObjectResource struct { ObjectInfo Client dynamic.Interface Resource dynamic.ResourceInterface Object *unstructured.Unstructured }
func GetObjectResource ¶
func GetObjectResource(object *unstructured.Unstructured, client dynamic.Interface, by ObjectValidator) (ObjectResource, error)
func (ObjectResource) Clone ¶ added in v0.6.0
func (instance ObjectResource) Clone() ObjectResource
func (ObjectResource) CloneForCreate ¶ added in v0.6.0
func (instance ObjectResource) CloneForCreate(project *model.Project) (ObjectResource, error)
func (ObjectResource) CloneForUpdate ¶ added in v0.6.0
func (instance ObjectResource) CloneForUpdate(project *model.Project, original unstructured.Unstructured) (ObjectResource, error)
func (ObjectResource) Create ¶
func (instance ObjectResource) Create(options *metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
func (ObjectResource) Delete ¶
func (instance ObjectResource) Delete(options *metav1.DeleteOptions, subresources ...string) error
func (ObjectResource) Get ¶
func (instance ObjectResource) Get(options *metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
func (ObjectResource) Update ¶
func (instance ObjectResource) Update(options *metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
func (ObjectResource) Watch ¶
func (instance ObjectResource) Watch(options *metav1.ListOptions) (watch.Interface, error)
type ObjectValidator ¶ added in v0.5.1
type ObjectValidator interface {
IsNamespaced(what model.GroupVersionKind) *bool
}
type PodAggregation ¶
type PodAggregation struct {
AnonymousAggregation
}
func (PodAggregation) Available ¶
func (instance PodAggregation) Available() *int64
func (PodAggregation) Desired ¶
func (instance PodAggregation) Desired() *int64
func (PodAggregation) IsReady ¶
func (instance PodAggregation) IsReady() *bool
func (PodAggregation) Ready ¶
func (instance PodAggregation) Ready() *int64
func (PodAggregation) State ¶ added in v0.6.0
func (instance PodAggregation) State() *State
func (PodAggregation) UpToDate ¶
func (instance PodAggregation) UpToDate() *int64
type PodLogProvider ¶ added in v0.6.0
type PodLogProvider struct {
// contains filtered or unexported fields
}
func (*PodLogProvider) Open ¶ added in v0.6.0
func (instance *PodLogProvider) Open() (io.ReadCloser, error)
type Runtime ¶
type Runtime interface { ContextName() string NewDynamicClient() (dynamic.Interface, error) NewRestClient(gvk schema.GroupVersionKind) (rest.Interface, error) discovery.OpenAPISchemaInterface }
func NewRuntime ¶
type StagedApplySet ¶ added in v0.6.0
func (*StagedApplySet) Add ¶ added in v0.6.0
func (instance *StagedApplySet) Add(stage model.Stage, apply Apply)
type StatefulSetAggregation ¶
type StatefulSetAggregation struct {
AnonymousAggregation
}
func (StatefulSetAggregation) Available ¶
func (instance StatefulSetAggregation) Available() *int64
func (StatefulSetAggregation) Desired ¶
func (instance StatefulSetAggregation) Desired() *int64
func (StatefulSetAggregation) IsReady ¶
func (instance StatefulSetAggregation) IsReady() *bool
func (StatefulSetAggregation) Ready ¶
func (instance StatefulSetAggregation) Ready() *int64
func (StatefulSetAggregation) State ¶ added in v0.6.0
func (instance StatefulSetAggregation) State() *State
func (StatefulSetAggregation) UpToDate ¶
func (instance StatefulSetAggregation) UpToDate() *int64
type WriterProvider ¶ added in v0.6.0
type WriterProvider func() (io.WriteCloser, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.