Versions in this module Expand all Collapse all v0 v0.7.6 Jan 29, 2021 Changes in this version + const ToolKapp + const ToolKubectl + func FixLabelValue(value string) string + func MakeK8sValue(k8s K8s, args starlark.Tuple, kwargs []starlark.Tuple) (value starlark.Value, e error) + func NewStreamValue(s Stream) starlark.Value + type CancelObjectStream struct + func (c CancelObjectStream) Error() string + type Config func(options *Configs) error + func WithKubeConfigContent(value string) Config + func WithProgressSubscription(value ProgressSubscription) Config + func WithTool(value Tool) Config + func WithVerbose(value int) Config + type Configs struct + func (v *Configs) AddFlags(flagsSet *pflag.FlagSet) + func (v *Configs) Merge() Config + func (v *Configs) Progress(progress int) + func (v *Configs) SetTool(tool Tool) + func (v *Configs) Tool() Tool + type FakeK8s struct + ApplyStub func(ObjectStream, *Options) error + ConfigContentStub func() *string + CreateOrUpdateStub func(*Object, func(obj *Object) error, *Options) (*Object, error) + DeleteByNameStub func(string, string, *Options) error + DeleteObjectStub func(string, string, *Options) error + DeleteStub func(ObjectStream, *Options) error + ForConfigStub func(string) (K8s, error) + ForSubChartStub func(string, string, *semver.Version, int) K8s + GetStub func(string, string, *Options) (*Object, error) + HostStub func() string + InspectStub func() string + IsNotExistStub func(error) bool + ListStub func(string, *Options, *ListOptions) (*Object, error) + NamespaceStub func(*Options) *string + PatchStub func(string, string, types.PatchType, string, *Options) (*Object, error) + ProgressStub func(int) + RolloutStatusStub func(string, string, *Options) error + SetToolStub func(Tool) + ToolStub func() Tool + WaitStub func(string, string, string, *Options) error + WatchStub func(string, string, *Options) ObjectStream + WithContextStub func(context.Context) K8s + func (fake *FakeK8s) Apply(arg1 ObjectStream, arg2 *Options) error + func (fake *FakeK8s) ApplyArgsForCall(i int) (ObjectStream, *Options) + func (fake *FakeK8s) ApplyCallCount() int + func (fake *FakeK8s) ApplyCalls(stub func(ObjectStream, *Options) error) + func (fake *FakeK8s) ApplyReturns(result1 error) + func (fake *FakeK8s) ApplyReturnsOnCall(i int, result1 error) + func (fake *FakeK8s) ConfigContent() *string + func (fake *FakeK8s) ConfigContentCallCount() int + func (fake *FakeK8s) ConfigContentCalls(stub func() *string) + func (fake *FakeK8s) ConfigContentReturns(result1 *string) + func (fake *FakeK8s) ConfigContentReturnsOnCall(i int, result1 *string) + func (fake *FakeK8s) CreateOrUpdate(arg1 *Object, arg2 func(obj *Object) error, arg3 *Options) (*Object, error) + func (fake *FakeK8s) CreateOrUpdateArgsForCall(i int) (*Object, func(obj *Object) error, *Options) + func (fake *FakeK8s) CreateOrUpdateCallCount() int + func (fake *FakeK8s) CreateOrUpdateCalls(stub func(*Object, func(obj *Object) error, *Options) (*Object, error)) + func (fake *FakeK8s) CreateOrUpdateReturns(result1 *Object, result2 error) + func (fake *FakeK8s) CreateOrUpdateReturnsOnCall(i int, result1 *Object, result2 error) + func (fake *FakeK8s) Delete(arg1 ObjectStream, arg2 *Options) error + func (fake *FakeK8s) DeleteArgsForCall(i int) (ObjectStream, *Options) + func (fake *FakeK8s) DeleteByName(arg1 string, arg2 string, arg3 *Options) error + func (fake *FakeK8s) DeleteByNameArgsForCall(i int) (string, string, *Options) + func (fake *FakeK8s) DeleteByNameCallCount() int + func (fake *FakeK8s) DeleteByNameCalls(stub func(string, string, *Options) error) + func (fake *FakeK8s) DeleteByNameReturns(result1 error) + func (fake *FakeK8s) DeleteByNameReturnsOnCall(i int, result1 error) + func (fake *FakeK8s) DeleteCallCount() int + func (fake *FakeK8s) DeleteCalls(stub func(ObjectStream, *Options) error) + func (fake *FakeK8s) DeleteObject(arg1 string, arg2 string, arg3 *Options) error + func (fake *FakeK8s) DeleteObjectArgsForCall(i int) (string, string, *Options) + func (fake *FakeK8s) DeleteObjectCallCount() int + func (fake *FakeK8s) DeleteObjectCalls(stub func(string, string, *Options) error) + func (fake *FakeK8s) DeleteObjectReturns(result1 error) + func (fake *FakeK8s) DeleteObjectReturnsOnCall(i int, result1 error) + func (fake *FakeK8s) DeleteReturns(result1 error) + func (fake *FakeK8s) DeleteReturnsOnCall(i int, result1 error) + func (fake *FakeK8s) ForConfig(arg1 string) (K8s, error) + func (fake *FakeK8s) ForConfigArgsForCall(i int) string + func (fake *FakeK8s) ForConfigCallCount() int + func (fake *FakeK8s) ForConfigCalls(stub func(string) (K8s, error)) + func (fake *FakeK8s) ForConfigReturns(result1 K8s, result2 error) + func (fake *FakeK8s) ForConfigReturnsOnCall(i int, result1 K8s, result2 error) + func (fake *FakeK8s) ForSubChart(arg1 string, arg2 string, arg3 *semver.Version, arg4 int) K8s + func (fake *FakeK8s) ForSubChartArgsForCall(i int) (string, string, *semver.Version, int) + func (fake *FakeK8s) ForSubChartCallCount() int + func (fake *FakeK8s) ForSubChartCalls(stub func(string, string, *semver.Version, int) K8s) + func (fake *FakeK8s) ForSubChartReturns(result1 K8s) + func (fake *FakeK8s) ForSubChartReturnsOnCall(i int, result1 K8s) + func (fake *FakeK8s) Get(arg1 string, arg2 string, arg3 *Options) (*Object, error) + func (fake *FakeK8s) GetArgsForCall(i int) (string, string, *Options) + func (fake *FakeK8s) GetCallCount() int + func (fake *FakeK8s) GetCalls(stub func(string, string, *Options) (*Object, error)) + func (fake *FakeK8s) GetReturns(result1 *Object, result2 error) + func (fake *FakeK8s) GetReturnsOnCall(i int, result1 *Object, result2 error) + func (fake *FakeK8s) Host() string + func (fake *FakeK8s) HostCallCount() int + func (fake *FakeK8s) HostCalls(stub func() string) + func (fake *FakeK8s) HostReturns(result1 string) + func (fake *FakeK8s) HostReturnsOnCall(i int, result1 string) + func (fake *FakeK8s) Inspect() string + func (fake *FakeK8s) InspectCallCount() int + func (fake *FakeK8s) InspectCalls(stub func() string) + func (fake *FakeK8s) InspectReturns(result1 string) + func (fake *FakeK8s) InspectReturnsOnCall(i int, result1 string) + func (fake *FakeK8s) Invocations() map[string][][]interface{} + func (fake *FakeK8s) IsNotExist(arg1 error) bool + func (fake *FakeK8s) IsNotExistArgsForCall(i int) error + func (fake *FakeK8s) IsNotExistCallCount() int + func (fake *FakeK8s) IsNotExistCalls(stub func(error) bool) + func (fake *FakeK8s) IsNotExistReturns(result1 bool) + func (fake *FakeK8s) IsNotExistReturnsOnCall(i int, result1 bool) + func (fake *FakeK8s) List(arg1 string, arg2 *Options, arg3 *ListOptions) (*Object, error) + func (fake *FakeK8s) ListArgsForCall(i int) (string, *Options, *ListOptions) + func (fake *FakeK8s) ListCallCount() int + func (fake *FakeK8s) ListCalls(stub func(string, *Options, *ListOptions) (*Object, error)) + func (fake *FakeK8s) ListReturns(result1 *Object, result2 error) + func (fake *FakeK8s) ListReturnsOnCall(i int, result1 *Object, result2 error) + func (fake *FakeK8s) Namespace(arg1 *Options) *string + func (fake *FakeK8s) NamespaceArgsForCall(i int) *Options + func (fake *FakeK8s) NamespaceCallCount() int + func (fake *FakeK8s) NamespaceCalls(stub func(*Options) *string) + func (fake *FakeK8s) NamespaceReturns(result1 *string) + func (fake *FakeK8s) NamespaceReturnsOnCall(i int, result1 *string) + func (fake *FakeK8s) Patch(arg1 string, arg2 string, arg3 types.PatchType, arg4 string, arg5 *Options) (*Object, error) + func (fake *FakeK8s) PatchArgsForCall(i int) (string, string, types.PatchType, string, *Options) + func (fake *FakeK8s) PatchCallCount() int + func (fake *FakeK8s) PatchCalls(stub func(string, string, types.PatchType, string, *Options) (*Object, error)) + func (fake *FakeK8s) PatchReturns(result1 *Object, result2 error) + func (fake *FakeK8s) PatchReturnsOnCall(i int, result1 *Object, result2 error) + func (fake *FakeK8s) Progress(arg1 int) + func (fake *FakeK8s) ProgressArgsForCall(i int) int + func (fake *FakeK8s) ProgressCallCount() int + func (fake *FakeK8s) ProgressCalls(stub func(int)) + func (fake *FakeK8s) RolloutStatus(arg1 string, arg2 string, arg3 *Options) error + func (fake *FakeK8s) RolloutStatusArgsForCall(i int) (string, string, *Options) + func (fake *FakeK8s) RolloutStatusCallCount() int + func (fake *FakeK8s) RolloutStatusCalls(stub func(string, string, *Options) error) + func (fake *FakeK8s) RolloutStatusReturns(result1 error) + func (fake *FakeK8s) RolloutStatusReturnsOnCall(i int, result1 error) + func (fake *FakeK8s) SetTool(arg1 Tool) + func (fake *FakeK8s) SetToolArgsForCall(i int) Tool + func (fake *FakeK8s) SetToolCallCount() int + func (fake *FakeK8s) SetToolCalls(stub func(Tool)) + func (fake *FakeK8s) Tool() Tool + func (fake *FakeK8s) ToolCallCount() int + func (fake *FakeK8s) ToolCalls(stub func() Tool) + func (fake *FakeK8s) ToolReturns(result1 Tool) + func (fake *FakeK8s) ToolReturnsOnCall(i int, result1 Tool) + func (fake *FakeK8s) Wait(arg1 string, arg2 string, arg3 string, arg4 *Options) error + func (fake *FakeK8s) WaitArgsForCall(i int) (string, string, string, *Options) + func (fake *FakeK8s) WaitCallCount() int + func (fake *FakeK8s) WaitCalls(stub func(string, string, string, *Options) error) + func (fake *FakeK8s) WaitReturns(result1 error) + func (fake *FakeK8s) WaitReturnsOnCall(i int, result1 error) + func (fake *FakeK8s) Watch(arg1 string, arg2 string, arg3 *Options) ObjectStream + func (fake *FakeK8s) WatchArgsForCall(i int) (string, string, *Options) + func (fake *FakeK8s) WatchCallCount() int + func (fake *FakeK8s) WatchCalls(stub func(string, string, *Options) ObjectStream) + func (fake *FakeK8s) WatchReturns(result1 ObjectStream) + func (fake *FakeK8s) WatchReturnsOnCall(i int, result1 ObjectStream) + func (fake *FakeK8s) WithContext(arg1 context.Context) K8s + func (fake *FakeK8s) WithContextArgsForCall(i int) context.Context + func (fake *FakeK8s) WithContextCallCount() int + func (fake *FakeK8s) WithContextCalls(stub func(context.Context) K8s) + func (fake *FakeK8s) WithContextReturns(result1 K8s) + func (fake *FakeK8s) WithContextReturnsOnCall(i int, result1 K8s) + type K8s interface + Apply func(output ObjectStream, options *Options) error + ConfigContent func() *string + CreateOrUpdate func(obj *Object, mutate func(obj *Object) error, options *Options) (*Object, error) + Delete func(output ObjectStream, options *Options) error + DeleteByName func(kind string, name string, options *Options) error + DeleteObject func(kind string, name string, options *Options) error + ForConfig func(config string) (K8s, error) + ForSubChart func(namespace string, app string, version *semver.Version, children int) K8s + Inspect func() string + Namespace func(options *Options) *string + Patch func(kind string, name string, pt types.PatchType, patch string, options *Options) (*Object, error) + Progress func(progress int) + RolloutStatus func(kind string, name string, options *Options) error + SetTool func(tool Tool) + Tool func() Tool + Wait func(kind string, name string, condition string, options *Options) error + Watch func(kind string, name string, options *Options) ObjectStream + WithContext func(ctx context.Context) K8s + func NewK8s(configs ...Config) (K8s, error) + type K8sInMemory struct + func NewK8sInMemory(namespace string, objects ...Object) *K8sInMemory + func NewK8sInMemoryEmpty() *K8sInMemory + func (k K8sInMemory) Apply(output ObjectStream, options *Options) error + func (k K8sInMemory) ConfigContent() *string + func (k K8sInMemory) CreateOrUpdate(obj *Object, mutate func(obj *Object) error, options *Options) (*Object, error) + func (k K8sInMemory) Delete(output ObjectStream, options *Options) error + func (k K8sInMemory) DeleteByName(kind string, name string, options *Options) error + func (k K8sInMemory) DeleteObject(kind string, name string, options *Options) error + func (k K8sInMemory) ForConfig(config string) (K8s, error) + func (k K8sInMemory) ForSubChart(namespace string, app string, version *semver.Version, children int) K8s + func (k K8sInMemory) Get(kind string, name string, options *Options) (*Object, error) + func (k K8sInMemory) GetObject(kind string, name string, options *Options) (*Object, error) + func (k K8sInMemory) Host() string + func (k K8sInMemory) Inspect() string + func (k K8sInMemory) IsNotExist(err error) bool + func (k K8sInMemory) List(kind string, options *Options, listOptions *ListOptions) (*Object, error) + func (k K8sInMemory) Namespace(options *Options) *string + func (k K8sInMemory) Patch(kind string, name string, pt types.PatchType, patchJSON string, ...) (*Object, error) + func (k K8sInMemory) Progress(progress int) + func (k K8sInMemory) RolloutStatus(kind string, name string, options *Options) error + func (k K8sInMemory) SetTool(tool Tool) + func (k K8sInMemory) Tool() Tool + func (k K8sInMemory) Wait(kind string, name string, condition string, options *Options) error + func (k K8sInMemory) Watch(kind string, name string, options *Options) ObjectStream + func (k K8sInMemory) WithContext(ctx context.Context) K8s + type K8sReader interface + Get func(kind string, name string, options *Options) (*Object, error) + Host func() string + IsNotExist func(err error) bool + List func(kind string, options *Options, listOptions *ListOptions) (*Object, error) + type K8sValue interface + func NewK8sValue(k K8s) K8sValue + type ListOptions struct + AllNamespaces bool + LabelSelector labels.Selector + type MetaData struct + Additional map[string]json.RawMessage + Annotations map[string]string + Labels map[string]string + Name string + Namespace string + func (m *MetaData) UnmarshalJSON(b []byte) error + func (m MetaData) MarshalJSON() ([]byte, error) + type Object struct + APIVersion string + Additional map[string]json.RawMessage + Kind string + MetaData MetaData + func (o *Object) UnmarshalJSON(b []byte) error + func (o Object) MarshalJSON() ([]byte, error) + type ObjectConsumer = func(obj *Object) error + type ObjectStream func(w ObjectConsumer) error + func Decode(in Stream) ObjectStream + func ObjectErrorStream(err error) ObjectStream + func (o ObjectStream) Encode() Stream + func (o ObjectStream) Filter(filter func(obj *Object) bool) ObjectStream + func (o ObjectStream) GroupBy(group func(o *Object) string) func(key string) ObjectStream + func (o ObjectStream) Map(f func(obj *Object) *Object) ObjectStream + func (o ObjectStream) Sort(f func(o1 *Object, o2 *Object) int, reverse bool) ObjectStream + type Options struct + ClusterScoped bool + IgnoreNotFound bool + Namespace string + Quiet bool + Timeout time.Duration + Tool Tool + func (k *Options) UnpackArgs(fnname string, args starlark.Tuple, kwargs []starlark.Tuple, ...) error + type ProgressSubscription = func(progress int) + type Stream = func(io.Writer) error + func ErrorStream(err error) Stream + func ToStream(v starlark.Value, err error) Stream + func YamlConcat(streams ...Stream) Stream + type Tool int + func (t *Tool) Set(val string) error + func (t *Tool) Type() string + func (t Tool) String() string