Class V1FileKeySelector

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-09-12T23:11:52.603861Z[Etc/UTC]") public class V1FileKeySelector extends Object
FileKeySelector selects a key of the env file.
  • Field Details

  • Constructor Details

    • V1FileKeySelector

      public V1FileKeySelector()
  • Method Details

    • key

      public V1FileKeySelector key(String key)
    • getKey

      public String getKey()
      The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
      Returns:
      key
    • setKey

      public void setKey(String key)
    • optional

      public V1FileKeySelector optional(Boolean optional)
    • getOptional

      @Nullable public Boolean getOptional()
      Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod's containers. If optional is set to false and the specified key does not exist, an error will be returned during Pod creation.
      Returns:
      optional
    • setOptional

      public void setOptional(Boolean optional)
    • path

      public V1FileKeySelector path(String path)
    • getPath

      public String getPath()
      The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.
      Returns:
      path
    • setPath

      public void setPath(String path)
    • volumeName

      public V1FileKeySelector volumeName(String volumeName)
    • getVolumeName

      public String getVolumeName()
      The name of the volume mount containing the env file.
      Returns:
      volumeName
    • setVolumeName

      public void setVolumeName(String volumeName)
    • 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