Interface ServiceAccountOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ServiceAccountProps
All Known Implementing Classes:
ServiceAccountOptions.Jsii$Proxy, ServiceAccountProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:01.501Z") @Stability(Stable) public interface ServiceAccountOptions extends software.amazon.jsii.JsiiSerializable
Options for 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());
 
  • Method Details

    • getAnnotations

      @Stability(Stable) @Nullable default Map<String,String> getAnnotations()
      Additional annotations of the service account.

      Default: - no additional annotations

    • getIdentityType

      @Stability(Stable) @Nullable default IdentityType getIdentityType()
      The identity type to use for the service account.

      Default: IdentityType.IRSA

    • getLabels

      @Stability(Stable) @Nullable default Map<String,String> getLabels()
      Additional labels of the service account.

      Default: - no additional labels

    • getName

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default String 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"

    • builder

      @Stability(Stable) static ServiceAccountOptions.Builder builder()
      Returns:
      a ServiceAccountOptions.Builder of ServiceAccountOptions