Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NativePlugins = map[schema.GroupVersionKind]Plugin{ appsv1.SchemeGroupVersion.WithKind(common.DeploymentKind): &deploymentPlugin{}, }
Functions ¶
func GetSpecifiedOwnerFromObj ¶
func GetSpecifiedOwnerFromObj( ctx context.Context, client dynamic.Interface, obj client.Object, ownerAPIResource metav1.APIResource, ) (ownerObj *unstructured.Unstructured, found bool, err error)
GetSpecifiedOwnerFromObj returns the owner of the given object matches the APIResource.
Types ¶
type ClusterHandle ¶
type ClusterHandle struct {
DynamicClient dynamic.Interface
KubeClient kubernetes.Interface
}
type Plugin ¶
type Plugin interface {
GetPodsForClusterObject(
ctx context.Context,
obj *unstructured.Unstructured,
handle ClusterHandle,
) ([]*corev1.Pod, error)
GetTargetObjectFromPod(
ctx context.Context,
pod *corev1.Pod,
handle ClusterHandle,
) (obj *unstructured.Unstructured, found bool, err error)
}
func ResolvePlugin ¶
func ResolvePlugin(gvk schema.GroupVersionKind) (Plugin, error)
Click to show internal directories.
Click to hide internal directories.