Documentation
¶
Index ¶
- func NewK8s(discoveryClient discovery.DiscoveryInterface, dynClientSet dynamic.Interface) *k8s
- func ServerResourceForGroupVersionKind(disco discovery.DiscoveryInterface, gvk schema.GroupVersionKind, verb string) (*metav1.APIResource, error)
- func ToResourceInterface(dynamicIf dynamic.Interface, apiResource *metav1.APIResource, ...) dynamic.ResourceInterface
- type K8s
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewK8s ¶
func NewK8s(discoveryClient discovery.DiscoveryInterface, dynClientSet dynamic.Interface) *k8s
func ServerResourceForGroupVersionKind ¶
func ServerResourceForGroupVersionKind(disco discovery.DiscoveryInterface, gvk schema.GroupVersionKind, verb string) (*metav1.APIResource, error)
func ToResourceInterface ¶
func ToResourceInterface(dynamicIf dynamic.Interface, apiResource *metav1.APIResource, resource schema.GroupVersionResource, namespace string) dynamic.ResourceInterface
Types ¶
type K8s ¶
type K8s interface { CreateResource(ctx context.Context, obj *unstructured.Unstructured, namespace string) error PatchResource(ctx context.Context, currentObj *unstructured.Unstructured, namespace string) error DeleteResource(ctx context.Context, currentObj *unstructured.Unstructured, namespace string) error GenerateManifests(path string) ([]*unstructured.Unstructured, error) GetResourceWithLabel(label map[string]string) ([]*unstructured.Unstructured, error) DiffResources(old []*unstructured.Unstructured, new []*unstructured.Unstructured) (bool, error) SetLabelsForResources(resources []*unstructured.Unstructured, labels map[string]string) error }
Click to show internal directories.
Click to hide internal directories.