Interface EksPodSecurityContext.Builder

  • Method Details

    • runAsUser

      EksPodSecurityContext.Builder runAsUser(Long runAsUser)

      The user ID that runs containers in the pod when a container does not specify its own user ID. The supported value range is 0 through 2147483647.

      Parameters:
      runAsUser - The user ID that runs containers in the pod when a container does not specify its own user ID. The supported value range is 0 through 2147483647.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • runAsGroup

      EksPodSecurityContext.Builder runAsGroup(Long runAsGroup)

      The primary group ID that runs containers in the pod when a container does not specify its own group ID. The supported value range is 0 through 2147483647.

      Parameters:
      runAsGroup - The primary group ID that runs containers in the pod when a container does not specify its own group ID. The supported value range is 0 through 2147483647.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • runAsNonRoot

      EksPodSecurityContext.Builder runAsNonRoot(Boolean runAsNonRoot)

      Specifies whether Kubernetes validates that containers in the pod don't run as the root user unless a container specifies an overriding value.

      Parameters:
      runAsNonRoot - Specifies whether Kubernetes validates that containers in the pod don't run as the root user unless a container specifies an overriding value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • seccompProfile

      EksPodSecurityContext.Builder seccompProfile(EksSeccompProfile seccompProfile)

      The default seccomp profile for containers in the pod. A container-level seccomp profile overrides this value.

      Parameters:
      seccompProfile - The default seccomp profile for containers in the pod. A container-level seccomp profile overrides this value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • seccompProfile

      default EksPodSecurityContext.Builder seccompProfile(Consumer<EksSeccompProfile.Builder> seccompProfile)

      The default seccomp profile for containers in the pod. A container-level seccomp profile overrides this value.

      This is a convenience method that creates an instance of the EksSeccompProfile.Builder avoiding the need to create one manually via EksSeccompProfile.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to seccompProfile(EksSeccompProfile).

      Parameters:
      seccompProfile - a consumer that will call methods on EksSeccompProfile.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • fsGroup

      A special supplemental group that is applied to all containers in the pod. Some volume types allow Kubernetes to change the ownership and permissions of the volume contents to this group when the volume is mounted. The supported value range is 0 through 2147483647.

      Parameters:
      fsGroup - A special supplemental group that is applied to all containers in the pod. Some volume types allow Kubernetes to change the ownership and permissions of the volume contents to this group when the volume is mounted. The supported value range is 0 through 2147483647.
      Returns:
      Returns a reference to this object so that method calls can be chained together.