import { ResourcePart, type Resource_Props, type ResourceEntity, type ResourceRef } from "@k8ts/instruments" import type { K8S } from "@k8ts/sample-interfaces" import { merge } from "lodash" import { v1 } from "../../../../../kinds" export interface ContainerVolumeMount_Input extends Resource_Props { subPath?: SubPaths readOnly?: boolean } export interface ContainerVolumeMount_Unbound extends ContainerVolumeMount_Input { $backend: ResourceRef } export interface ContainerVolumeMount_Props extends ContainerVolumeMount_Unbound { mountPath: string } export class ContainerVolumeMount extends ResourcePart { constructor(parent: ResourceEntity, props: ContainerVolumeMount_Props) { super(parent, props.$backend.ident.name, props) } get kind() { return v1.Pod.Container.VolumeMount._ } get path() { return this.props.mountPath } get backend() { return this.props.$backend } protected __submanifest__(): K8S.VolumeMount { const body = { name: this.props.$backend.ident.name, mountPath: this.props.mountPath, readOnly: this.props.readOnly, subPath: this.props.subPath } return merge(body, this.props.$$manifest) } }