CfnAddonProps
- class aws_cdk.aws_eks.CfnAddonProps(*, addon_name, cluster_name, addon_version=None, configuration_values=None, preserve_on_delete=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.configuration_values (
Optional
[str
]) – The configuration values that you provided.preserve_on_delete (
Union
[bool
,IResolvable
,None
]) – Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn’t removed.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 as eks cfn_addon_props = eks.CfnAddonProps( addon_name="addonName", cluster_name="clusterName", # the properties below are optional addon_version="addonVersion", configuration_values="configurationValues", preserve_on_delete=False, resolve_conflicts="resolveConflicts", service_account_role_arn="serviceAccountRoleArn", tags=[CfnTag( key="key", value="value" )] )
Attributes
- addon_name
The name of the add-on.
- addon_version
The version of the add-on.
- cluster_name
The name of the cluster.
- configuration_values
The configuration values that you provided.
- preserve_on_delete
Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on.
If an IAM account is associated with the add-on, it isn’t removed.
- 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.
- 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* .
- 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.