Interface ServiceAccountOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ServiceAccountProps
- All Known Implementing Classes:
ServiceAccountOptions.Jsii$Proxy,ServiceAccountProps.Jsii$Proxy
ServiceAccount.
Example:
Cluster cluster;
// add service account with annotations and labels
ServiceAccount serviceAccount = cluster.addServiceAccount("MyServiceAccount", ServiceAccountOptions.builder()
.annotations(Map.of(
"eks.amazonaws.com/sts-regional-endpoints", "false"))
.labels(Map.of(
"some-label", "with-some-value"))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forServiceAccountOptionsstatic final classAn implementation forServiceAccountOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Additional annotations of the service account.default IdentityTypeThe identity type to use for the service account.Additional labels of the service account.default StringgetName()The name of the service account.default StringThe namespace of the service account.default BooleanOverwrite existing service account.default RemovalPolicyThe removal policy applied to the service account resources.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAnnotations
Additional annotations of the service account.Default: - no additional annotations
-
getIdentityType
The identity type to use for the service account.Default: IdentityType.IRSA
-
getLabels
Additional labels of the service account.Default: - no additional labels
-
getName
The name of the service account.The name of a ServiceAccount object must be a valid DNS subdomain name. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
Default: - If no name is given, it will use the id of the resource.
-
getNamespace
The namespace of the service account.All namespace names must be valid RFC 1123 DNS labels. https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns
Default: "default"
-
getOverwriteServiceAccount
Overwrite existing service account.If this is set, we will use
kubectl applyinstead ofkubectl createwhen the service account is created. Otherwise, if there is already a service account in the cluster with the same name, the operation will fail.Default: false
-
getRemovalPolicy
The removal policy applied to the service account resources.The removal policy controls what happens to the resources if they stop being managed by CloudFormation. This can happen in one of three situations:
- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it
Default: RemovalPolicy.DESTROY
-
builder
- Returns:
- a
ServiceAccountOptions.BuilderofServiceAccountOptions
-