Class ServiceAccount.Builder

    • 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
      • 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