Class V1GitRepoVolumeSource

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1GitRepoVolumeSource extends Object
Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
  • Field Details

  • Constructor Details

    • V1GitRepoVolumeSource

      public V1GitRepoVolumeSource()
  • Method Details

    • directory

      public V1GitRepoVolumeSource directory(String directory)
    • getDirectory

      @Nullable public String getDirectory()
      directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
      Returns:
      directory
    • setDirectory

      public void setDirectory(String directory)
    • repository

      public V1GitRepoVolumeSource repository(String repository)
    • getRepository

      @Nonnull public String getRepository()
      repository is the URL
      Returns:
      repository
    • setRepository

      public void setRepository(String repository)
    • revision

      public V1GitRepoVolumeSource revision(String revision)
    • getRevision

      @Nullable public String getRevision()
      revision is the commit hash for the specified revision.
      Returns:
      revision
    • setRevision

      public void setRevision(String revision)
    • 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 V1GitRepoVolumeSource
    • fromJson

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

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