From 864eb8a9a73dda21313b1661d1dd96d4044617a0 Mon Sep 17 00:00:00 2001 From: rudimk Date: Mon, 28 Oct 2024 10:17:31 +0000 Subject: [PATCH] [create-pull-request] automated change --- addons/kms-chart/Chart.yaml | 4 +- .../crds/kms.services.k8s.aws_aliases.yaml | 119 ++-- .../crds/kms.services.k8s.aws_grants.yaml | 262 +++++---- .../crds/kms.services.k8s.aws_keys.yaml | 556 ++++++++++-------- .../services.k8s.aws_adoptedresources.yaml | 204 ++++--- .../crds/services.k8s.aws_fieldexports.yaml | 54 +- addons/kms-chart/templates/NOTES.txt | 2 +- addons/kms-chart/templates/_helpers.tpl | 95 ++- .../templates/caches-role-binding.yaml | 26 + addons/kms-chart/templates/caches-role.yaml | 28 + .../templates/cluster-role-binding.yaml | 31 +- .../templates/cluster-role-controller.yaml | 149 +---- addons/kms-chart/templates/deployment.yaml | 63 +- .../leader-election-role-binding.yaml | 2 +- .../kms-chart/templates/metrics-service.yaml | 10 +- addons/kms-chart/templates/role-writer.yaml | 3 - .../kms-chart/templates/service-account.yaml | 8 +- addons/kms-chart/values.schema.json | 15 +- addons/kms-chart/values.yaml | 20 +- 19 files changed, 952 insertions(+), 699 deletions(-) create mode 100644 addons/kms-chart/templates/caches-role-binding.yaml create mode 100644 addons/kms-chart/templates/caches-role.yaml diff --git a/addons/kms-chart/Chart.yaml b/addons/kms-chart/Chart.yaml index 94ad9ff5..4d9583df 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.0.17 +appVersion: 1.0.17 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 6752c375..b8e0db31 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.16.2 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,51 @@ 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. + + 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). 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 +94,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 +123,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 2a09ab5f..924a972d 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.16.2 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,35 @@ 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 - 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." + description: |- + Specifies a grant constraint. + + 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 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 . + + 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. + + 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. These keys don't support an encryption + context. properties: encryptionContextEquals: additionalProperties: @@ -70,88 +80,108 @@ 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) + description: |- + The identity that gets the permissions specified in 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 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." + 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. 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 a different + 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. + + 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. 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) + 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 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) + 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." + + 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. type: string required: - granteePrincipal @@ -161,24 +191,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 +220,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 +255,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 a403afad..e317635c 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.16.2 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,228 @@ 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: |- + A flag to indicate whether to bypass the key policy lockout safety check. + + 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, 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 . + + 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. + + The default value is false. 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) + 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. + + 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. + + To find the ID of a custom key store, use the DescribeCustomKeyStores operation. + + The response includes the custom key store ID and the ID of the CloudHSM + cluster. + + 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." + of KMS with the isolation and control of a single-tenant key store. type: string 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). + + To set or change the description after the key is created, use UpdateKeyDescription. type: string 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 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), 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 RSA_2048 RSA_3072 RSA_4096 + + - Asymmetric NIST-recommended elliptic curve key pairs ECC_NIST_P256 (secp256r1) + ECC_NIST_P384 (secp384r1) ECC_NIST_P521 (secp521r1) + + - Other asymmetric elliptic curve key pairs ECC_SECG_P256K1 (secp256k1), + commonly used for cryptocurrencies. + + - SM2 key pairs (China Regions only) SM2 type: string 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 material, specify ENCRYPT_DECRYPT + or SIGN_VERIFY. + + - For asymmetric KMS keys with ECC key material, specify SIGN_VERIFY. + + - For asymmetric KMS keys with SM2 key material (China Regions only), + specify ENCRYPT_DECRYPT or SIGN_VERIFY. type: string 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 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. type: boolean 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 (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. + + 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. type: string 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 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. + + If you provide a key policy, it must meet the following criteria: + + - 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 . + + - 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. + + A key policy document can include only the following characters: + + - Printable ASCII characters from the space character (\u0020) through + the end of the ASCII character range. + + - Printable characters in the Basic Latin and Latin-1 Supplement character + set (through \u00FF). + + - The tab (\u0009), line feed (\u000A), and carriage return (\u000D) special + characters + + 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 . 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. + + 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. + + 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. + + 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 +274,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 +303,28 @@ 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 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. 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 +354,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 +449,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_adoptedresources.yaml b/addons/kms-chart/crds/services.k8s.aws_adoptedresources.yaml index d8d51261..b7be3224 100644 --- a/addons/kms-chart/crds/services.k8s.aws_adoptedresources.yaml +++ b/addons/kms-chart/crds/services.k8s.aws_adoptedresources.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.16.2 name: adoptedresources.services.k8s.aws spec: group: services.k8s.aws @@ -21,14 +20,19 @@ spec: description: AdoptedResource is the schema for the AdoptedResource 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 @@ -42,129 +46,144 @@ spec: additionalKeys: additionalProperties: type: string - description: AdditionalKeys represents any additional arbitrary - identifiers used when describing the target resource. + description: |- + AdditionalKeys represents any additional arbitrary identifiers used when + describing the target resource. type: object arn: - description: ARN is the AWS Resource Name for the resource. It - is a globally unique identifier. + description: |- + ARN is the AWS Resource Name for the resource. It is a globally + unique identifier. type: string nameOrID: - description: NameOrId is a user-supplied string identifier for - the resource. It may or may not be globally unique, depending - on the type of resource. + description: |- + NameOrId is a user-supplied string identifier for the resource. It may + or may not be globally unique, depending on the type of resource. type: string type: object kubernetes: - description: ResourceWithMetadata provides the values necessary to - create a Kubernetes resource and override any of its metadata values. + description: |- + ResourceWithMetadata provides the values necessary to create a + Kubernetes resource and override any of its metadata values. properties: group: type: string kind: type: string metadata: - description: "ObjectMeta is metadata that all persisted resources - must have, which includes all objects users must create. It - is not possible to use `metav1.ObjectMeta` inside spec, as the - controller-gen automatically converts this to an arbitrary string-string - map. https://github.com/kubernetes-sigs/controller-tools/issues/385 - \n Active discussion about inclusion of this field in the spec - is happening in this PR: https://github.com/kubernetes-sigs/controller-tools/pull/395 - \n Until this is allowed, or if it never is, we will produce - a subset of the object meta that contains only the fields which - the user is allowed to modify in the metadata." + description: |- + ObjectMeta is metadata that all persisted resources must have, which includes all objects + users must create. + It is not possible to use `metav1.ObjectMeta` inside spec, as the controller-gen + automatically converts this to an arbitrary string-string map. + https://github.com/kubernetes-sigs/controller-tools/issues/385 + + Active discussion about inclusion of this field in the spec is happening in this PR: + https://github.com/kubernetes-sigs/controller-tools/pull/395 + + Until this is allowed, or if it never is, we will produce a subset of the object meta + that contains only the fields which the user is allowed to modify in the metadata. properties: annotations: additionalProperties: type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations type: object generateName: - description: "GenerateName is an optional prefix, used by - the server, to generate a unique name ONLY IF the Name field - has not been provided. If this field is used, the name returned - to the client will be different than the name passed. This - value will also be combined with a unique suffix. The provided - value has the same validation rules as the Name field, and - may be truncated by the length of the suffix required to - make the value unique on the server. \n If this field is - specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created - or 500 with Reason ServerTimeout indicating a unique name - could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the - Retry-After header). \n Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique + name ONLY IF the Name field has not been provided. + If this field is used, the name returned to the client will be different + than the name passed. This value will also be combined with a unique suffix. + The provided value has the same validation rules as the Name field, + and may be truncated by the length of the suffix required to make the value + unique on the server. + + If this field is specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + ServerTimeout indicating a unique name could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency type: string labels: additionalProperties: type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels type: object name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' + description: |- + Name must be unique within a namespace. Is required when creating resources, although + some resources may allow a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence and configuration + definition. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/identifiers#names type: string namespace: - description: "Namespace defines the space within each name - must be unique. An empty namespace is equivalent to the - \"default\" namespace, but \"default\" is the canonical - representation. Not all objects are required to be scoped - to a namespace - the value of this field for those objects - will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" + description: |- + Namespace defines the space within each name must be unique. An empty namespace is + equivalent to the "default" namespace, but "default" is the canonical representation. + Not all objects are required to be scoped to a namespace - the value of this field for + those objects will be empty. + + Must be a DNS_LABEL. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces type: string ownerReferences: - description: List of objects depended by this object. If ALL - objects in the list have been deleted, this object will - be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, - with the controller field set to true. There cannot be more - than one managing controller. + description: |- + List of objects depended by this object. If ALL objects in the list have + been deleted, this object will be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. items: - description: OwnerReference contains enough information - to let you identify an owning object. An owning object - must be in the same namespace as the dependent, or be - cluster-scoped, so there is no namespace field. + description: |- + OwnerReference contains enough information to let you identify an owning + object. An owning object must be in the same namespace as the dependent, or + be cluster-scoped, so there is no namespace field. properties: apiVersion: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" - finalizer, then the owner cannot be deleted from the - key-value store until this reference is removed. See - https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this - field and enforces the foreground deletion. Defaults - to false. To set this field, a user needs "delete" - permission of the owner, otherwise 422 (Unprocessable - Entity) will be returned. + description: |- + If true, AND if the owner has the "foregroundDeletion" finalizer, then + the owner cannot be deleted from the key-value store until this + reference is removed. + See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this field and enforces the foreground deletion. + Defaults to false. + To set this field, a user needs "delete" permission of the owner, + otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. type: boolean kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string name: - description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names type: string uid: - description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids type: string required: - apiVersion @@ -188,13 +207,14 @@ spec: AdoptedResource. properties: conditions: - description: A collection of `ackv1alpha1.Condition` objects that - describe the various terminal states of the adopted resource CR - and its target custom resource + description: |- + A collection of `ackv1alpha1.Condition` objects that describe the various + terminal states of the adopted resource CR and its target custom 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/services.k8s.aws_fieldexports.yaml b/addons/kms-chart/crds/services.k8s.aws_fieldexports.yaml index 4a7ab61b..49b4f383 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.16.2 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/templates/NOTES.txt b/addons/kms-chart/templates/NOTES.txt index 9831cc32..cabf88a7 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.0.17". 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 391d5de3..7d093fc9 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: + - adoptedresources + - fieldexports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - services.k8s.aws + resources: + - adoptedresources/status + - fieldexports/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 00000000..cd0b6449 --- /dev/null +++ b/addons/kms-chart/templates/caches-role-binding.yaml @@ -0,0 +1,26 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: ack-namespaces-cache-kms-controller +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: ack-namespaces-cache-kms-controller +subjects: +- kind: ServiceAccount + name: ack-kms-controller + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: ack-configmaps-cache-kms-controller + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + apiGroup: rbac.authorization.k8s.io + name: ack-configmaps-cache-kms-controller +subjects: +- kind: ServiceAccount + name: ack-kms-controller + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/addons/kms-chart/templates/caches-role.yaml b/addons/kms-chart/templates/caches-role.yaml new file mode 100644 index 00000000..68a3e0bb --- /dev/null +++ b/addons/kms-chart/templates/caches-role.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ack-namespaces-cache-kms-controller +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: ack-configmaps-cache-kms-controller + namespace: {{ .Release.Namespace }} +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 202ded85..2dd565de 100644 --- a/addons/kms-chart/templates/cluster-role-binding.yaml +++ b/addons/kms-chart/templates/cluster-role-binding.yaml @@ -1,21 +1,36 @@ -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" . }} roleRef: kind: ClusterRole -{{ else }} + apiGroup: rbac.authorization.k8s.io + name: ack-kms-controller +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" . }} +{{ range $namespaces }} +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "app.fullname" . }} - namespace: {{ .Release.Namespace }} + name: {{ $fullname }} + namespace: {{ . }} roleRef: kind: Role -{{ end }} apiGroup: rbac.authorization.k8s.io name: ack-kms-controller 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 fb445dc1..c3a4aa08 100644 --- a/addons/kms-chart/templates/cluster-role-controller.yaml +++ b/addons/kms-chart/templates/cluster-role-controller.yaml @@ -1,148 +1,29 @@ -apiVersion: rbac.authorization.k8s.io/v1 +{{ $labels := .Values.role.labels }} +{{ $rbacRules := include "ack-kms-controller.rbac-rules" . }} {{ if eq .Values.installScope "cluster" }} +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: ack-kms-controller labels: - {{- range $key, $value := .Values.role.labels }} + {{- 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 + namespace: {{ . }} labels: - {{- range $key, $value := .Values.role.labels }} + {{- 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 cea38ec9..329ab1cc 100644 --- a/addons/kms-chart/templates/deployment.yaml +++ b/addons/kms-chart/templates/deployment.yaml @@ -1,20 +1,20 @@ 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" . }} 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 +25,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 }} @@ -64,13 +64,25 @@ 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 }} {{- range $key, $value := .Values.reconcile.resourceResyncPeriods }} - --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 }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} @@ -90,7 +102,7 @@ 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: DELETION_POLICY value: {{ .Values.deletionPolicy }} - name: LEADER_ELECTION_NAMESPACE @@ -99,17 +111,29 @@ 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 }} @@ -119,7 +143,7 @@ spec: 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 -}} @@ -128,10 +152,23 @@ spec: 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 diff --git a/addons/kms-chart/templates/leader-election-role-binding.yaml b/addons/kms-chart/templates/leader-election-role-binding.yaml index fcb68e21..12527ad4 100644 --- a/addons/kms-chart/templates/leader-election-role-binding.yaml +++ b/addons/kms-chart/templates/leader-election-role-binding.yaml @@ -14,5 +14,5 @@ roleRef: name: kms-leader-election-role 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/metrics-service.yaml b/addons/kms-chart/templates/metrics-service.yaml index 638858a3..60127729 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-writer.yaml b/addons/kms-chart/templates/role-writer.yaml index c5f4a215..8d89415f 100644 --- a/addons/kms-chart/templates/role-writer.yaml +++ b/addons/kms-chart/templates/role-writer.yaml @@ -10,11 +10,8 @@ rules: - 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 73306395..7193acfd 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 ac28b680..7ccb485d 100644 --- a/addons/kms-chart/values.schema.json +++ b/addons/kms-chart/values.schema.json @@ -223,13 +223,19 @@ "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" } }, "type": "object" @@ -262,6 +268,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 79b03466..f8f59789 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.0.17 pullPolicy: IfNotPresent pullSecrets: [] @@ -107,6 +107,7 @@ 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: "" resourceTags: @@ -127,6 +128,12 @@ 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: {} + serviceAccount: # Specifies whether a service account should be created create: true @@ -146,3 +153,14 @@ leaderElection: # will attempt to use the namespace of the service account mounted to the Controller # pod. namespace: "" + +# 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: false \ No newline at end of file