Class KubeServiceAccount.Builder

    • 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