CfnAddonProps

class aws_cdk.aws_eks_legacy.CfnAddonProps(*, addon_name, cluster_name, addon_version=None, resolve_conflicts=None, service_account_role_arn=None, tags=None)

Bases: object

Properties for defining a CfnAddon.

Parameters
  • addon_name (str) – The name of the add-on.

  • cluster_name (str) – The name of the cluster.

  • addon_version (Optional[str]) – The version of the add-on.

  • resolve_conflicts (Optional[str]) – How to resolve field value conflicts for an Amazon EKS add-on. Conflicts are handled based on the value you choose: - None – If the self-managed version of the add-on is installed on your cluster, Amazon EKS doesn’t change the value. Creation of the add-on might fail. - Overwrite – If the self-managed version of the add-on is installed on your cluster and the Amazon EKS default value is different than the existing value, Amazon EKS changes the value to the Amazon EKS default value. - Preserve – Not supported. You can set this value when updating an add-on though. For more information, see UpdateAddon . If you don’t currently have the self-managed version of the add-on installed on your cluster, the Amazon EKS add-on is installed. Amazon EKS sets all values to default values, regardless of the option that you specify.

  • service_account_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on’s service account. The role must be assigned the IAM permissions required by the add-on. If you don’t specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide . .. epigraph:: To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide .

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The metadata that you apply to the add-on to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Add-on tags do not propagate to any other resources associated with the cluster.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

cfn_addon_props = eks_legacy.CfnAddonProps(
    addon_name="addonName",
    cluster_name="clusterName",

    # the properties below are optional
    addon_version="addonVersion",
    resolve_conflicts="resolveConflicts",
    service_account_role_arn="serviceAccountRoleArn",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

addon_name

The name of the add-on.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html#cfn-eks-addon-addonname

Return type

str

addon_version

The version of the add-on.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html#cfn-eks-addon-addonversion

Return type

Optional[str]

cluster_name

The name of the cluster.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html#cfn-eks-addon-clustername

Return type

str

resolve_conflicts

How to resolve field value conflicts for an Amazon EKS add-on.

Conflicts are handled based on the value you choose:

  • None – If the self-managed version of the add-on is installed on your cluster, Amazon EKS doesn’t change the value. Creation of the add-on might fail.

  • Overwrite – If the self-managed version of the add-on is installed on your cluster and the Amazon EKS default value is different than the existing value, Amazon EKS changes the value to the Amazon EKS default value.

  • Preserve – Not supported. You can set this value when updating an add-on though. For more information, see UpdateAddon .

If you don’t currently have the self-managed version of the add-on installed on your cluster, the Amazon EKS add-on is installed. Amazon EKS sets all values to default values, regardless of the option that you specify.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html#cfn-eks-addon-resolveconflicts

Return type

Optional[str]

service_account_role_arn

The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on’s service account.

The role must be assigned the IAM permissions required by the add-on. If you don’t specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide . .. epigraph:

To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see `Enabling IAM roles for service accounts on your cluster <https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html>`_ in the *Amazon EKS User Guide* .
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html#cfn-eks-addon-serviceaccountrolearn

Return type

Optional[str]

tags

The metadata that you apply to the add-on to assist with categorization and organization.

Each tag consists of a key and an optional value, both of which you define. Add-on tags do not propagate to any other resources associated with the cluster.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html#cfn-eks-addon-tags

Return type

Optional[List[CfnTag]]