import { PeprValidateRequest } from "../lib/validate-request"; import { PeprMutateRequest } from "../lib/mutate-request"; import { V1OwnerReference, V1Container } from "@kubernetes/client-node"; import { GenericKind, kind } from "kubernetes-fluent-client"; /** * Returns all containers in a pod * @param request the request/pod to get the containers from * @param containerType the type of container to get * @returns the list of containers in the pod */ export declare function containers(request: PeprValidateRequest | PeprMutateRequest, containerType?: "containers" | "initContainers" | "ephemeralContainers"): V1Container[]; /** * Write a K8s event for a CRD * * @param cr The custom resource to write the event for * @param event The event to write, should contain a human-readable message for the event * @param eventType The type of event to write, for example "Warning" * @param eventReason The reason for the event, for example "ReconciliationFailed" * @param reportingComponent The component that is reporting the event, for example "uds.dev/operator" * @param reportingInstance The instance of the component that is reporting the event, for example process.env.HOSTNAME */ export declare function writeEvent(cr: GenericKind, event: Partial, options: { eventType: string; eventReason: string; reportingComponent: string; reportingInstance: string; }): Promise; /** * Get the owner reference for a custom resource * @param customResource the custom resource to get the owner reference for * @param blockOwnerDeletion if true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. * @param controller if true, this reference points to the managing controller. * @returns the owner reference array for the custom resource */ export declare function getOwnerRefFrom(customResource: GenericKind, blockOwnerDeletion?: boolean, controller?: boolean): V1OwnerReference[]; /** * Sanitize a resource name to make it a valid Kubernetes resource name. * * @param name the name of the resource to sanitize * @returns the sanitized resource name * * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/ */ export declare function sanitizeResourceName(name: string): string; //# sourceMappingURL=sdk.d.ts.map