Class KubeServiceAccount.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.KubeServiceAccount.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubeServiceAccount>
- Enclosing class:
- KubeServiceAccount
@Stability(Stable) public static final class KubeServiceAccount.Builder extends Object implements software.amazon.jsii.Builder<KubeServiceAccount>
A fluent builder forKubeServiceAccount
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KubeServiceAccount.Builder
automountServiceAccountToken(Boolean automountServiceAccountToken)
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.KubeServiceAccount
build()
static KubeServiceAccount.Builder
create(software.constructs.Construct scope, String id)
KubeServiceAccount.Builder
imagePullSecrets(List<? extends LocalObjectReference> imagePullSecrets)
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.KubeServiceAccount.Builder
metadata(ObjectMeta metadata)
Standard object's metadata.KubeServiceAccount.Builder
secrets(List<? extends ObjectReference> secrets)
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use.
-
-
-
Method Detail
-
create
@Stability(Stable) public static KubeServiceAccount.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope
- the scope in which to define this object. This parameter is required.id
- a scope-local name for the object. This parameter is required.- Returns:
- a new instance of
KubeServiceAccount.Builder
.
-
automountServiceAccountToken
@Stability(Stable) public KubeServiceAccount.Builder automountServiceAccountToken(Boolean automountServiceAccountToken)
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.Can be overridden at the pod level.
- Parameters:
automountServiceAccountToken
- AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. This parameter is required.- Returns:
this
-
imagePullSecrets
@Stability(Stable) public KubeServiceAccount.Builder imagePullSecrets(List<? extends LocalObjectReference> imagePullSecrets)
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
- Parameters:
imagePullSecrets
- ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. This parameter is required.- Returns:
this
-
metadata
@Stability(Stable) public KubeServiceAccount.Builder metadata(ObjectMeta metadata)
Standard object's metadata.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- Parameters:
metadata
- Standard object's metadata. This parameter is required.- Returns:
this
-
secrets
@Stability(Stable) public KubeServiceAccount.Builder secrets(List<? extends ObjectReference> secrets)
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use.Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret
- Parameters:
secrets
- Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public KubeServiceAccount build()
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<KubeServiceAccount>
-
-