Class V1VolumeMount

java.lang.Object
io.kubernetes.client.openapi.models.V1VolumeMount

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-04-23T13:45:09.091597Z[Etc/UTC]") public class V1VolumeMount extends Object
VolumeMount describes a mounting of a Volume within a container.
  • Field Details

  • Constructor Details

    • V1VolumeMount

      public V1VolumeMount()
  • Method Details

    • mountPath

      public V1VolumeMount mountPath(String mountPath)
    • getMountPath

      @Nonnull public String getMountPath()
      Path within the container at which the volume should be mounted. Must not contain ':'.
      Returns:
      mountPath
    • setMountPath

      public void setMountPath(String mountPath)
    • mountPropagation

      public V1VolumeMount mountPropagation(String mountPropagation)
    • getMountPropagation

      @Nullable public String getMountPropagation()
      mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None).
      Returns:
      mountPropagation
    • setMountPropagation

      public void setMountPropagation(String mountPropagation)
    • name

      public V1VolumeMount name(String name)
    • getName

      @Nonnull public String getName()
      This must match the Name of a Volume.
      Returns:
      name
    • setName

      public void setName(String name)
    • readOnly

      public V1VolumeMount readOnly(Boolean readOnly)
    • getReadOnly

      @Nullable public Boolean getReadOnly()
      Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
      Returns:
      readOnly
    • setReadOnly

      public void setReadOnly(Boolean readOnly)
    • recursiveReadOnly

      public V1VolumeMount recursiveReadOnly(String recursiveReadOnly)
    • getRecursiveReadOnly

      @Nullable public String getRecursiveReadOnly()
      RecursiveReadOnly specifies whether read-only mounts should be handled recursively. If ReadOnly is false, this field has no meaning and must be unspecified. If ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason. If this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None). If this field is not specified, it is treated as an equivalent of Disabled.
      Returns:
      recursiveReadOnly
    • setRecursiveReadOnly

      public void setRecursiveReadOnly(String recursiveReadOnly)
    • subPath

      public V1VolumeMount subPath(String subPath)
    • getSubPath

      @Nullable public String getSubPath()
      Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).
      Returns:
      subPath
    • setSubPath

      public void setSubPath(String subPath)
    • subPathExpr

      public V1VolumeMount subPathExpr(String subPathExpr)
    • getSubPathExpr

      @Nullable public String getSubPathExpr()
      Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.
      Returns:
      subPathExpr
    • setSubPathExpr

      public void setSubPathExpr(String subPathExpr)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1VolumeMount
    • fromJson

      public static V1VolumeMount fromJson(String jsonString) throws IOException
      Create an instance of V1VolumeMount given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1VolumeMount
      Throws:
      IOException - if the JSON string is invalid with respect to V1VolumeMount
    • toJson

      public String toJson()
      Convert an instance of V1VolumeMount to an JSON string
      Returns:
      JSON string