Package org.cdk8s.plus24.k8s
Class WindowsSecurityContextOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.WindowsSecurityContextOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<WindowsSecurityContextOptions>
- Enclosing interface:
- WindowsSecurityContextOptions
@Stability(Stable) public static final class WindowsSecurityContextOptions.Builder extends Object implements software.amazon.jsii.Builder<WindowsSecurityContextOptions>
A builder forWindowsSecurityContextOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WindowsSecurityContextOptions
build()
Builds the configured instance.WindowsSecurityContextOptions.Builder
gmsaCredentialSpec(String gmsaCredentialSpec)
Sets the value ofWindowsSecurityContextOptions.getGmsaCredentialSpec()
WindowsSecurityContextOptions.Builder
gmsaCredentialSpecName(String gmsaCredentialSpecName)
Sets the value ofWindowsSecurityContextOptions.getGmsaCredentialSpecName()
WindowsSecurityContextOptions.Builder
hostProcess(Boolean hostProcess)
Sets the value ofWindowsSecurityContextOptions.getHostProcess()
WindowsSecurityContextOptions.Builder
runAsUserName(String runAsUserName)
Sets the value ofWindowsSecurityContextOptions.getRunAsUserName()
-
-
-
Method Detail
-
gmsaCredentialSpec
@Stability(Stable) public WindowsSecurityContextOptions.Builder gmsaCredentialSpec(String gmsaCredentialSpec)
Sets the value ofWindowsSecurityContextOptions.getGmsaCredentialSpec()
- Parameters:
gmsaCredentialSpec
- GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.- Returns:
this
-
gmsaCredentialSpecName
@Stability(Stable) public WindowsSecurityContextOptions.Builder gmsaCredentialSpecName(String gmsaCredentialSpecName)
Sets the value ofWindowsSecurityContextOptions.getGmsaCredentialSpecName()
- Parameters:
gmsaCredentialSpecName
- GMSACredentialSpecName is the name of the GMSA credential spec to use.- Returns:
this
-
hostProcess
@Stability(Stable) public WindowsSecurityContextOptions.Builder hostProcess(Boolean hostProcess)
Sets the value ofWindowsSecurityContextOptions.getHostProcess()
- Parameters:
hostProcess
- HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.- Returns:
this
-
runAsUserName
@Stability(Stable) public WindowsSecurityContextOptions.Builder runAsUserName(String runAsUserName)
Sets the value ofWindowsSecurityContextOptions.getRunAsUserName()
- Parameters:
runAsUserName
- The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.- Returns:
this
-
build
@Stability(Stable) public WindowsSecurityContextOptions build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WindowsSecurityContextOptions>
- Returns:
- a new instance of
WindowsSecurityContextOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-
-