addon#

State module for managing EKS Addon.

async idem_aws.states.aws.eks.addon.present(hub, ctx, name: str, cluster_name: str, addon_version: str, resource_id: str = None, service_account_role_arn: str = None, resolve_conflicts: str = 'OVERWRITE', tags: Dict[str, str] = None, timeout: Timeout = None) Dict[str, Any][source]#

Creates an Amazon EKS add-on.

Amazon EKS add-ons help to automate the provisioning and lifecycle management of common operational software for Amazon EKS clusters. Amazon EKS add-ons require clusters running version 1.18 or because Amazon EKS add-ons rely on the Server-side Apply Kubernetes feature, which is only available in Kubernetes 1.18 and later. For more information, see Amazon EKS add-ons in the Amazon EKS User Guide.

Parameters:
  • name (str) – An Idem name of the EKS addon resource.

  • resource_id (str, Optional) – AWS EKS addon name.

  • cluster_name (str) – The name of the cluster to create the add-on for

  • addon_version (str) – The version of the add-on. The version must match one of the versions returned by ` DescribeAddonVersions

  • service_account_role_arn (str, Optional) – 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.

  • resolve_conflicts (str, Optional) – How to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on

  • tags (dict, Optional) – The metadata to apply to the cluster to assist with categorization and organization. Each tag consists of a key and an Optional value. You define both

  • timeout (dict, Optional) –

    Timeout configuration for creating or updating addon.

    • create (dict):

      Timeout configuration for creating addon * delay(int, default=10): The amount of time in seconds to wait between attempts. * max_attempts(int, default=60): Customized timeout configuration containing delay and max attempts.

    • update (str):

      Timeout configuration for updating addon * delay(int, default=10): The amount of time in seconds to wait between attempts. * max_attempts(int, default=60): Customized timeout configuration containing delay and max attempts.

Request Syntax:
[eks-addon-name]:
  aws.eks.addon.present:
    - cluster_name: 'string'
    - addon_version: 'string'
    - resource_id: 'string'
    - service_account_role_arn: 'string'
    - resolve_conflicts: 'string'
    - tags:
      - 'string': 'string'
    - timeout:
      create:
        delay: 'integer'
        max_attempts: 'integer'
      update:
        delay: 'integer'
        max_attempts: 'integer
Returns:

Dict[str, Any]

Examples

kube-proxy:
  aws.eks.addon.present:
    - cluster_name: eks-12j44i4k
    - addon_version: v1.19.8-eksbuild.1
    - resource_id: kube-proxy
    - service_account_role_arn: arn:role-ejwew124
    - resolve_conflicts: "OVERWRITE"
    - tags:
      - Name: eks-addon-name
async idem_aws.states.aws.eks.addon.absent(hub, ctx, name: str, cluster_name: str = None, resource_id: str = None, preserve: bool = False, timeout: Dict = None) Dict[str, Any][source]#

Delete an Amazon EKS add-on.

When you remove the add-on, it will also be deleted from the cluster. You can always manually start an add-on on the cluster using the Kubernetes API.

Parameters:
  • name (str) – An Idem name of the EKS addon resource.

  • cluster_name (str, Optional) – The name of the cluster to delete the add-on from.

  • resource_id (str, Optional) – AWS EKS addon name. Idem automatically considers this resource being absent if this field is not specified.

  • preserve (bool, Optional) – 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 is not removed.

  • timeout (dict, Optional) –

    Timeout configuration for creating or updating cluster.

    • delete (dict):

      Timeout configuration for deleting cluster * delay: The amount of time in seconds to wait between attempts. * max_attempts: Customized timeout configuration containing delay and max attempts.

Request syntax:
[idem-eks-addon-name]:
  aws.eks.addon.absent:
    - cluster_name: 'string'
    - resource_id: 'string'
    - preserve: bool
Returns:

Dict[str, Any]

Examples

kube-proxy:
  aws.eks.addon.absent:
    - cluster_name: eks-cluster-1
    - resource_id: kube-proxy
    - preserve: True
async idem_aws.states.aws.eks.addon.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describe the resource in a way that can be recreated/managed with the corresponding “present” function

Lists the available add-ons.

Returns:

Dict[str, Any]

Examples

$ idem describe aws.eks.addon