Package org.cdk8s.plus24
Class ServiceAccount.Builder
- java.lang.Object
-
- org.cdk8s.plus24.ServiceAccount.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServiceAccount>
- Enclosing class:
- ServiceAccount
@Stability(Stable) public static final class ServiceAccount.Builder extends Object implements software.amazon.jsii.Builder<ServiceAccount>
A fluent builder forServiceAccount
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceAccount.Builder
automountToken(Boolean automountToken)
Indicates whether pods running as this service account should have an API token automatically mounted.ServiceAccount
build()
static ServiceAccount.Builder
create(software.constructs.Construct scope, String id)
ServiceAccount.Builder
metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.ServiceAccount.Builder
secrets(List<? extends ISecret> secrets)
List of secrets allowed to be used by pods running using this ServiceAccount.
-
-
-
Method Detail
-
create
@Stability(Stable) public static ServiceAccount.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ServiceAccount.Builder
.
-
metadata
@Stability(Stable) public ServiceAccount.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.- Parameters:
metadata
- Metadata that all persisted resources must have, which includes all objects users must create. This parameter is required.- Returns:
this
-
automountToken
@Stability(Stable) public ServiceAccount.Builder automountToken(Boolean automountToken)
Indicates whether pods running as this service account should have an API token automatically mounted.Can be overridden at the pod level.
Default: true
- Parameters:
automountToken
- Indicates whether pods running as this service account should have an API token automatically mounted. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server
-
secrets
@Stability(Stable) public ServiceAccount.Builder secrets(List<? extends ISecret> secrets)
List of secrets allowed to be used by pods running using this ServiceAccount.- Parameters:
secrets
- List of secrets allowed to be used by pods running using this ServiceAccount. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/configuration/secret
-
build
@Stability(Stable) public ServiceAccount build()
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServiceAccount>
-
-