import { CfnJson } from "aws-cdk-lib"; import { Cluster } from "aws-cdk-lib/aws-eks"; export declare const KarpenterControllerPolicy: { Version: string; Statement: { Effect: string; Action: string[]; Resource: string; }[]; }; /** * Sids that make up each named controller policy, mirroring the policy split upstream Karpenter uses * (aws/karpenter-provider-aws#8690). The interruption-queue permissions are not listed here; the * addon adds them separately as their own policy, and only when interruption handling is enabled. */ declare const KARPENTER_CONTROLLER_POLICY_SIDS: { readonly nodeLifecycle: readonly ["AllowScopedEC2InstanceActions", "AllowScopedEC2InstanceActionsWithTags", "AllowScopedResourceCreationTagging", "AllowScopedResourceTagging", "AllowScopedDeletion"]; readonly iamIntegration: readonly ["AllowScopedInstanceProfileCreationActions", "AllowScopedInstanceProfileTagActions", "AllowScopedInstanceProfileActions", "AllowInstanceProfileReadActions"]; readonly eksIntegration: readonly ["AllowAPIServerEndpointDiscovery"]; readonly resourceDiscovery: readonly ["AllowRegionalReadActions", "AllowSSMReadActions", "AllowPricingReadActions"]; readonly zonalShift: readonly ["AllowZonalShiftStatusReadOnly"]; }; /** Names of the scoped Karpenter controller policies (mirrors upstream's policy names). */ export type KarpenterControllerPolicyName = keyof typeof KARPENTER_CONTROLLER_POLICY_SIDS; /** * Scoped Karpenter controller policy as a single combined document. Introduced for the v1beta1 CRD * generation (hence the historical `Beta` name) and still used by the legacy `KarpenterAddOn`. */ export declare const KarpenterControllerPolicyBeta: (cluster: Cluster, partition: string, region: string) => { Version: string; Statement: ({ Sid: string; Effect: string; Resource: string[]; Action: string[]; Condition?: undefined; } | { Sid: string; Effect: string; Resource: string[]; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:RequestTag/karpenter.sh/nodepool": string; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string[]; Action: string; Condition: { StringEquals: CfnJson; StringLike: { "aws:RequestTag/karpenter.sh/nodepool": string; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.sh/nodepool": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals": { "aws:TagKeys": string[]; }; }; } | { Sid: string; Effect: string; Resource: string[]; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.sh/nodepool": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: { "aws:RequestedRegion": string; "arc-zonal-shift:ResourceIdentifier"?: undefined; }; StringLike?: undefined; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string; Condition?: undefined; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition?: undefined; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: { "arc-zonal-shift:ResourceIdentifier": string; "aws:RequestedRegion"?: undefined; }; StringLike?: undefined; "ForAllValues:StringEquals"?: undefined; }; })[]; }; /** * The same scoped controller policy, split into separate named documents — `nodeLifecycle`, * `iamIntegration`, `eksIntegration`, `resourceDiscovery`, and `zonalShift` — each meant to be * attached as its own managed policy. This keeps every managed policy under the IAM managed-policy * size quota even for clusters with long names (the cluster name is embedded repeatedly in the * tag-scoped conditions), mirroring upstream Karpenter (aws/karpenter-provider-aws#8690). */ export declare const KarpenterControllerPolicyV1Groups: (cluster: Cluster, partition: string, region: string) => Record; /** * Alias retained for backward compatibility. The controller IAM permissions are shared between the * v1beta1 and stable-v1 CRD generations. Prefer {@link KarpenterControllerPolicyV1Groups} for the * stable-v1 addon so the permissions are attached as multiple size-bounded managed policies. */ export declare const KarpenterControllerPolicyV1: (cluster: Cluster, partition: string, region: string) => { Version: string; Statement: ({ Sid: string; Effect: string; Resource: string[]; Action: string[]; Condition?: undefined; } | { Sid: string; Effect: string; Resource: string[]; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:RequestTag/karpenter.sh/nodepool": string; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string[]; Action: string; Condition: { StringEquals: CfnJson; StringLike: { "aws:RequestTag/karpenter.sh/nodepool": string; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.sh/nodepool": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals": { "aws:TagKeys": string[]; }; }; } | { Sid: string; Effect: string; Resource: string[]; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.sh/nodepool": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: { "aws:RequestedRegion": string; "arc-zonal-shift:ResourceIdentifier"?: undefined; }; StringLike?: undefined; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string; Condition?: undefined; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: CfnJson; StringLike: { "aws:ResourceTag/karpenter.k8s.aws/ec2nodeclass": string; "aws:RequestTag/karpenter.sh/nodepool"?: undefined; "aws:ResourceTag/karpenter.sh/nodepool"?: undefined; "aws:RequestTag/karpenter.k8s.aws/ec2nodeclass"?: undefined; }; "ForAllValues:StringEquals"?: undefined; }; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition?: undefined; } | { Sid: string; Effect: string; Resource: string; Action: string[]; Condition: { StringEquals: { "arc-zonal-shift:ResourceIdentifier": string; "aws:RequestedRegion"?: undefined; }; StringLike?: undefined; "ForAllValues:StringEquals"?: undefined; }; })[]; }; export {};