import { Resource, ResourceProps, IResource } from './base'; import { Construct } from 'constructs'; import { ApiObject } from 'cdk8s'; import { ISecret } from './secret'; /** * (experimental) Properties for initialization of `ServiceAccount`. * * Properties for initialization of `ServiceAccount`. * * @experimental */ export interface ServiceAccountProps extends ResourceProps { } /** * @experimental */ export interface IServiceAccount extends IResource { } /** * (experimental) Properties for initialization of `ServiceAccount`. * * Properties for initialization of `ServiceAccount`. * * @experimental */ export interface ServiceAccountProps { /** * (experimental) List of secrets allowed to be used by pods running using this ServiceAccount. * * @see https://kubernetes.io/docs/concepts/configuration/secret * @experimental */ readonly secrets?: ISecret[]; } /** * (experimental) A service account provides an identity for processes that run in a Pod. * * When you (a human) access the cluster (for example, using kubectl), you are * authenticated by the apiserver as a particular User Account (currently this * is usually admin, unless your cluster administrator has customized your * cluster). Processes in containers inside pods can also contact the apiserver. * When they do, they are authenticated as a particular Service Account (for * example, default). * * @see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account * @experimental */ export declare class ServiceAccount extends Resource implements IServiceAccount { /** * (experimental) Imports a service account from the cluster as a reference. * * @param name The name of the service account resource. * @experimental */ static fromServiceAccountName(name: string): IServiceAccount; /** * (experimental) The underlying cdk8s API object. * * @see base.Resource.apiObject * @experimental */ protected readonly apiObject: ApiObject; private readonly _secrets; /** * @experimental */ constructor(scope: Construct, id: string, props?: ServiceAccountProps); /** * (experimental) Allow a secret to be accessed by pods using this service account. * * @param secret The secret. * @experimental */ addSecret(secret: ISecret): void; /** * (experimental) List of secrets allowed to be used by pods running using this service account. * * Returns a copy. To add a secret, use `addSecret()`. * * @experimental */ get secrets(): ISecret[]; }