Versions in this module Expand all Collapse all v0 v0.2.2 Aug 17, 2020 v0.2.1 Aug 17, 2020 Changes in this version + const APIServiceKind + const CustomResourceDefinitionKind + const DaemonSetKind + const DeploymentKind + const EndpointsKind + const IngressKind + const JobKind + const NamespaceKind + const PersistentVolumeClaimKind + const PodKind + const ReplicaSetKind + const SecretKind + const ServiceAccountKind + const ServiceKind + const StatefulSetKind + func GetAppInstanceLabel(un *unstructured.Unstructured, key string) string + func GetDeploymentReplicas(u *unstructured.Unstructured) *int64 + func GetObjectRef(obj *unstructured.Unstructured) v1.ObjectReference + func IsCRD(obj *unstructured.Unstructured) bool + func IsCRDGroupVersionKind(gvk schema.GroupVersionKind) bool + func IsNamespacedOrUnknown(provider ResourceInfoProvider, gk schema.GroupKind) bool + func MustToUnstructured(obj interface{}) *unstructured.Unstructured + func NewKubeConfig(restConfig *rest.Config, namespace string) *clientcmdapi.Config + func RetryUntilSucceed(ctx context.Context, interval time.Duration, desc string, action func() error) + func RunAllAsync(count int, action func(i int) error) error + func ServerResourceForGroupVersionKind(disco discovery.DiscoveryInterface, gvk schema.GroupVersionKind) (*metav1.APIResource, error) + func SplitYAML(yamlData []byte) ([]*unstructured.Unstructured, error) + func TestConfig(config *rest.Config) error + func ToGroupVersionResource(groupVersion string, apiResource *metav1.APIResource) schema.GroupVersionResource + func ToResourceInterface(dynamicIf dynamic.Interface, apiResource *metav1.APIResource, ...) dynamic.ResourceInterface + func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error) + func UnsetLabel(target *unstructured.Unstructured, key string) + func Version() (string, error) + func WatchWithRetry(ctx context.Context, getWatch func() (watch.Interface, error)) ... + func WriteKubeConfig(restConfig *rest.Config, namespace, filename string) error + type APIResourceInfo struct + GroupKind schema.GroupKind + GroupVersionResource schema.GroupVersionResource + Meta metav1.APIResource + type Kubectl interface + ApplyResource func(ctx context.Context, config *rest.Config, obj *unstructured.Unstructured, ...) (string, error) + ConvertToVersion func(obj *unstructured.Unstructured, group, version string) (*unstructured.Unstructured, error) + DeleteResource func(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) error + GetAPIGroups func(config *rest.Config) ([]metav1.APIGroup, error) + GetAPIResources func(config *rest.Config, resourceFilter ResourceFilter) ([]APIResourceInfo, error) + GetResource func(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error) + GetServerVersion func(config *rest.Config) (string, error) + NewDynamicClient func(config *rest.Config) (dynamic.Interface, error) + PatchResource func(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error) + SetOnKubectlRun func(onKubectlRun func(command string) (io.Closer, error)) + type KubectlCmd struct + OnKubectlRun func(command string) (io.Closer, error) + func (k *KubectlCmd) ApplyResource(ctx context.Context, config *rest.Config, obj *unstructured.Unstructured, ...) (string, error) + func (k *KubectlCmd) ConvertToVersion(obj *unstructured.Unstructured, group string, version string) (*unstructured.Unstructured, error) + func (k *KubectlCmd) DeleteResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) error + func (k *KubectlCmd) GetAPIGroups(config *rest.Config) ([]metav1.APIGroup, error) + func (k *KubectlCmd) GetAPIResources(config *rest.Config, resourceFilter ResourceFilter) ([]APIResourceInfo, error) + func (k *KubectlCmd) GetResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error) + func (k *KubectlCmd) GetServerVersion(config *rest.Config) (string, error) + func (k *KubectlCmd) NewDynamicClient(config *rest.Config) (dynamic.Interface, error) + func (k *KubectlCmd) PatchResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error) + func (k *KubectlCmd) SetOnKubectlRun(onKubectlRun func(command string) (io.Closer, error)) + type ResourceFilter interface + IsExcludedResource func(group, kind, cluster string) bool + type ResourceInfoProvider interface + IsNamespaced func(gk schema.GroupKind) (bool, error) + type ResourceKey struct + Group string + Kind string + Name string + Namespace string + func GetResourceKey(obj *unstructured.Unstructured) ResourceKey + func NewResourceKey(group string, kind string, namespace string, name string) ResourceKey + func (k *ResourceKey) String() string + func (k ResourceKey) GroupKind() schema.GroupKind