Documentation ¶
Index ¶
- Constants
- func GetGvrFromUnstructured(m *Manager, resource unstructured.Unstructured) (*schema.GroupVersionResource, error)
- func GetResourceGvr(kind string) schema.GroupVersionResource
- type Manager
- func (m *Manager) CreateOrUpdateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (m *Manager) CreateOrUpdateResourcesGVR(client dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (m *Manager) CreateOrUpdateResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (m *Manager) CreateResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) error
- func (m *Manager) CreateResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) error
- func (m *Manager) CreateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (m *Manager) CreateResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (m *Manager) DeleteResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) error
- func (m *Manager) DeleteResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) error
- func (m *Manager) DeleteResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) error
- func (m *Manager) DeleteResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) error
- func (m *Manager) GetResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (m *Manager) GetResourceSchemaAndNamespace(manifest unstructured.Unstructured) (schema.GroupVersionResource, string, string)
- func (m *Manager) GetResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (m *Manager) GetStatus(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) (map[string]interface{}, error)
- func (m *Manager) List(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) (*unstructured.UnstructuredList, error)
- func (m *Manager) UpdateResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) error
- func (m *Manager) UpdateResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, ...) error
- func (m *Manager) UpdateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (m *Manager) UpdateResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
Constants ¶
View Source
const ( Deployment godogResourceMapping = iota Service HorizontalPodAutoscaler ConfigMap Secret CustomResourceDefinition ServiceAccount Role RoleBinding ClusterRole ClusterRoleBinding PeerAuthentication PriorityClass VirtualService Certificate DNSEntry PodDisruptionBudget OryRule RequestAuthentication AuthorizationPolicy Gateway )
Variables ¶
This section is empty.
Functions ¶
func GetGvrFromUnstructured ¶
func GetGvrFromUnstructured(m *Manager, resource unstructured.Unstructured) (*schema.GroupVersionResource, error)
func GetResourceGvr ¶
func GetResourceGvr(kind string) schema.GroupVersionResource
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(retryOpts []retry.Option) *Manager
func (*Manager) CreateOrUpdateResources ¶
func (m *Manager) CreateOrUpdateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Manager) CreateOrUpdateResourcesGVR ¶
func (m *Manager) CreateOrUpdateResourcesGVR(client dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Manager) CreateOrUpdateResourcesWithoutNS ¶
func (m *Manager) CreateOrUpdateResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Manager) CreateResource ¶
func (m *Manager) CreateResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, manifest unstructured.Unstructured) error
CreateResource creates a given k8s resource
func (*Manager) CreateResourceWithoutNS ¶
func (m *Manager) CreateResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, manifest unstructured.Unstructured) error
CreateResourceWithoutNS creates a given k8s resource without namespace
func (*Manager) CreateResources ¶
func (m *Manager) CreateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Manager) CreateResourcesWithoutNS ¶
func (m *Manager) CreateResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Manager) DeleteResource ¶
func (m *Manager) DeleteResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, resourceName string) error
DeleteResource deletes a given k8s resource
func (*Manager) DeleteResourceWithoutNS ¶
func (m *Manager) DeleteResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, resourceName string) error
DeleteResourceWithoutNS deletes a given k8s resource without namespace
func (*Manager) DeleteResources ¶
func (m *Manager) DeleteResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) error
func (*Manager) DeleteResourcesWithoutNS ¶
func (m *Manager) DeleteResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) error
func (*Manager) GetResource ¶
func (m *Manager) GetResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, resourceName string, opts ...retry.Option) (*unstructured.Unstructured, error)
GetResource returns chosen k8s object
func (*Manager) GetResourceSchemaAndNamespace ¶
func (m *Manager) GetResourceSchemaAndNamespace(manifest unstructured.Unstructured) (schema.GroupVersionResource, string, string)
func (*Manager) GetResourceWithoutNS ¶
func (m *Manager) GetResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, resourceName string, opts ...retry.Option) (*unstructured.Unstructured, error)
GetResourceWithoutNS returns chosen k8s object without namespace
func (*Manager) GetStatus ¶
func (m *Manager) GetStatus(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, resourceName string) (map[string]interface{}, error)
GetStatus do a GetResource and extract status field
func (*Manager) List ¶
func (m *Manager) List(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, listOptions metav1.ListOptions) (*unstructured.UnstructuredList, error)
func (*Manager) UpdateResource ¶
func (m *Manager) UpdateResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, name string, updateTo unstructured.Unstructured) error
UpdateResource updates a given k8s resource
func (*Manager) UpdateResourceWithoutNS ¶
func (m *Manager) UpdateResourceWithoutNS(client dynamic.Interface, resourceSchema schema.GroupVersionResource, name string, updateTo unstructured.Unstructured) error
UpdateResourceWithoutNS updates a given k8s resource without namespace
func (*Manager) UpdateResources ¶
func (m *Manager) UpdateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Manager) UpdateResourcesWithoutNS ¶
func (m *Manager) UpdateResourcesWithoutNS(k8sClient dynamic.Interface, resources ...unstructured.Unstructured) (*unstructured.Unstructured, error)
Click to show internal directories.
Click to hide internal directories.