diff --git a/addons/kms-chart/Chart.yaml b/addons/kms-chart/Chart.yaml index 94ad9ff5d..4b483ee9a 100644 --- a/addons/kms-chart/Chart.yaml +++ b/addons/kms-chart/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: kms-chart description: A Helm chart for the ACK service controller for AWS Key Management Service (KMS) -version: 1.0.8 -appVersion: 1.0.8 +version: 1.2.0 +appVersion: 1.2.0 home: https://github.com/aws-controllers-k8s/kms-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/addons/kms-chart/crds/kms.services.k8s.aws_aliases.yaml b/addons/kms-chart/crds/kms.services.k8s.aws_aliases.yaml index 6752c3752..2f808df7a 100644 --- a/addons/kms-chart/crds/kms.services.k8s.aws_aliases.yaml +++ b/addons/kms-chart/crds/kms.services.k8s.aws_aliases.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.19.0 name: aliases.kms.services.k8s.aws spec: group: kms.services.k8s.aws @@ -21,14 +20,19 @@ spec: description: Alias is the Schema for the Aliases API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -36,37 +40,56 @@ spec: description: AliasSpec defines the desired state of Alias. properties: name: - description: "Specifies the alias name. This value must begin with - alias/ followed by a name, such as alias/ExampleAlias. \n The AliasName - value must be string of 1-256 characters. It can contain only alphanumeric - characters, forward slashes (/), underscores (_), and dashes (-). - The alias name cannot begin with alias/aws/. The alias/aws/ prefix - is reserved for Amazon Web Services managed keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk)." + description: |- + Specifies the alias name. This value must begin with alias/ followed by a + name, such as alias/ExampleAlias. + + Do not include confidential or sensitive information in this field. This + field may be displayed in plaintext in CloudTrail logs and other output. + + The AliasName value must be string of 1-256 characters. It can contain only + alphanumeric characters, forward slashes (/), underscores (_), and dashes + (-). The alias name cannot begin with alias/aws/. The alias/aws/ prefix is + reserved for Amazon Web Services managed keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk). + + Regex Pattern: `^[a-zA-Z0-9:/_-]+$` type: string targetKeyID: - description: "Associates the alias with the specified customer managed - key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). - The KMS key must be in the same Amazon Web Services Region. \n A - valid key ID is required. If you supply a null or empty string value, - this operation returns an error. \n For help finding the key ID - and ARN, see Finding the Key ID and ARN (https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) - in the Key Management Service Developer Guide . \n Specify the key - ID or key ARN of the KMS key. \n For example: \n - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - \n - Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - \n To get the key ID and key ARN for a KMS key, use ListKeys or - DescribeKey." + description: |- + Associates the alias with the specified customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). + The KMS key must be in the same Amazon Web Services Region. + + A valid key ID is required. If you supply a null or empty string value, this + operation returns an error. + + For help finding the key ID and ARN, see Finding the Key ID and ARN (https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) + in the Key Management Service Developer Guide . + + Specify the key ID or key ARN of the KMS key. + + For example: + + - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + + - Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + + To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. type: string targetKeyRef: description: "AWSResourceReferenceWrapper provides a wrapper around - *AWSResourceReference type to provide more user friendly syntax - for references using 'from' field Ex: APIIDRef: \n from: name: my-api" + *AWSResourceReference\ntype to provide more user friendly syntax + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t + \ name: my-api" properties: from: - description: AWSResourceReference provides all the values necessary - to reference another k8s resource for finding the identifier(Id/ARN/Name) + description: |- + AWSResourceReference provides all the values necessary to reference another + k8s resource for finding the identifier(Id/ARN/Name) properties: name: type: string + namespace: + type: string type: object type: object required: @@ -76,24 +99,25 @@ spec: description: AliasStatus defines the observed state of Alias properties: ackResourceMetadata: - description: All CRs managed by ACK have a common `Status.ACKResourceMetadata` - member that is used to contain resource sync state, account ownership, + description: |- + All CRs managed by ACK have a common `Status.ACKResourceMetadata` member + that is used to contain resource sync state, account ownership, constructed ARN for the resource properties: arn: - description: 'ARN is the Amazon Resource Name for the resource. - This is a globally-unique identifier and is set only by the - ACK service controller once the controller has orchestrated - the creation of the resource OR when it has verified that an - "adopted" resource (a resource where the ARN annotation was - set by the Kubernetes user on the CR) exists and matches the - supplied CR''s Spec field values. TODO(vijat@): Find a better - strategy for resources that do not have ARN in CreateOutputResponse - https://github.com/aws/aws-controllers-k8s/issues/270' + description: |- + ARN is the Amazon Resource Name for the resource. This is a + globally-unique identifier and is set only by the ACK service controller + once the controller has orchestrated the creation of the resource OR + when it has verified that an "adopted" resource (a resource where the + ARN annotation was set by the Kubernetes user on the CR) exists and + matches the supplied CR's Spec field values. + https://github.com/aws/aws-controllers-k8s/issues/270 type: string ownerAccountID: - description: OwnerAccountID is the AWS Account ID of the account - that owns the backend AWS service API resource. + description: |- + OwnerAccountID is the AWS Account ID of the account that owns the + backend AWS service API resource. type: string region: description: Region is the AWS region in which the resource exists @@ -104,14 +128,16 @@ spec: - region type: object conditions: - description: All CRS managed by ACK have a common `Status.Conditions` - member that contains a collection of `ackv1alpha1.Condition` objects - that describe the various terminal states of the CR and its backend - AWS service API resource + description: |- + All CRs managed by ACK have a common `Status.Conditions` member that + contains a collection of `ackv1alpha1.Condition` objects that describe + the various terminal states of the CR and its backend AWS service API + resource items: - description: Condition is the common struct used by all CRDs managed - by ACK service controllers to indicate terminal states of the - CR and its backend AWS service API resource + description: |- + Condition is the common struct used by all CRDs managed by ACK service + controllers to indicate terminal states of the CR and its backend AWS + service API resource properties: lastTransitionTime: description: Last time the condition transitioned from one status diff --git a/addons/kms-chart/crds/kms.services.k8s.aws_grants.yaml b/addons/kms-chart/crds/kms.services.k8s.aws_grants.yaml index 2a09ab5f0..c4faa1464 100644 --- a/addons/kms-chart/crds/kms.services.k8s.aws_grants.yaml +++ b/addons/kms-chart/crds/kms.services.k8s.aws_grants.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.19.0 name: grants.kms.services.k8s.aws spec: group: kms.services.k8s.aws @@ -21,14 +20,19 @@ spec: description: Grant is the Schema for the Grants API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -36,29 +40,36 @@ spec: description: GrantSpec defines the desired state of Grant. properties: constraints: - description: "Specifies a grant constraint. \n KMS supports the EncryptionContextEquals - and EncryptionContextSubset grant constraints. Each constraint value - can include up to 8 encryption context pairs. The encryption context - value in each constraint cannot exceed 384 characters. For information + description: |- + Specifies a grant constraint. + + Do not include confidential or sensitive information in this field. This + field may be displayed in plaintext in CloudTrail logs and other output. + + KMS supports the EncryptionContextEquals and EncryptionContextSubset grant + constraints, which allow the permissions in the grant only when the encryption + context in the request matches (EncryptionContextEquals) or includes (EncryptionContextSubset) + the encryption context specified in the constraint. + + The encryption context grant constraints are supported only on grant operations + (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations) + that include an EncryptionContext parameter, such as cryptographic operations + on symmetric encryption KMS keys. Grants with grant constraints can include + the DescribeKey and RetireGrant operations, but the constraint doesn't apply + to these operations. If a grant with a grant constraint includes the CreateGrant + operation, the constraint requires that any grants created with the CreateGrant + permission have an equally strict or stricter encryption context constraint. + + You cannot use an encryption context grant constraint for cryptographic operations + with asymmetric KMS keys or HMAC KMS keys. Operations with these keys don't + support an encryption context. + + Each constraint value can include up to 8 encryption context pairs. The encryption + context value in each constraint cannot exceed 384 characters. For information about grant constraints, see Using grant constraints (https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints) - in the Key Management Service Developer Guide. For more information - about encryption context, see Encryption context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) - in the Key Management Service Developer Guide . \n The encryption - context grant constraints allow the permissions in the grant only - when the encryption context in the request matches (EncryptionContextEquals) - or includes (EncryptionContextSubset) the encryption context specified - in this structure. \n The encryption context grant constraints are - supported only on grant operations (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations) - that include an EncryptionContext parameter, such as cryptographic - operations on symmetric encryption KMS keys. Grants with grant constraints - can include the DescribeKey and RetireGrant operations, but the - constraint doesn't apply to these operations. If a grant with a - grant constraint includes the CreateGrant operation, the constraint - requires that any grants created with the CreateGrant permission - have an equally strict or stricter encryption context constraint. - \n You cannot use an encryption context grant constraint for cryptographic - operations with asymmetric KMS keys or HMAC KMS keys. These keys - don't support an encryption context." + in the Key Management Service Developer Guide. For more information about + encryption context, see Encryption context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) + in the Key Management Service Developer Guide . properties: encryptionContextEquals: additionalProperties: @@ -70,88 +81,113 @@ spec: type: object type: object grantTokens: - description: "A list of grant tokens. \n Use a grant token when your - permission to call this operation comes from a new grant that has - not yet achieved eventual consistency. For more information, see - Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) + description: |- + A list of grant tokens. + + Use a grant token when your permission to call this operation comes from + a new grant that has not yet achieved eventual consistency. For more information, + see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token) - in the Key Management Service Developer Guide." + in the Key Management Service Developer Guide. items: type: string type: array granteePrincipal: - description: "The identity that gets the permissions specified in - the grant. \n To specify the principal, use the Amazon Resource - Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - of an Amazon Web Services principal. Valid Amazon Web Services principals - include Amazon Web Services accounts (root), IAM users, IAM roles, - federated users, and assumed role users. For examples of the ARN - syntax to use for specifying a principal, see Amazon Web Services - Identity and Access Management (IAM) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam) - in the Example ARNs section of the Amazon Web Services General Reference." + description: |- + The identity that gets the permissions specified in the grant. + + To specify the grantee principal, use the Amazon Resource Name (ARN) of an + Amazon Web Services principal. Valid principals include Amazon Web Services + accounts, IAM users, IAM roles, federated users, and assumed role users. + For help with the ARN syntax for a principal, see IAM ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns) + in the Identity and Access Management User Guide . + + Regex Pattern: `^[\w+=,.@:/-]+$` type: string keyID: - description: "Identifies the KMS key for the grant. The grant gives - principals permission to use this KMS key. \n Specify the key ID - or key ARN of the KMS key. To specify a KMS key in a different Amazon - Web Services account, you must use the key ARN. \n For example: - \n - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab \n - Key ARN: - arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - \n To get the key ID and key ARN for a KMS key, use ListKeys or - DescribeKey." + description: |- + Identifies the KMS key for the grant. The grant gives principals permission + to use this KMS key. + + Specify the key ID or key ARN of the KMS key. To specify a KMS key in adifferent + Amazon Web Services account, you must use the key ARN. + + For example: + + - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + + - Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + + To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. type: string keyRef: description: "AWSResourceReferenceWrapper provides a wrapper around - *AWSResourceReference type to provide more user friendly syntax - for references using 'from' field Ex: APIIDRef: \n from: name: my-api" + *AWSResourceReference\ntype to provide more user friendly syntax + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t + \ name: my-api" properties: from: - description: AWSResourceReference provides all the values necessary - to reference another k8s resource for finding the identifier(Id/ARN/Name) + description: |- + AWSResourceReference provides all the values necessary to reference another + k8s resource for finding the identifier(Id/ARN/Name) properties: name: type: string + namespace: + type: string type: object type: object name: - description: "A friendly name for the grant. Use this value to prevent - the unintended creation of duplicate grants when retrying this request. - \n When this value is absent, all CreateGrant requests result in - a new grant with a unique GrantId even if all the supplied parameters - are identical. This can result in unintended duplicates when you - retry the CreateGrant request. \n When this value is present, you - can retry a CreateGrant request with identical parameters; if the - grant already exists, the original GrantId is returned without creating - a new grant. Note that the returned grant token is unique with every - CreateGrant request, even when a duplicate GrantId is returned. - All grant tokens for the same grant ID can be used interchangeably." + description: |- + A friendly name for the grant. Use this value to prevent the unintended creation + of duplicate grants when retrying this request. + + Do not include confidential or sensitive information in this field. This + field may be displayed in plaintext in CloudTrail logs and other output. + + When this value is absent, all CreateGrant requests result in a new grant + with a unique GrantId even if all the supplied parameters are identical. + This can result in unintended duplicates when you retry the CreateGrant request. + + When this value is present, you can retry a CreateGrant request with identical + parameters; if the grant already exists, the original GrantId is returned + without creating a new grant. Note that the returned grant token is unique + with every CreateGrant request, even when a duplicate GrantId is returned. + All grant tokens for the same grant ID can be used interchangeably. + + Regex Pattern: `^[a-zA-Z0-9:/_-]+$` type: string operations: - description: "A list of operations that the grant permits. \n This - list must include only operations that are permitted in a grant. - Also, the operation must be supported on the KMS key. For example, - you cannot create a grant for a symmetric encryption KMS key that - allows the Sign operation, or a grant for an asymmetric KMS key - that allows the GenerateDataKey operation. If you try, KMS returns - a ValidationError exception. For details, see Grant operations (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations) - in the Key Management Service Developer Guide." + description: |- + A list of operations that the grant permits. + + This list must include only operations that are permitted in a grant. Also, + the operation must be supported on the KMS key. For example, you cannot create + a grant for a symmetric encryption KMS key that allows the Sign operation, + or a grant for an asymmetric KMS key that allows the GenerateDataKey operation. + If you try, KMS returns a ValidationError exception. For details, see Grant + operations (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations) + in the Key Management Service Developer Guide. items: type: string type: array retiringPrincipal: - description: "The principal that has permission to use the RetireGrant - operation to retire the grant. \n To specify the principal, use - the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - of an Amazon Web Services principal. Valid Amazon Web Services principals - include Amazon Web Services accounts (root), IAM users, federated - users, and assumed role users. For examples of the ARN syntax to - use for specifying a principal, see Amazon Web Services Identity - and Access Management (IAM) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam) - in the Example ARNs section of the Amazon Web Services General Reference. - \n The grant determines the retiring principal. Other principals - might have permission to retire the grant or revoke the grant. For - details, see RevokeGrant and Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete) - in the Key Management Service Developer Guide." + description: |- + The principal that has permission to use the RetireGrant operation to retire + the grant. + + To specify the principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + of an Amazon Web Services principal. Valid principals include Amazon Web + Services accounts, IAM users, IAM roles, federated users, and assumed role + users. For help with the ARN syntax for a principal, see IAM ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns) + in the Identity and Access Management User Guide . + + The grant determines the retiring principal. Other principals might have + permission to retire the grant or revoke the grant. For details, see RevokeGrant + and Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete) + in the Key Management Service Developer Guide. + + Regex Pattern: `^[\w+=,.@:/-]+$` type: string required: - granteePrincipal @@ -161,24 +197,25 @@ spec: description: GrantStatus defines the observed state of Grant properties: ackResourceMetadata: - description: All CRs managed by ACK have a common `Status.ACKResourceMetadata` - member that is used to contain resource sync state, account ownership, + description: |- + All CRs managed by ACK have a common `Status.ACKResourceMetadata` member + that is used to contain resource sync state, account ownership, constructed ARN for the resource properties: arn: - description: 'ARN is the Amazon Resource Name for the resource. - This is a globally-unique identifier and is set only by the - ACK service controller once the controller has orchestrated - the creation of the resource OR when it has verified that an - "adopted" resource (a resource where the ARN annotation was - set by the Kubernetes user on the CR) exists and matches the - supplied CR''s Spec field values. TODO(vijat@): Find a better - strategy for resources that do not have ARN in CreateOutputResponse - https://github.com/aws/aws-controllers-k8s/issues/270' + description: |- + ARN is the Amazon Resource Name for the resource. This is a + globally-unique identifier and is set only by the ACK service controller + once the controller has orchestrated the creation of the resource OR + when it has verified that an "adopted" resource (a resource where the + ARN annotation was set by the Kubernetes user on the CR) exists and + matches the supplied CR's Spec field values. + https://github.com/aws/aws-controllers-k8s/issues/270 type: string ownerAccountID: - description: OwnerAccountID is the AWS Account ID of the account - that owns the backend AWS service API resource. + description: |- + OwnerAccountID is the AWS Account ID of the account that owns the + backend AWS service API resource. type: string region: description: Region is the AWS region in which the resource exists @@ -189,14 +226,16 @@ spec: - region type: object conditions: - description: All CRS managed by ACK have a common `Status.Conditions` - member that contains a collection of `ackv1alpha1.Condition` objects - that describe the various terminal states of the CR and its backend - AWS service API resource + description: |- + All CRs managed by ACK have a common `Status.Conditions` member that + contains a collection of `ackv1alpha1.Condition` objects that describe + the various terminal states of the CR and its backend AWS service API + resource items: - description: Condition is the common struct used by all CRDs managed - by ACK service controllers to indicate terminal states of the - CR and its backend AWS service API resource + description: |- + Condition is the common struct used by all CRDs managed by ACK service + controllers to indicate terminal states of the CR and its backend AWS + service API resource properties: lastTransitionTime: description: Last time the condition transitioned from one status @@ -222,15 +261,20 @@ spec: type: object type: array grantID: - description: "The unique identifier for the grant. \n You can use - the GrantId in a ListGrants, RetireGrant, or RevokeGrant operation." + description: |- + The unique identifier for the grant. + + You can use the GrantId in a ListGrants, RetireGrant, or RevokeGrant operation. type: string grantToken: - description: "The grant token. \n Use a grant token when your permission - to call this operation comes from a new grant that has not yet achieved - eventual consistency. For more information, see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) + description: |- + The grant token. + + Use a grant token when your permission to call this operation comes from + a new grant that has not yet achieved eventual consistency. For more information, + see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token) - in the Key Management Service Developer Guide." + in the Key Management Service Developer Guide. type: string type: object type: object diff --git a/addons/kms-chart/crds/kms.services.k8s.aws_keys.yaml b/addons/kms-chart/crds/kms.services.k8s.aws_keys.yaml index a403afad2..9cb9faa45 100644 --- a/addons/kms-chart/crds/kms.services.k8s.aws_keys.yaml +++ b/addons/kms-chart/crds/kms.services.k8s.aws_keys.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.19.0 name: keys.kms.services.k8s.aws spec: group: kms.services.k8s.aws @@ -21,14 +20,19 @@ spec: description: Key is the Schema for the Keys API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -36,177 +40,249 @@ spec: description: KeySpec defines the desired state of Key. properties: bypassPolicyLockoutSafetyCheck: - description: "A flag to indicate whether to bypass the key policy - lockout safety check. \n Setting this value to true increases the - risk that the KMS key becomes unmanageable. Do not set this value - to true indiscriminately. \n For more information, refer to the - scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) - section in the Key Management Service Developer Guide . \n Use this - parameter only when you include a policy in the request and you - intend to prevent the principal that is making the request from - making a subsequent PutKeyPolicy request on the KMS key. \n The - default value is false." + description: |- + Skips ("bypasses") the key policy lockout safety check. The default value + is false. + + Setting this value to true increases the risk that the KMS key becomes unmanageable. + Do not set this value to true indiscriminately. + + For more information, see Default key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key) + in the Key Management Service Developer Guide. + + Use this parameter only when you intend to prevent the principal that is + making the request from making a subsequent PutKeyPolicy (https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html) + request on the KMS key. type: boolean customKeyStoreID: - description: "Creates the KMS key in the specified custom key store - (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) - and the key material in its associated CloudHSM cluster. To create - a KMS key in a custom key store, you must also specify the Origin - parameter with a value of AWS_CLOUDHSM. The CloudHSM cluster that - is associated with the custom key store must have at least two active - HSMs, each in a different Availability Zone in the Region. \n This - parameter is valid only for symmetric encryption KMS keys in a single - Region. You cannot create any other type of KMS key in a custom - key store. \n To find the ID of a custom key store, use the DescribeCustomKeyStores - operation. \n The response includes the custom key store ID and - the ID of the CloudHSM cluster. \n This operation is part of the - custom key store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) - feature in KMS, which combines the convenience and extensive integration - of KMS with the isolation and control of a single-tenant key store." + description: |- + Creates the KMS key in the specified custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). + The ConnectionState of the custom key store must be CONNECTED. To find the + CustomKeyStoreID and ConnectionState use the DescribeCustomKeyStores operation. + + This parameter is valid only for symmetric encryption KMS keys in a single + Region. You cannot create any other type of KMS key in a custom key store. + + When you create a KMS key in an CloudHSM key store, KMS generates a non-exportable + 256-bit symmetric key in its associated CloudHSM cluster and associates it + with the KMS key. When you create a KMS key in an external key store, you + must use the XksKeyId parameter to specify an external key that serves as + key material for the KMS key. type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf description: - description: "A description of the KMS key. \n Use a description that - helps you decide whether the KMS key is appropriate for a task. - The default value is an empty string (no description). \n To set - or change the description after the key is created, use UpdateKeyDescription." + description: |- + A description of the KMS key. Use a description that helps you decide whether + the KMS key is appropriate for a task. The default value is an empty string + (no description). + + Do not include confidential or sensitive information in this field. This + field may be displayed in plaintext in CloudTrail logs and other output. + + To set or change the description after the key is created, use UpdateKeyDescription. type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf enableKeyRotation: type: boolean keySpec: - description: "Specifies the type of KMS key to create. The default - value, SYMMETRIC_DEFAULT, creates a KMS key with a 256-bit AES-GCM - key that is used for encryption and decryption, except in China - Regions, where it creates a 128-bit symmetric key that uses SM4 - encryption. For help choosing a key spec for your KMS key, see Choosing - a KMS key type (https://docs.aws.amazon.com/kms/latest/developerguide/key-types.html#symm-asymm-choose) - in the Key Management Service Developer Guide . \n The KeySpec determines - whether the KMS key contains a symmetric key or an asymmetric key - pair. It also determines the cryptographic algorithms that the KMS - key supports. You can't change the KeySpec after the KMS key is - created. To further restrict the algorithms that can be used with - the KMS key, use a condition key in its key policy or IAM policy. - For more information, see kms:EncryptionAlgorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm), + description: |- + Specifies the type of KMS key to create. The default value, SYMMETRIC_DEFAULT, + creates a KMS key with a 256-bit AES-GCM key that is used for encryption + and decryption, except in China Regions, where it creates a 128-bit symmetric + key that uses SM4 encryption. For help choosing a key spec for your KMS key, + see Choosing a KMS key type (https://docs.aws.amazon.com/kms/latest/developerguide/key-types.html#symm-asymm-choose) + in the Key Management Service Developer Guide . + + The KeySpec determines whether the KMS key contains a symmetric key or an + asymmetric key pair. It also determines the algorithms that the KMS key supports. + You can't change the KeySpec after the KMS key is created. To further restrict + the algorithms that can be used with the KMS key, use a condition key in + its key policy or IAM policy. For more information, see kms:EncryptionAlgorithm + (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm), kms:MacAlgorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-mac-algorithm) or kms:Signing Algorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm) - in the Key Management Service Developer Guide . \n Amazon Web Services - services that are integrated with KMS (http://aws.amazon.com/kms/features/#AWS_Service_Integration) - use symmetric encryption KMS keys to protect your data. These services - do not support asymmetric KMS keys or HMAC KMS keys. \n KMS supports - the following key specs for KMS keys: \n - Symmetric encryption - key (default) SYMMETRIC_DEFAULT \n - HMAC keys (symmetric) HMAC_224 - HMAC_256 HMAC_384 HMAC_512 \n - Asymmetric RSA key pairs RSA_2048 - RSA_3072 RSA_4096 \n - Asymmetric NIST-recommended elliptic curve - key pairs ECC_NIST_P256 (secp256r1) ECC_NIST_P384 (secp384r1) ECC_NIST_P521 - (secp521r1) \n - Other asymmetric elliptic curve key pairs ECC_SECG_P256K1 - (secp256k1), commonly used for cryptocurrencies. \n - SM2 key pairs - (China Regions only) SM2" + in the Key Management Service Developer Guide . + + Amazon Web Services services that are integrated with KMS (http://aws.amazon.com/kms/features/#AWS_Service_Integration) + use symmetric encryption KMS keys to protect your data. These services do + not support asymmetric KMS keys or HMAC KMS keys. + + KMS supports the following key specs for KMS keys: + + - Symmetric encryption key (default) SYMMETRIC_DEFAULT + + - HMAC keys (symmetric) HMAC_224 HMAC_256 HMAC_384 HMAC_512 + + - Asymmetric RSA key pairs (encryption and decryption -or- signing and + verification) RSA_2048 RSA_3072 RSA_4096 + + - Asymmetric NIST-recommended elliptic curve key pairs (signing and verification + -or- deriving shared secrets) ECC_NIST_P256 (secp256r1) ECC_NIST_P384 + (secp384r1) ECC_NIST_P521 (secp521r1) + + - Other asymmetric elliptic curve key pairs (signing and verification) + ECC_SECG_P256K1 (secp256k1), commonly used for cryptocurrencies. + + - SM2 key pairs (encryption and decryption -or- signing and verification + -or- deriving shared secrets) SM2 (China Regions only) type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf keyUsage: - description: "Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) + description: |- + Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is ENCRYPT_DECRYPT. - This parameter is optional when you are creating a symmetric encryption - KMS key; otherwise, it is required. You can't change the KeyUsage - value after the KMS key is created. \n Select only one valid value. - \n - For symmetric encryption KMS keys, omit the parameter or specify - ENCRYPT_DECRYPT. \n - For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC. - \n - For asymmetric KMS keys with RSA key material, specify ENCRYPT_DECRYPT - or SIGN_VERIFY. \n - For asymmetric KMS keys with ECC key material, - specify SIGN_VERIFY. \n - For asymmetric KMS keys with SM2 key material - (China Regions only), specify ENCRYPT_DECRYPT or SIGN_VERIFY." + This parameter is optional when you are creating a symmetric encryption KMS + key; otherwise, it is required. You can't change the KeyUsage value after + the KMS key is created. + + Select only one valid value. + + - For symmetric encryption KMS keys, omit the parameter or specify ENCRYPT_DECRYPT. + + - For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC. + + - For asymmetric KMS keys with RSA key pairs, specify ENCRYPT_DECRYPT + or SIGN_VERIFY. + + - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, + specify SIGN_VERIFY or KEY_AGREEMENT. + + - For asymmetric KMS keys with ECC_SECG_P256K1 key pairs specify SIGN_VERIFY. + + - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify + ENCRYPT_DECRYPT, SIGN_VERIFY, or KEY_AGREEMENT. type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf multiRegion: - description: "Creates a multi-Region primary key that you can replicate - into other Amazon Web Services Regions. You cannot change this value - after you create the KMS key. \n For a multi-Region key, set this - parameter to True. For a single-Region KMS key, omit this parameter - or set it to False. The default value is False. \n This operation - supports multi-Region keys, an KMS feature that lets you create - multiple interoperable KMS keys in different Amazon Web Services - Regions. Because these KMS keys have the same key ID, key material, - and other metadata, you can use them interchangeably to encrypt - data in one Amazon Web Services Region and decrypt it in a different - Amazon Web Services Region without re-encrypting the data or making - a cross-Region call. For more information about multi-Region keys, - see Multi-Region keys in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) - in the Key Management Service Developer Guide. \n This value creates - a primary key, not a replica. To create a replica key, use the ReplicateKey - operation. \n You can create a multi-Region version of a symmetric - encryption KMS key, an HMAC KMS key, an asymmetric KMS key, or a - KMS key with imported key material. However, you cannot create a - multi-Region key in a custom key store." + description: |- + Creates a multi-Region primary key that you can replicate into other Amazon + Web Services Regions. You cannot change this value after you create the KMS + key. + + For a multi-Region key, set this parameter to True. For a single-Region KMS + key, omit this parameter or set it to False. The default value is False. + + This operation supports multi-Region keys, an KMS feature that lets you create + multiple interoperable KMS keys in different Amazon Web Services Regions. + Because these KMS keys have the same key ID, key material, and other metadata, + you can use them interchangeably to encrypt data in one Amazon Web Services + Region and decrypt it in a different Amazon Web Services Region without re-encrypting + the data or making a cross-Region call. For more information about multi-Region + keys, see Multi-Region keys in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) + in the Key Management Service Developer Guide. + + This value creates a primary key, not a replica. To create a replica key, + use the ReplicateKey operation. + + You can create a symmetric or asymmetric multi-Region key, and you can create + a multi-Region key with imported key material. However, you cannot create + a multi-Region key in a custom key store. type: boolean + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf origin: - description: "The source of the key material for the KMS key. You - cannot change the origin after you create the KMS key. The default - is AWS_KMS, which means that KMS creates the key material. \n To - create a KMS key with no key material (for imported key material), - set the value to EXTERNAL. For more information about importing - key material into KMS, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) - in the Key Management Service Developer Guide. This value is valid - only for symmetric encryption KMS keys. \n To create a KMS key in - an KMS custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) - and create its key material in the associated CloudHSM cluster, - set this value to AWS_CLOUDHSM. You must also use the CustomKeyStoreId - parameter to identify the custom key store. This value is valid - only for symmetric encryption KMS keys." + description: |- + The source of the key material for the KMS key. You cannot change the origin + after you create the KMS key. The default is AWS_KMS, which means that KMS + creates the key material. + + To create a KMS key with no key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) + (for imported key material), set this value to EXTERNAL. For more information + about importing key material into KMS, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) + in the Key Management Service Developer Guide. The EXTERNAL origin value + is valid only for symmetric KMS keys. + + To create a KMS key in an CloudHSM key store (https://docs.aws.amazon.com/kms/latest/developerguide/create-cmk-keystore.html) + and create its key material in the associated CloudHSM cluster, set this + value to AWS_CLOUDHSM. You must also use the CustomKeyStoreId parameter to + identify the CloudHSM key store. The KeySpec value must be SYMMETRIC_DEFAULT. + + To create a KMS key in an external key store (https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keys.html), + set this value to EXTERNAL_KEY_STORE. You must also use the CustomKeyStoreId + parameter to identify the external key store and the XksKeyId parameter to + identify the associated external key. The KeySpec value must be SYMMETRIC_DEFAULT. type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf policy: - description: "The key policy to attach to the KMS key. If you do not - specify a key policy, KMS attaches a default key policy to the KMS - key. For more information, see Default key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) - in the Key Management Service Developer Guide. \n If you provide - a key policy, it must meet the following criteria: \n - If you don't - set BypassPolicyLockoutSafetyCheck to True, the key policy must - allow the principal that is making the CreateKey request to make - a subsequent PutKeyPolicy request on the KMS key. This reduces the - risk that the KMS key becomes unmanageable. For more information, - refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) - section of the Key Management Service Developer Guide . \n - Each - statement in the key policy must contain one or more principals. - The principals in the key policy must exist and be visible to KMS. - When you create a new Amazon Web Services principal (for example, - an IAM user or role), you might need to enforce a delay before including - the new principal in a key policy because the new principal might - not be immediately visible to KMS. For more information, see Changes - that I make are not always immediately visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) - in the Amazon Web Services Identity and Access Management User Guide. - \n A key policy document can include only the following characters: - \n - Printable ASCII characters from the space character (\\u0020) - through the end of the ASCII character range. \n - Printable characters - in the Basic Latin and Latin-1 Supplement character set (through - \\u00FF). \n - The tab (\\u0009), line feed (\\u000A), and carriage - return (\\u000D) special characters \n For information about key - policies, see Key policies in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) - in the Key Management Service Developer Guide. For help writing - and formatting a JSON policy document, see the IAM JSON Policy Reference - (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) - in the Identity and Access Management User Guide ." + description: |- + The key policy to attach to the KMS key. + + If you provide a key policy, it must meet the following criteria: + + - The key policy must allow the calling principal to make a subsequent + PutKeyPolicy request on the KMS key. This reduces the risk that the KMS + key becomes unmanageable. For more information, see Default key policy + (https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key) + in the Key Management Service Developer Guide. (To omit this condition, + set BypassPolicyLockoutSafetyCheck to true.) + + - Each statement in the key policy must contain one or more principals. + The principals in the key policy must exist and be visible to KMS. When + you create a new Amazon Web Services principal, you might need to enforce + a delay before including the new principal in a key policy because the + new principal might not be immediately visible to KMS. For more information, + see Changes that I make are not always immediately visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) + in the Amazon Web Services Identity and Access Management User Guide. + + If you do not provide a key policy, KMS attaches a default key policy to + the KMS key. For more information, see Default key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) + in the Key Management Service Developer Guide. + + The key policy size quota is 32 kilobytes (32768 bytes). + + For help writing and formatting a JSON policy document, see the IAM JSON + Policy Reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) + in the Identity and Access Management User Guide . + + Regex Pattern: `^[\u0009\u000A\u000D\u0020-\u00FF]+$` type: string tags: - description: "Assigns one or more tags to the KMS key. Use this parameter - to tag the KMS key when it is created. To tag an existing KMS key, - use the TagResource operation. \n Tagging or untagging a KMS key - can allow or deny permission to the KMS key. For details, see ABAC - in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) - in the Key Management Service Developer Guide. \n To use this parameter, - you must have kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) - permission in an IAM policy. \n Each tag consists of a tag key and - a tag value. Both the tag key and the tag value are required, but - the tag value can be an empty (null) string. You cannot have more - than one tag on a KMS key with the same tag key. If you specify - an existing tag key with a different tag value, KMS replaces the - current tag value with the specified one. \n When you add tags to - an Amazon Web Services resource, Amazon Web Services generates a - cost allocation report with usage and costs aggregated by tags. - Tags can also be used to control access to a KMS key. For details, - see Tagging Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html)." + description: |- + Assigns one or more tags to the KMS key. Use this parameter to tag the KMS + key when it is created. To tag an existing KMS key, use the TagResource operation. + + Do not include confidential or sensitive information in this field. This + field may be displayed in plaintext in CloudTrail logs and other output. + + Tagging or untagging a KMS key can allow or deny permission to the KMS key. + For details, see ABAC for KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) + in the Key Management Service Developer Guide. + + To use this parameter, you must have kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) + permission in an IAM policy. + + Each tag consists of a tag key and a tag value. Both the tag key and the + tag value are required, but the tag value can be an empty (null) string. + You cannot have more than one tag on a KMS key with the same tag key. If + you specify an existing tag key with a different tag value, KMS replaces + the current tag value with the specified one. + + When you add tags to an Amazon Web Services resource, Amazon Web Services + generates a cost allocation report with usage and costs aggregated by tags. + Tags can also be used to control access to a KMS key. For details, see Tagging + Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). items: - description: "A key-value pair. A tag consists of a tag key and - a tag value. Tag keys and tag values are both required, but tag - values can be empty (null) strings. \n For information about the - rules that apply to tag keys and tag values, see User-Defined - Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) - in the Amazon Web Services Billing and Cost Management User Guide." + description: |- + A key-value pair. A tag consists of a tag key and a tag value. Tag keys and + tag values are both required, but tag values can be empty (null) strings. + + Do not include confidential or sensitive information in this field. This + field may be displayed in plaintext in CloudTrail logs and other output. + + For information about the rules that apply to tag keys and tag values, see + User-Defined Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) + in the Amazon Web Services Billing and Cost Management User Guide. properties: tagKey: type: string @@ -219,24 +295,25 @@ spec: description: KeyStatus defines the observed state of Key properties: ackResourceMetadata: - description: All CRs managed by ACK have a common `Status.ACKResourceMetadata` - member that is used to contain resource sync state, account ownership, + description: |- + All CRs managed by ACK have a common `Status.ACKResourceMetadata` member + that is used to contain resource sync state, account ownership, constructed ARN for the resource properties: arn: - description: 'ARN is the Amazon Resource Name for the resource. - This is a globally-unique identifier and is set only by the - ACK service controller once the controller has orchestrated - the creation of the resource OR when it has verified that an - "adopted" resource (a resource where the ARN annotation was - set by the Kubernetes user on the CR) exists and matches the - supplied CR''s Spec field values. TODO(vijat@): Find a better - strategy for resources that do not have ARN in CreateOutputResponse - https://github.com/aws/aws-controllers-k8s/issues/270' + description: |- + ARN is the Amazon Resource Name for the resource. This is a + globally-unique identifier and is set only by the ACK service controller + once the controller has orchestrated the creation of the resource OR + when it has verified that an "adopted" resource (a resource where the + ARN annotation was set by the Kubernetes user on the CR) exists and + matches the supplied CR's Spec field values. + https://github.com/aws/aws-controllers-k8s/issues/270 type: string ownerAccountID: - description: OwnerAccountID is the AWS Account ID of the account - that owns the backend AWS service API resource. + description: |- + OwnerAccountID is the AWS Account ID of the account that owns the + backend AWS service API resource. type: string region: description: Region is the AWS region in which the resource exists @@ -247,26 +324,31 @@ spec: - region type: object awsAccountID: - description: The twelve-digit account ID of the Amazon Web Services - account that owns the KMS key. + description: |- + The twelve-digit account ID of the Amazon Web Services account that owns + the KMS key. type: string cloudHsmClusterID: - description: The cluster ID of the CloudHSM cluster that contains - the key material for the KMS key. When you create a KMS key in a - custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html), - KMS creates the key material for the KMS key in the associated CloudHSM - cluster. This value is present only when the KMS key is created - in a custom key store. + description: |- + The cluster ID of the CloudHSM cluster that contains the key material for + the KMS key. When you create a KMS key in an CloudHSM custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html), + KMS creates the key material for the KMS key in the associated CloudHSM cluster. + This field is present only when the KMS key is created in an CloudHSM key + store. + + Regex Pattern: `^cluster-[2-7a-zA-Z]{11,16}$` type: string conditions: - description: All CRS managed by ACK have a common `Status.Conditions` - member that contains a collection of `ackv1alpha1.Condition` objects - that describe the various terminal states of the CR and its backend - AWS service API resource + description: |- + All CRs managed by ACK have a common `Status.Conditions` member that + contains a collection of `ackv1alpha1.Condition` objects that describe + the various terminal states of the CR and its backend AWS service API + resource items: - description: Condition is the common struct used by all CRDs managed - by ACK service controllers to indicate terminal states of the - CR and its backend AWS service API resource + description: |- + Condition is the common struct used by all CRDs managed by ACK service + controllers to indicate terminal states of the CR and its backend AWS + service API resource properties: lastTransitionTime: description: Last time the condition transitioned from one status @@ -296,65 +378,76 @@ spec: format: date-time type: string deletionDate: - description: "The date and time after which KMS deletes this KMS key. - This value is present only when the KMS key is scheduled for deletion, - that is, when its KeyState is PendingDeletion. \n When the primary - key in a multi-Region key is scheduled for deletion but still has - replica keys, its key state is PendingReplicaDeletion and the length - of its waiting period is displayed in the PendingDeletionWindowInDays - field." + description: |- + The date and time after which KMS deletes this KMS key. This value is present + only when the KMS key is scheduled for deletion, that is, when its KeyState + is PendingDeletion. + + When the primary key in a multi-Region key is scheduled for deletion but + still has replica keys, its key state is PendingReplicaDeletion and the length + of its waiting period is displayed in the PendingDeletionWindowInDays field. format: date-time type: string enabled: - description: Specifies whether the KMS key is enabled. When KeyState - is Enabled this value is true, otherwise it is false. + description: |- + Specifies whether the KMS key is enabled. When KeyState is Enabled this value + is true, otherwise it is false. type: boolean encryptionAlgorithms: - description: "The encryption algorithms that the KMS key supports. - You cannot use the KMS key with other encryption algorithms within - KMS. \n This value is present only when the KeyUsage of the KMS - key is ENCRYPT_DECRYPT." + description: |- + The encryption algorithms that the KMS key supports. You cannot use the KMS + key with other encryption algorithms within KMS. + + This value is present only when the KeyUsage of the KMS key is ENCRYPT_DECRYPT. items: type: string type: array expirationModel: - description: Specifies whether the KMS key's key material expires. - This value is present only when Origin is EXTERNAL, otherwise this - value is omitted. + description: |- + Specifies whether the KMS key's key material expires. This value is present + only when Origin is EXTERNAL, otherwise this value is omitted. type: string keyID: description: The globally unique identifier for the KMS key. type: string keyManager: - description: The manager of the KMS key. KMS keys in your Amazon Web - Services account are either customer managed or Amazon Web Services - managed. For more information about the difference, see KMS keys - (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) + description: |- + The manager of the KMS key. KMS keys in your Amazon Web Services account + are either customer managed or Amazon Web Services managed. For more information + about the difference, see KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) in the Key Management Service Developer Guide. type: string keyState: - description: "The current status of the KMS key. \n For more information - about how key state affects the use of a KMS key, see Key states - of KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) - in the Key Management Service Developer Guide." + description: |- + The current status of the KMS key. + + For more information about how key state affects the use of a KMS key, see + Key states of KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) + in the Key Management Service Developer Guide. type: string macAlgorithms: - description: "The message authentication code (MAC) algorithm that - the HMAC KMS key supports. \n This value is present only when the - KeyUsage of the KMS key is GENERATE_VERIFY_MAC." + description: |- + The message authentication code (MAC) algorithm that the HMAC KMS key supports. + + This value is present only when the KeyUsage of the KMS key is GENERATE_VERIFY_MAC. items: type: string type: array multiRegionConfiguration: - description: "Lists the primary and replica keys in same multi-Region - key. This field is present only when the value of the MultiRegion - field is True. \n For more information about any listed KMS key, - use the DescribeKey operation. \n * MultiRegionKeyType indicates - whether the KMS key is a PRIMARY or REPLICA key. \n * PrimaryKey - displays the key ARN and Region of the primary key. This field displays - the current KMS key if it is the primary key. \n * ReplicaKeys displays - the key ARNs and Regions of all replica keys. This field includes - the current KMS key if it is a replica key." + description: |- + Lists the primary and replica keys in same multi-Region key. This field is + present only when the value of the MultiRegion field is True. + + For more information about any listed KMS key, use the DescribeKey operation. + + * MultiRegionKeyType indicates whether the KMS key is a PRIMARY or REPLICA + key. + + * PrimaryKey displays the key ARN and Region of the primary key. This + field displays the current KMS key if it is the primary key. + + * ReplicaKeys displays the key ARNs and Regions of all replica keys. This + field includes the current KMS key if it is a replica key. properties: multiRegionKeyType: type: string @@ -380,36 +473,37 @@ spec: type: array type: object pendingDeletionWindowInDays: - description: "The waiting period before the primary key in a multi-Region - key is deleted. This waiting period begins when the last of its - replica keys is deleted. This value is present only when the KeyState - of the KMS key is PendingReplicaDeletion. That indicates that the - KMS key is the primary key in a multi-Region key, it is scheduled - for deletion, and it still has existing replica keys. \n When a - single-Region KMS key or a multi-Region replica key is scheduled - for deletion, its deletion date is displayed in the DeletionDate - field. However, when the primary key in a multi-Region key is scheduled - for deletion, its waiting period doesn't begin until all of its - replica keys are deleted. This value displays that waiting period. - When the last replica key in the multi-Region key is deleted, the - KeyState of the scheduled primary key changes from PendingReplicaDeletion - to PendingDeletion and the deletion date appears in the DeletionDate - field." + description: |- + The waiting period before the primary key in a multi-Region key is deleted. + This waiting period begins when the last of its replica keys is deleted. + This value is present only when the KeyState of the KMS key is PendingReplicaDeletion. + That indicates that the KMS key is the primary key in a multi-Region key, + it is scheduled for deletion, and it still has existing replica keys. + + When a single-Region KMS key or a multi-Region replica key is scheduled for + deletion, its deletion date is displayed in the DeletionDate field. However, + when the primary key in a multi-Region key is scheduled for deletion, its + waiting period doesn't begin until all of its replica keys are deleted. This + value displays that waiting period. When the last replica key in the multi-Region + key is deleted, the KeyState of the scheduled primary key changes from PendingReplicaDeletion + to PendingDeletion and the deletion date appears in the DeletionDate field. format: int64 type: integer signingAlgorithms: - description: "The signing algorithms that the KMS key supports. You - cannot use the KMS key with other signing algorithms within KMS. - \n This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY." + description: |- + The signing algorithms that the KMS key supports. You cannot use the KMS + key with other signing algorithms within KMS. + + This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY. items: type: string type: array validTo: - description: The time at which the imported key material expires. - When the key material expires, KMS deletes the key material and - the KMS key becomes unusable. This value is present only for KMS - keys whose Origin is EXTERNAL and whose ExpirationModel is KEY_MATERIAL_EXPIRES, - otherwise this value is omitted. + description: |- + The time at which the imported key material expires. When the key material + expires, KMS deletes the key material and the KMS key becomes unusable. This + value is present only for KMS keys whose Origin is EXTERNAL and whose ExpirationModel + is KEY_MATERIAL_EXPIRES, otherwise this value is omitted. format: date-time type: string type: object diff --git a/addons/kms-chart/crds/services.k8s.aws_fieldexports.yaml b/addons/kms-chart/crds/services.k8s.aws_fieldexports.yaml index 4a7ab61b3..6e2c61e62 100644 --- a/addons/kms-chart/crds/services.k8s.aws_fieldexports.yaml +++ b/addons/kms-chart/crds/services.k8s.aws_fieldexports.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.19.0 name: fieldexports.services.k8s.aws spec: group: services.k8s.aws @@ -21,14 +20,19 @@ spec: description: FieldExport is the schema for the FieldExport API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -36,15 +40,17 @@ spec: description: FieldExportSpec defines the desired state of the FieldExport. properties: from: - description: ResourceFieldSelector provides the values necessary to - identify an individual field on an individual K8s resource. + description: |- + ResourceFieldSelector provides the values necessary to identify an individual + field on an individual K8s resource. properties: path: type: string resource: - description: NamespacedResource provides all the values necessary - to identify an ACK resource of a given type (within the same - namespace as the custom resource containing this type). + description: |- + NamespacedResource provides all the values necessary to identify an ACK + resource of a given type (within the same namespace as the custom resource + containing this type). properties: group: type: string @@ -62,16 +68,18 @@ spec: - resource type: object to: - description: FieldExportTarget provides the values necessary to identify - the output path for a field export. + description: |- + FieldExportTarget provides the values necessary to identify the + output path for a field export. properties: key: description: Key overrides the default value (`.`) for the FieldExport target type: string kind: - description: FieldExportOutputType represents all types that can - be produced by a field export operation + description: |- + FieldExportOutputType represents all types that can be produced by a field + export operation enum: - configmap - secret @@ -94,12 +102,14 @@ spec: description: FieldExportStatus defines the observed status of the FieldExport. properties: conditions: - description: A collection of `ackv1alpha1.Condition` objects that - describe the various recoverable states of the field CR + description: |- + A collection of `ackv1alpha1.Condition` objects that describe the various + recoverable states of the field CR items: - description: Condition is the common struct used by all CRDs managed - by ACK service controllers to indicate terminal states of the - CR and its backend AWS service API resource + description: |- + Condition is the common struct used by all CRDs managed by ACK service + controllers to indicate terminal states of the CR and its backend AWS + service API resource properties: lastTransitionTime: description: Last time the condition transitioned from one status diff --git a/addons/kms-chart/crds/services.k8s.aws_iamroleselectors.yaml b/addons/kms-chart/crds/services.k8s.aws_iamroleselectors.yaml new file mode 100644 index 000000000..9477c9005 --- /dev/null +++ b/addons/kms-chart/crds/services.k8s.aws_iamroleselectors.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.19.0 + name: iamroleselectors.services.k8s.aws +spec: + group: services.k8s.aws + names: + kind: IAMRoleSelector + listKind: IAMRoleSelectorList + plural: iamroleselectors + singular: iamroleselector + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: IAMRoleSelector is the schema for the IAMRoleSelector API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + arn: + type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf + namespaceSelector: + description: IAMRoleSelectorSpec defines the desired state of IAMRoleSelector + properties: + labelSelector: + description: LabelSelector is a label query over a set of resources. + properties: + matchLabels: + additionalProperties: + type: string + type: object + required: + - matchLabels + type: object + names: + items: + type: string + type: array + required: + - names + type: object + resourceTypeSelector: + items: + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + type: array + required: + - arn + type: object + status: + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/addons/kms-chart/templates/NOTES.txt b/addons/kms-chart/templates/NOTES.txt index 9831cc32d..e694028f1 100644 --- a/addons/kms-chart/templates/NOTES.txt +++ b/addons/kms-chart/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/kms-controller:1.0.8". +This chart deploys "public.ecr.aws/aws-controllers-k8s/kms-controller:1.2.0". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/addons/kms-chart/templates/_helpers.tpl b/addons/kms-chart/templates/_helpers.tpl index 391d5de33..3cb59a627 100644 --- a/addons/kms-chart/templates/_helpers.tpl +++ b/addons/kms-chart/templates/_helpers.tpl @@ -1,5 +1,5 @@ {{/* The name of the application this chart installs */}} -{{- define "app.name" -}} +{{- define "ack-kms-controller.app.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -8,7 +8,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "app.fullname" -}} +{{- define "ack-kms-controller.app.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -22,27 +22,106 @@ If release name contains chart name it will be used as a full name. {{- end -}} {{/* The name and version as used by the chart label */}} -{{- define "chart.name-version" -}} +{{- define "ack-kms-controller.chart.name-version" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* The name of the service account to use */}} -{{- define "service-account.name" -}} +{{- define "ack-kms-controller.service-account.name" -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} -{{- define "watch-namespace" -}} +{{- define "ack-kms-controller.watch-namespace" -}} {{- if eq .Values.installScope "namespace" -}} {{ .Values.watchNamespace | default .Release.Namespace }} {{- end -}} {{- end -}} {{/* The mount path for the shared credentials file */}} -{{- define "aws.credentials.secret_mount_path" -}} +{{- define "ack-kms-controller.aws.credentials.secret_mount_path" -}} {{- "/var/run/secrets/aws" -}} {{- end -}} {{/* The path the shared credentials file is mounted */}} -{{- define "aws.credentials.path" -}} -{{- printf "%s/%s" (include "aws.credentials.secret_mount_path" .) .Values.aws.credentials.secretKey -}} +{{- define "ack-kms-controller.aws.credentials.path" -}} +{{ $secret_mount_path := include "ack-kms-controller.aws.credentials.secret_mount_path" . }} +{{- printf "%s/%s" $secret_mount_path .Values.aws.credentials.secretKey -}} +{{- end -}} + +{{/* The rules a of ClusterRole or Role */}} +{{- define "ack-kms-controller.rbac-rules" -}} +rules: +- apiGroups: + - "" + resources: + - configmaps + - secrets + verbs: + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - kms.services.k8s.aws + resources: + - aliases + - grants + - keys + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - kms.services.k8s.aws + resources: + - aliases/status + - grants/status + - keys/status + verbs: + - get + - patch + - update +- apiGroups: + - services.k8s.aws + resources: + - fieldexports + - iamroleselectors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - services.k8s.aws + resources: + - fieldexports/status + - iamroleselectors/status + verbs: + - get + - patch + - update +{{- end }} + +{{/* Convert k/v map to string like: "key1=value1,key2=value2,..." */}} +{{- define "ack-kms-controller.feature-gates" -}} +{{- $list := list -}} +{{- range $k, $v := .Values.featureGates -}} +{{- $list = append $list (printf "%s=%s" $k ( $v | toString)) -}} +{{- end -}} +{{ join "," $list }} {{- end -}} diff --git a/addons/kms-chart/templates/caches-role-binding.yaml b/addons/kms-chart/templates/caches-role-binding.yaml new file mode 100644 index 000000000..da8e8b885 --- /dev/null +++ b/addons/kms-chart/templates/caches-role-binding.yaml @@ -0,0 +1,40 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "ack-kms-controller.app.fullname" . }}-namespaces-cache + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: {{ include "ack-kms-controller.app.fullname" . }}-namespaces-cache +subjects: +- kind: ServiceAccount + name: {{ include "ack-kms-controller.service-account.name" . }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "ack-kms-controller.app.fullname" . }}-configmaps-cache + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} +roleRef: + kind: Role + apiGroup: rbac.authorization.k8s.io + name: {{ include "ack-kms-controller.app.fullname" . }}-configmaps-cache +subjects: +- kind: ServiceAccount + name: {{ include "ack-kms-controller.service-account.name" . }} + namespace: {{ .Release.Namespace }} diff --git a/addons/kms-chart/templates/caches-role.yaml b/addons/kms-chart/templates/caches-role.yaml new file mode 100644 index 000000000..9d5ab8a4c --- /dev/null +++ b/addons/kms-chart/templates/caches-role.yaml @@ -0,0 +1,42 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "ack-kms-controller.app.fullname" . }}-namespaces-cache + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "ack-kms-controller.app.fullname" . }}-configmaps-cache + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch \ No newline at end of file diff --git a/addons/kms-chart/templates/cluster-role-binding.yaml b/addons/kms-chart/templates/cluster-role-binding.yaml index 202ded858..a3b605f99 100644 --- a/addons/kms-chart/templates/cluster-role-binding.yaml +++ b/addons/kms-chart/templates/cluster-role-binding.yaml @@ -1,21 +1,52 @@ -apiVersion: rbac.authorization.k8s.io/v1 {{ if eq .Values.installScope "cluster" }} +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "app.fullname" . }} + name: {{ include "ack-kms-controller.app.fullname" . }}-rolebinding + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} roleRef: kind: ClusterRole -{{ else }} + apiGroup: rbac.authorization.k8s.io + name: {{ include "ack-kms-controller.app.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ include "ack-kms-controller.service-account.name" . }} + namespace: {{ .Release.Namespace }} +{{ else if eq .Values.installScope "namespace" }} +{{ $wn := include "ack-kms-controller.watch-namespace" . }} +{{ $namespaces := split "," $wn }} +{{ $fullname := include "ack-kms-controller.app.fullname" . }} +{{ $releaseNamespace := .Release.Namespace }} +{{ $serviceAccountName := include "ack-kms-controller.service-account.name" . }} +{{ $chartVersion := include "ack-kms-controller.chart.name-version" . }} +{{ $appVersion := .Chart.AppVersion | quote }} +{{ range $namespaces }} +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "app.fullname" . }} - namespace: {{ .Release.Namespace }} + name: {{ $fullname }}-{{ . }} + namespace: {{ . }} + labels: + app.kubernetes.io/name: {{ $fullname }} + app.kubernetes.io/instance: {{ $.Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ $appVersion }} + k8s-app: {{ $fullname }} + helm.sh/chart: {{ $chartVersion }} roleRef: kind: Role -{{ end }} apiGroup: rbac.authorization.k8s.io - name: ack-kms-controller + name: {{ $fullname }}-{{ . }} subjects: - kind: ServiceAccount - name: {{ include "service-account.name" . }} - namespace: {{ .Release.Namespace }} + name: {{ $serviceAccountName }} + namespace: {{ $releaseNamespace }} +{{ end }} +{{ end }} \ No newline at end of file diff --git a/addons/kms-chart/templates/cluster-role-controller.yaml b/addons/kms-chart/templates/cluster-role-controller.yaml index fb445dc19..b25099577 100644 --- a/addons/kms-chart/templates/cluster-role-controller.yaml +++ b/addons/kms-chart/templates/cluster-role-controller.yaml @@ -1,148 +1,44 @@ -apiVersion: rbac.authorization.k8s.io/v1 +{{ $labels := .Values.role.labels }} +{{ $appVersion := .Chart.AppVersion | quote }} +{{ $rbacRules := include "ack-kms-controller.rbac-rules" . }} +{{ $fullname := include "ack-kms-controller.app.fullname" . }} +{{ $chartVersion := include "ack-kms-controller.chart.name-version" . }} {{ if eq .Values.installScope "cluster" }} +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null - name: ack-kms-controller + name: {{ include "ack-kms-controller.app.fullname" . }} labels: - {{- range $key, $value := .Values.role.labels }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} + {{- range $key, $value := $labels }} {{ $key }}: {{ $value | quote }} {{- end }} -{{ else }} +{{$rbacRules }} +{{ else if eq .Values.installScope "namespace" }} +{{ $wn := include "ack-kms-controller.watch-namespace" . }} +{{ $namespaces := split "," $wn }} +{{ range $namespaces }} +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - creationTimestamp: null - name: ack-kms-controller + name: {{ $fullname }}-{{ . }} + namespace: {{ . }} labels: - {{- range $key, $value := .Values.role.labels }} + app.kubernetes.io/name: {{ $fullname }} + app.kubernetes.io/instance: {{ $.Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ $appVersion }} + k8s-app: {{ $fullname }} + helm.sh/chart: {{ $chartVersion }} + {{- range $key, $value := $labels }} {{ $key }}: {{ $value | quote }} {{- end }} - namespace: {{ .Release.Namespace }} +{{ $rbacRules }} {{ end }} -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - patch - - watch -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - patch - - watch -- apiGroups: - - kms.services.k8s.aws - resources: - - aliases - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - kms.services.k8s.aws - resources: - - aliases/status - verbs: - - get - - patch - - update -- apiGroups: - - kms.services.k8s.aws - resources: - - grants - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - kms.services.k8s.aws - resources: - - grants/status - verbs: - - get - - patch - - update -- apiGroups: - - kms.services.k8s.aws - resources: - - keys - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - kms.services.k8s.aws - resources: - - keys/status - verbs: - - get - - patch - - update -- apiGroups: - - services.k8s.aws - resources: - - adoptedresources - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - services.k8s.aws - resources: - - adoptedresources/status - verbs: - - get - - patch - - update -- apiGroups: - - services.k8s.aws - resources: - - fieldexports - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - services.k8s.aws - resources: - - fieldexports/status - verbs: - - get - - patch - - update +{{ end }} \ No newline at end of file diff --git a/addons/kms-chart/templates/deployment.yaml b/addons/kms-chart/templates/deployment.yaml index cea38ec98..da1059134 100644 --- a/addons/kms-chart/templates/deployment.yaml +++ b/addons/kms-chart/templates/deployment.yaml @@ -1,20 +1,23 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "app.fullname" . }} + name: {{ include "ack-kms-controller.app.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - k8s-app: {{ include "app.name" . }} - helm.sh/chart: {{ include "chart.name-version" . }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} +{{- range $key, $value := .Values.deployment.labels }} + {{ $key }}: {{ $value | quote }} +{{- end }} spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -25,15 +28,15 @@ spec: {{- end }} {{- end }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm - k8s-app: {{ include "app.name" . }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} {{- range $key, $value := .Values.deployment.labels }} {{ $key }}: {{ $value | quote }} {{- end }} spec: - serviceAccountName: {{ include "service-account.name" . }} + serviceAccountName: {{ include "ack-kms-controller.service-account.name" . }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{- range .Values.image.pullSecrets }} @@ -57,6 +60,10 @@ spec: - "$(ACK_RESOURCE_TAGS)" - --watch-namespace - "$(ACK_WATCH_NAMESPACE)" + - --watch-selectors + - "$(ACK_WATCH_SELECTORS)" + - --reconcile-resources + - "$(RECONCILE_RESOURCES)" - --deletion-policy - "$(DELETION_POLICY)" {{- if .Values.leaderElection.enabled }} @@ -64,7 +71,7 @@ spec: - --leader-election-namespace - "$(LEADER_ELECTION_NAMESPACE)" {{- end }} -{{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }} +{{- if gt (int .Values.reconcile.defaultResyncPeriod) 0 }} - --reconcile-default-resync-seconds - "$(RECONCILE_DEFAULT_RESYNC_SECONDS)" {{- end }} @@ -72,6 +79,19 @@ spec: - --reconcile-resource-resync-seconds - "$(RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }})" {{- end }} +{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }} + - --reconcile-default-max-concurrent-syncs + - "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)" +{{- end }} +{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }} + - --reconcile-resource-max-concurrent-syncs + - "$(RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }})" +{{- end }} +{{- if .Values.featureGates}} + - --feature-gates + - "$(FEATURE_GATES)" +{{- end }} + - --enable-carm={{ .Values.enableCARM }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} name: controller @@ -90,7 +110,11 @@ spec: - name: AWS_ENDPOINT_URL value: {{ .Values.aws.endpoint_url | quote }} - name: ACK_WATCH_NAMESPACE - value: {{ include "watch-namespace" . }} + value: {{ include "ack-kms-controller.watch-namespace" . }} + - name: ACK_WATCH_SELECTORS + value: {{ .Values.watchSelectors }} + - name: RECONCILE_RESOURCES + value: {{ join "," .Values.reconcile.resources | quote }} - name: DELETION_POLICY value: {{ .Values.deletionPolicy }} - name: LEADER_ELECTION_NAMESPACE @@ -99,39 +123,66 @@ spec: value: {{ .Values.log.level | quote }} - name: ACK_RESOURCE_TAGS value: {{ join "," .Values.resourceTags | quote }} -{{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }} +{{- if gt (int .Values.reconcile.defaultResyncPeriod) 0 }} - name: RECONCILE_DEFAULT_RESYNC_SECONDS value: {{ .Values.reconcile.defaultResyncPeriod | quote }} {{- end }} {{- range $key, $value := .Values.reconcile.resourceResyncPeriods }} - name: RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }} value: {{ $key }}={{ $value }} +{{- end }} +{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }} + - name: RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS + value: {{ .Values.reconcile.defaultMaxConcurrentSyncs | quote }} +{{- end }} +{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }} + - name: RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }} + value: {{ $key }}={{ $value }} +{{- end }} +{{- if .Values.featureGates}} + - name: FEATURE_GATES + value: {{ include "ack-kms-controller.feature-gates" . }} {{- end }} {{- if .Values.aws.credentials.secretName }} - name: AWS_SHARED_CREDENTIALS_FILE - value: {{ include "aws.credentials.path" . }} + value: {{ include "ack-kms-controller.aws.credentials.path" . }} - name: AWS_PROFILE value: {{ .Values.aws.credentials.profile }} {{- end }} {{- if .Values.deployment.extraEnvVars -}} {{ toYaml .Values.deployment.extraEnvVars | nindent 8 }} {{- end }} + {{- if or .Values.aws.credentials.secretName .Values.deployment.extraVolumeMounts }} volumeMounts: {{- if .Values.aws.credentials.secretName }} - name: {{ .Values.aws.credentials.secretName }} - mountPath: {{ include "aws.credentials.secret_mount_path" . }} + mountPath: {{ include "ack-kms-controller.aws.credentials.secret_mount_path" . }} readOnly: true {{- end }} {{- if .Values.deployment.extraVolumeMounts -}} {{ toYaml .Values.deployment.extraVolumeMounts | nindent 10 }} {{- end }} + {{- end }} securityContext: allowPrivilegeEscalation: false privileged: false + readOnlyRootFilesystem: true runAsNonRoot: true capabilities: drop: - ALL + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 securityContext: seccompProfile: type: RuntimeDefault @@ -150,12 +201,17 @@ spec: hostPID: false hostNetwork: {{ .Values.deployment.hostNetwork }} dnsPolicy: {{ .Values.deployment.dnsPolicy }} + {{- if or .Values.aws.credentials.secretName .Values.deployment.extraVolumes }} volumes: {{- if .Values.aws.credentials.secretName }} - name: {{ .Values.aws.credentials.secretName }} secret: secretName: {{ .Values.aws.credentials.secretName }} {{- end }} -{{- if .Values.deployment.extraVolumes }} -{{ toYaml .Values.deployment.extraVolumes | indent 8}} -{{- end }} + {{- if .Values.deployment.extraVolumes }} + {{- toYaml .Values.deployment.extraVolumes | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.deployment.strategy }} + strategy: {{- toYaml . | nindent 4 }} + {{- end }} diff --git a/addons/kms-chart/templates/leader-election-role-binding.yaml b/addons/kms-chart/templates/leader-election-role-binding.yaml index fcb68e213..29fff93d6 100644 --- a/addons/kms-chart/templates/leader-election-role-binding.yaml +++ b/addons/kms-chart/templates/leader-election-role-binding.yaml @@ -2,17 +2,24 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: kms-leader-election-rolebinding + name: {{ include "ack-kms-controller.app.fullname" . }}-leaderelection {{ if .Values.leaderElection.namespace }} namespace: {{ .Values.leaderElection.namespace }} {{ else }} namespace: {{ .Release.Namespace }} {{ end }} + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: kms-leader-election-role + name: {{ include "ack-kms-controller.app.fullname" . }}-leaderelection subjects: - kind: ServiceAccount - name: {{ include "service-account.name" . }} + name: {{ include "ack-kms-controller.service-account.name" . }} namespace: {{ .Release.Namespace }}{{- end }} diff --git a/addons/kms-chart/templates/leader-election-role.yaml b/addons/kms-chart/templates/leader-election-role.yaml index bc46f7cb2..3533c6908 100644 --- a/addons/kms-chart/templates/leader-election-role.yaml +++ b/addons/kms-chart/templates/leader-election-role.yaml @@ -2,12 +2,19 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: kms-leader-election-role + name: {{ include "ack-kms-controller.app.fullname" . }}-leaderelection {{ if .Values.leaderElection.namespace }} namespace: {{ .Values.leaderElection.namespace }} {{ else }} namespace: {{ .Release.Namespace }} {{ end }} + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} rules: - apiGroups: - coordination.k8s.io diff --git a/addons/kms-chart/templates/metrics-service.yaml b/addons/kms-chart/templates/metrics-service.yaml index 638858a38..60127729a 100644 --- a/addons/kms-chart/templates/metrics-service.yaml +++ b/addons/kms-chart/templates/metrics-service.yaml @@ -5,18 +5,18 @@ metadata: name: {{ .Chart.Name | trimSuffix "-chart" | trunc 44 }}-controller-metrics namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - k8s-app: {{ include "app.name" . }} - helm.sh/chart: {{ include "chart.name-version" . }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} spec: selector: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm - k8s-app: {{ include "app.name" . }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} {{- range $key, $value := .Values.deployment.labels }} {{ $key }}: {{ $value | quote }} {{- end }} diff --git a/addons/kms-chart/templates/role-reader.yaml b/addons/kms-chart/templates/role-reader.yaml index 75a931b7a..1404b4837 100644 --- a/addons/kms-chart/templates/role-reader.yaml +++ b/addons/kms-chart/templates/role-reader.yaml @@ -3,8 +3,15 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: creationTimestamp: null - name: ack-kms-reader + name: {{ include "ack-kms-controller.app.fullname" . }}-reader namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} rules: - apiGroups: - kms.services.k8s.aws diff --git a/addons/kms-chart/templates/role-writer.yaml b/addons/kms-chart/templates/role-writer.yaml index c5f4a2158..25272dd06 100644 --- a/addons/kms-chart/templates/role-writer.yaml +++ b/addons/kms-chart/templates/role-writer.yaml @@ -3,18 +3,22 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: creationTimestamp: null - name: ack-kms-writer + name: {{ include "ack-kms-controller.app.fullname" . }}-writer namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} rules: - apiGroups: - kms.services.k8s.aws resources: - aliases - - grants - - keys - verbs: - create - delete diff --git a/addons/kms-chart/templates/service-account.yaml b/addons/kms-chart/templates/service-account.yaml index 73306395f..7193acfdb 100644 --- a/addons/kms-chart/templates/service-account.yaml +++ b/addons/kms-chart/templates/service-account.yaml @@ -3,13 +3,13 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-kms-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - k8s-app: {{ include "app.name" . }} - helm.sh/chart: {{ include "chart.name-version" . }} - name: {{ include "service-account.name" . }} + k8s-app: {{ include "ack-kms-controller.app.name" . }} + helm.sh/chart: {{ include "ack-kms-controller.chart.name-version" . }} + name: {{ include "ack-kms-controller.service-account.name" . }} namespace: {{ .Release.Namespace }} annotations: {{- range $key, $value := .Values.serviceAccount.annotations }} diff --git a/addons/kms-chart/values.schema.json b/addons/kms-chart/values.schema.json index ac28b6808..c3f56a0c3 100644 --- a/addons/kms-chart/values.schema.json +++ b/addons/kms-chart/values.schema.json @@ -210,7 +210,10 @@ }, "watchNamespace": { "type": "string" - }, + }, + "watchSelectors": { + "type": "string" + }, "resourceTags": { "type": "array", "items": { @@ -223,13 +226,27 @@ "enum": ["delete", "retain"] }, "reconcile": { - "description": "Reconcile resync settings. Parameters to tune the controller's drift remediation period.", + "description": "Reconcile settings. This is used to configure the controller's reconciliation behavior. e.g resyncPeriod and maxConcurrentSyncs", "properties": { "defaultResyncPeriod": { "type": "number" }, "resourceResyncPeriods": { "type": "object" + }, + "defaultMaxConcurentSyncs": { + "type": "number" + }, + "resourceMaxConcurrentSyncs": { + "type": "object" + }, + "resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of resource kinds to reconcile. If empty, all resources will be reconciled.", + "default": [] } }, "type": "object" @@ -246,6 +263,11 @@ }, "type": "object" }, + "enableCARM": { + "description": "Parameter to enable or disable cross account resource management.", + "type": "boolean", + "default": true + }, "serviceAccount": { "description": "ServiceAccount settings", "properties": { @@ -262,6 +284,13 @@ "type": "object" } }, + "featureGates": { + "description": "Feature gates settings", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, "required": [ "image", "deployment", diff --git a/addons/kms-chart/values.yaml b/addons/kms-chart/values.yaml index 79b034667..41739f000 100644 --- a/addons/kms-chart/values.yaml +++ b/addons/kms-chart/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/kms-controller - tag: 1.0.8 + tag: 1.2.0 pullPolicy: IfNotPresent pullSecrets: [] @@ -41,6 +41,9 @@ deployment: # To have DNS options set along with hostNetwork, you have to specify DNS policy # explicitly to 'ClusterFirstWithHostNet'. dnsPolicy: ClusterFirst + # Set rollout strategy for deployment. + # See: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + strategy: {} extraVolumes: [] extraVolumeMounts: [] @@ -107,13 +110,21 @@ installScope: cluster # Set the value of the "namespace" to be watched by the controller # This value is only used when the `installScope` is set to "namespace". If left empty, the default value is the release namespace for the chart. +# You can set multiple namespaces by providing a comma separated list of namespaces. e.g "namespace1,namespace2" watchNamespace: "" +# Set the value of labelsSelectors to be used by the controller to filter the resources to watch. +# You can set multiple labelsSelectors by providing a comma separated list of a=b arguments. e.g "label1=value1,label2=value2" +watchSelectors: "" + resourceTags: # Configures the ACK service controller to always set key/value pairs tags on # resources that it manages. + # Note: Tags with empty values are automatically skipped to keep resources clean. - services.k8s.aws/controller-version=%CONTROLLER_SERVICE%-%CONTROLLER_VERSION% - services.k8s.aws/namespace=%K8S_NAMESPACE% + - app.kubernetes.io/managed-by=%MANAGED_BY% + - kro.run/kro-version=%KRO_VERSION% # Set to "retain" to keep all AWS resources intact even after the K8s resources # have been deleted. By default, the ACK controller will delete the AWS resource @@ -127,6 +138,20 @@ reconcile: # An object representing the reconcile resync configuration for each specific resource. resourceResyncPeriods: {} + # The default number of concurrent syncs that a reconciler can perform. + defaultMaxConcurrentSyncs: 1 + # An object representing the reconcile max concurrent syncs configuration for each specific + # resource. + resourceMaxConcurrentSyncs: {} + + # Set the value of resources to specify which resource kinds to reconcile. + # If empty, all resources will be reconciled. + # If specified, only the listed resource kinds will be reconciled. + resources: + - Alias + - Grant + - Key + serviceAccount: # Specifies whether a service account should be created create: true @@ -146,3 +171,21 @@ leaderElection: # will attempt to use the namespace of the service account mounted to the Controller # pod. namespace: "" + +# Enable Cross Account Resource Management (default = true). Set this to false to disable cross account resource management. +enableCARM: true + +# Configuration for feature gates. These are optional controller features that +# can be individually enabled ("true") or disabled ("false") by adding key/value +# pairs below. +featureGates: + # Enables the Service level granularity for CARM. See https://github.com/aws-controllers-k8s/community/issues/2031 + ServiceLevelCARM: false + # Enables the Team level granularity for CARM. See https://github.com/aws-controllers-k8s/community/issues/2031 + TeamLevelCARM: false + # Enable ReadOnlyResources feature/annotation. + ReadOnlyResources: true + # Enable ResourceAdoption feature/annotation. + ResourceAdoption: true + # Enable IAMRoleSelector, a multirole feature, replacing CARM. See https://github.com/aws-controllers-k8s/community/pull/2628 + IAMRoleSelector: false \ No newline at end of file