kubernetes

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureKubeConfigFlags

func ConfigureKubeConfigFlags(hf common.HasFlags)

func GroupVersionKindToTypeMeta

func GroupVersionKindToTypeMeta(kind schema.GroupVersionKind) metav1.TypeMeta

func HasServerDryRunSupport

func HasServerDryRunSupport(gvk schema.GroupVersionKind, client dynamic.Interface, runtime Runtime) (bool, error)

func IsReady

func IsReady(object runtime.Object) *bool

func NewKubeClientConfig

func NewKubeClientConfig() (clientcmd.ClientConfig, string, error)

func OptimizeError

func OptimizeError(input error) error

func Pbool

func Pbool(v bool) *bool

func Pint32

func Pint32(v int32) *int32

func TryCastToInt32

func TryCastToInt32(value interface{}) *int32

Types

type Aggregation

type Aggregation interface {
	Desired() *int32
	Ready() *int32
	UpToDate() *int32
	Available() *int32
	IsReady() *bool
}

func NewAggregationFor

func NewAggregationFor(object *unstructured.Unstructured) Aggregation

type AnonymousAggregation

type AnonymousAggregation struct {
	*unstructured.Unstructured
}

func (AnonymousAggregation) Available

func (instance AnonymousAggregation) Available() *int32

func (AnonymousAggregation) Desired

func (instance AnonymousAggregation) Desired() *int32

func (AnonymousAggregation) IsReady

func (instance AnonymousAggregation) IsReady() *bool

func (AnonymousAggregation) Ready

func (instance AnonymousAggregation) Ready() *int32

func (AnonymousAggregation) UpToDate

func (instance AnonymousAggregation) UpToDate() *int32

type Apply

type Apply interface {
	Execute(DryRunOn) error
	Wait(timeout time.Duration) error
	Rollback()
	String() string
}

type ApplyObject

type ApplyObject struct {
	KeepAliveInterval time.Duration
	// contains filtered or unexported fields
}

func NewApplyObject

func NewApplyObject(source string, object *unstructured.Unstructured, client dynamic.Interface, runtime Runtime) (*ApplyObject, error)

func (*ApplyObject) Execute

func (instance *ApplyObject) Execute(dry DryRunOn) (err error)

func (*ApplyObject) Rollback

func (instance *ApplyObject) Rollback()

func (ApplyObject) String

func (instance ApplyObject) String() string

func (*ApplyObject) Wait

func (instance *ApplyObject) Wait(timeout time.Duration) (err error)

type ApplySet

type ApplySet []Apply

func (*ApplySet) Add

func (instance *ApplySet) Add(apply Apply)

func (ApplySet) Execute

func (instance ApplySet) Execute(dry DryRunOn) (err error)

func (ApplySet) Rollback

func (instance ApplySet) Rollback()

func (ApplySet) String

func (instance ApplySet) String() string

func (ApplySet) Wait

func (instance ApplySet) Wait(timeout time.Duration) (err error)

type DaemonSetAggregation

type DaemonSetAggregation struct {
	AnonymousAggregation
}

func (DaemonSetAggregation) Available

func (instance DaemonSetAggregation) Available() *int32

func (DaemonSetAggregation) Desired

func (instance DaemonSetAggregation) Desired() *int32

func (DaemonSetAggregation) IsReady

func (instance DaemonSetAggregation) IsReady() *bool

func (DaemonSetAggregation) Ready

func (instance DaemonSetAggregation) Ready() *int32

func (DaemonSetAggregation) UpToDate

func (instance DaemonSetAggregation) UpToDate() *int32

type DeploymentAggregation

type DeploymentAggregation struct {
	AnonymousAggregation
}

func (DeploymentAggregation) Available

func (instance DeploymentAggregation) Available() *int32

func (DeploymentAggregation) Desired

func (instance DeploymentAggregation) Desired() *int32

func (DeploymentAggregation) IsReady

func (instance DeploymentAggregation) IsReady() *bool

func (DeploymentAggregation) Ready

func (instance DeploymentAggregation) Ready() *int32

func (DeploymentAggregation) UpToDate

func (instance DeploymentAggregation) UpToDate() *int32

type DryRunOn

type DryRunOn string
const (
	NowhereDryRun          DryRunOn = "nowhere"
	ClientDryRun           DryRunOn = "client"
	ServerDryRun           DryRunOn = "server"
	ServerIfPossibleDryRun DryRunOn = "serverIfPossible"
)

func (*DryRunOn) Get

func (instance *DryRunOn) Get() interface{}

func (DryRunOn) IsEnabled

func (instance DryRunOn) IsEnabled() bool

func (DryRunOn) Resolve

func (instance DryRunOn) Resolve(gvk schema.GroupVersionKind, client dynamic.Interface, runtime Runtime) (DryRunOn, error)

func (*DryRunOn) Set

func (instance *DryRunOn) Set(plain string) error

func (DryRunOn) String

func (instance DryRunOn) String() string

type ObjectInfo

type ObjectInfo struct {
	Kind                 schema.GroupVersionKind
	Name                 string
	Namespace            string
	TypeMeta             metav1.TypeMeta
	GroupVersionResource schema.GroupVersionResource
}

func GetObjectInfo

func GetObjectInfo(object runtime.Object) (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) (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 PodAggregation

type PodAggregation struct {
	AnonymousAggregation
}

func (PodAggregation) Available

func (instance PodAggregation) Available() *int32

func (PodAggregation) Desired

func (instance PodAggregation) Desired() *int32

func (PodAggregation) IsReady

func (instance PodAggregation) IsReady() *bool

func (PodAggregation) Ready

func (instance PodAggregation) Ready() *int32

func (PodAggregation) UpToDate

func (instance PodAggregation) UpToDate() *int32

type Runtime

type Runtime interface {
	ContextName() string
	NewDynamicClient() (dynamic.Interface, error)

	discovery.OpenAPISchemaInterface
}

func NewRuntime

func NewRuntime() (Runtime, error)

type StatefulSetAggregation

type StatefulSetAggregation struct {
	AnonymousAggregation
}

func (StatefulSetAggregation) Available

func (instance StatefulSetAggregation) Available() *int32

func (StatefulSetAggregation) Desired

func (instance StatefulSetAggregation) Desired() *int32

func (StatefulSetAggregation) IsReady

func (instance StatefulSetAggregation) IsReady() *bool

func (StatefulSetAggregation) Ready

func (instance StatefulSetAggregation) Ready() *int32

func (StatefulSetAggregation) UpToDate

func (instance StatefulSetAggregation) UpToDate() *int32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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