Class ContainerSecurityConfig

java.lang.Object
io.github.alersrt.pod4j.openapi.model.ContainerSecurityConfig

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-11-29T01:29:49.168634544+07:00[Asia/Barnaul]", comments="Generator version: 7.7.0") public class ContainerSecurityConfig extends Object
ContainerSecurityConfig is a container's security features, including SELinux, Apparmor, and Seccomp.
  • Field Details

  • Constructor Details

    • ContainerSecurityConfig

      public ContainerSecurityConfig()
  • Method Details

    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to ContainerSecurityConfig
    • fromJson

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

      public ContainerSecurityConfig apparmorProfile(String apparmorProfile)
    • getApparmorProfile

      @Nullable public String getApparmorProfile()
      ApparmorProfile is the name of the Apparmor profile the container will use. Optional.
      Returns:
      apparmorProfile
    • setApparmorProfile

      public void setApparmorProfile(String apparmorProfile)
    • capAdd

      public ContainerSecurityConfig capAdd(List<String> capAdd)
    • addCapAddItem

      public ContainerSecurityConfig addCapAddItem(String capAddItem)
    • getCapAdd

      @Nullable public List<String> getCapAdd()
      CapAdd are capabilities which will be added to the container. Conflicts with Privileged. Optional.
      Returns:
      capAdd
    • setCapAdd

      public void setCapAdd(List<String> capAdd)
    • capDrop

      public ContainerSecurityConfig capDrop(List<String> capDrop)
    • addCapDropItem

      public ContainerSecurityConfig addCapDropItem(String capDropItem)
    • getCapDrop

      @Nullable public List<String> getCapDrop()
      CapDrop are capabilities which will be removed from the container. Conflicts with Privileged. Optional.
      Returns:
      capDrop
    • setCapDrop

      public void setCapDrop(List<String> capDrop)
    • groups

      public ContainerSecurityConfig groups(List<String> groups)
    • addGroupsItem

      public ContainerSecurityConfig addGroupsItem(String groupsItem)
    • getGroups

      @Nullable public List<String> getGroups()
      Groups are a list of supplemental groups the container's user will be granted access to. Optional.
      Returns:
      groups
    • setGroups

      public void setGroups(List<String> groups)
    • idmappings

      public ContainerSecurityConfig idmappings(IDMappingOptions idmappings)
    • getIdmappings

      @Nullable @Valid public @Valid IDMappingOptions getIdmappings()
      Get idmappings
      Returns:
      idmappings
    • setIdmappings

      public void setIdmappings(IDMappingOptions idmappings)
    • labelNested

      public ContainerSecurityConfig labelNested(Boolean labelNested)
    • getLabelNested

      @Nullable public Boolean getLabelNested()
      LabelNested indicates whether or not the container is allowed to run fully nested containers including SELinux labelling. Optional.
      Returns:
      labelNested
    • setLabelNested

      public void setLabelNested(Boolean labelNested)
    • mask

      public ContainerSecurityConfig mask(List<String> mask)
    • addMaskItem

      public ContainerSecurityConfig addMaskItem(String maskItem)
    • getMask

      @Nullable public List<String> getMask()
      Mask is the path we want to mask in the container. This masks the paths given in addition to the default list. Optional
      Returns:
      mask
    • setMask

      public void setMask(List<String> mask)
    • noNewPrivileges

      public ContainerSecurityConfig noNewPrivileges(Boolean noNewPrivileges)
    • getNoNewPrivileges

      @Nullable public Boolean getNoNewPrivileges()
      NoNewPrivileges is whether the container will set the no new privileges flag on create, which disables gaining additional privileges (e.g. via setuid) in the container. Optional.
      Returns:
      noNewPrivileges
    • setNoNewPrivileges

      public void setNoNewPrivileges(Boolean noNewPrivileges)
    • privileged

      public ContainerSecurityConfig privileged(Boolean privileged)
    • getPrivileged

      @Nullable public Boolean getPrivileged()
      Privileged is whether the container is privileged. Privileged does the following: Adds all devices on the system to the container. Adds all capabilities to the container. Disables Seccomp, SELinux, and Apparmor confinement. (Though SELinux can be manually re-enabled). TODO: this conflicts with things. TODO: this does more. Optional.
      Returns:
      privileged
    • setPrivileged

      public void setPrivileged(Boolean privileged)
    • procfsOpts

      public ContainerSecurityConfig procfsOpts(List<String> procfsOpts)
    • addProcfsOptsItem

      public ContainerSecurityConfig addProcfsOptsItem(String procfsOptsItem)
    • getProcfsOpts

      @Nullable public List<String> getProcfsOpts()
      ProcOpts are the options used for the proc mount.
      Returns:
      procfsOpts
    • setProcfsOpts

      public void setProcfsOpts(List<String> procfsOpts)
    • readOnlyFilesystem

      public ContainerSecurityConfig readOnlyFilesystem(Boolean readOnlyFilesystem)
    • getReadOnlyFilesystem

      @Nullable public Boolean getReadOnlyFilesystem()
      ReadOnlyFilesystem indicates that everything will be mounted as read-only. Optional.
      Returns:
      readOnlyFilesystem
    • setReadOnlyFilesystem

      public void setReadOnlyFilesystem(Boolean readOnlyFilesystem)
    • readWriteTmpfs

      public ContainerSecurityConfig readWriteTmpfs(Boolean readWriteTmpfs)
    • getReadWriteTmpfs

      @Nullable public Boolean getReadWriteTmpfs()
      ReadWriteTmpfs indicates that when running with a ReadOnlyFilesystem mount temporary file systems. Optional.
      Returns:
      readWriteTmpfs
    • setReadWriteTmpfs

      public void setReadWriteTmpfs(Boolean readWriteTmpfs)
    • seccompPolicy

      public ContainerSecurityConfig seccompPolicy(String seccompPolicy)
    • getSeccompPolicy

      @Nullable public String getSeccompPolicy()
      SeccompPolicy determines which seccomp profile gets applied the container. valid values: empty,default,image
      Returns:
      seccompPolicy
    • setSeccompPolicy

      public void setSeccompPolicy(String seccompPolicy)
    • seccompProfilePath

      public ContainerSecurityConfig seccompProfilePath(String seccompProfilePath)
    • getSeccompProfilePath

      @Nullable public String getSeccompProfilePath()
      SeccompProfilePath is the path to a JSON file containing the container's Seccomp profile. If not specified, no Seccomp profile will be used. Optional.
      Returns:
      seccompProfilePath
    • setSeccompProfilePath

      public void setSeccompProfilePath(String seccompProfilePath)
    • selinuxOpts

      public ContainerSecurityConfig selinuxOpts(List<String> selinuxOpts)
    • addSelinuxOptsItem

      public ContainerSecurityConfig addSelinuxOptsItem(String selinuxOptsItem)
    • getSelinuxOpts

      @Nullable public List<String> getSelinuxOpts()
      SelinuxProcessLabel is the process label the container will use. If SELinux is enabled and this is not specified, a label will be automatically generated if not specified. Optional.
      Returns:
      selinuxOpts
    • setSelinuxOpts

      public void setSelinuxOpts(List<String> selinuxOpts)
    • umask

      public ContainerSecurityConfig umask(String umask)
    • getUmask

      @Nullable public String getUmask()
      Umask is the umask the init process of the container will be run with.
      Returns:
      umask
    • setUmask

      public void setUmask(String umask)
    • unmask

      public ContainerSecurityConfig unmask(List<String> unmask)
    • addUnmaskItem

      public ContainerSecurityConfig addUnmaskItem(String unmaskItem)
    • getUnmask

      @Nullable public List<String> getUnmask()
      Unmask a path in the container. Some paths are masked by default, preventing them from being accessed within the container; this undoes that masking. If ALL is passed, all paths will be unmasked. Optional.
      Returns:
      unmask
    • setUnmask

      public void setUnmask(List<String> unmask)
    • user

      public ContainerSecurityConfig user(String user)
    • getUser

      @Nullable public String getUser()
      User is the user the container will be run as. Can be given as a UID or a username; if a username, it will be resolved within the container, using the container's /etc/passwd. If unset, the container will be run as root. Optional.
      Returns:
      user
    • setUser

      public void setUser(String user)
    • userns

      public ContainerSecurityConfig userns(Namespace userns)
    • getUserns

      @Nullable @Valid public @Valid Namespace getUserns()
      Get userns
      Returns:
      userns
    • setUserns

      public void setUserns(Namespace userns)
    • 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
    • toJson

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