From 87752385f7b6fb63a2a41d16a47026f6b30f6a17 Mon Sep 17 00:00:00 2001 From: yosefmih Date: Fri, 22 Mar 2024 18:30:42 +0000 Subject: [PATCH] [create-pull-request] automated change --- addons/dynamodb-chart/Chart.yaml | 4 +- .../dynamodb.services.k8s.aws_backups.yaml | 97 +-- ...ynamodb.services.k8s.aws_globaltables.yaml | 89 ++- .../dynamodb.services.k8s.aws_tables.yaml | 589 +++++++++++------- .../services.k8s.aws_adoptedresources.yaml | 209 ++++--- .../crds/services.k8s.aws_fieldexports.yaml | 54 +- addons/dynamodb-chart/templates/NOTES.txt | 2 +- addons/dynamodb-chart/templates/_helpers.tpl | 148 ++++- .../templates/caches-role-binding.yaml | 26 + .../dynamodb-chart/templates/caches-role.yaml | 28 + .../templates/cluster-role-binding.yaml | 31 +- .../templates/cluster-role-controller.yaml | 149 +---- .../dynamodb-chart/templates/deployment.yaml | 54 +- .../leader-election-role-binding.yaml | 2 +- .../templates/metrics-service.yaml | 10 +- .../dynamodb-chart/templates/role-writer.yaml | 3 - .../templates/service-account.yaml | 8 +- addons/dynamodb-chart/values.schema.json | 8 +- addons/dynamodb-chart/values.yaml | 9 +- 19 files changed, 912 insertions(+), 608 deletions(-) create mode 100644 addons/dynamodb-chart/templates/caches-role-binding.yaml create mode 100644 addons/dynamodb-chart/templates/caches-role.yaml diff --git a/addons/dynamodb-chart/Chart.yaml b/addons/dynamodb-chart/Chart.yaml index b5de69e6..f2056b09 100644 --- a/addons/dynamodb-chart/Chart.yaml +++ b/addons/dynamodb-chart/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: dynamodb-chart description: A Helm chart for the ACK service controller for Amazon DynamoDB (DynamoDB) -version: 1.2.6 -appVersion: 1.2.6 +version: 1.2.9 +appVersion: 1.2.9 home: https://github.com/aws-controllers-k8s/dynamodb-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_backups.yaml b/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_backups.yaml index a444282e..6f881ed8 100644 --- a/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_backups.yaml +++ b/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_backups.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.14.0 name: backups.dynamodb.services.k8s.aws spec: group: dynamodb.services.k8s.aws @@ -44,14 +43,19 @@ spec: description: Backup is the Schema for the Backups 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 @@ -72,24 +76,26 @@ spec: description: BackupStatus defines the observed state of Backup 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. + TODO(vijat@): Find a better strategy for resources that do not have ARN in CreateOutputResponse + 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 @@ -105,15 +111,15 @@ spec: format: date-time type: string backupExpiryDateTime: - description: Time at which the automatic on-demand backup created - by DynamoDB will expire. This SYSTEM on-demand backup expires automatically - 35 days after its creation. + description: |- + Time at which the automatic on-demand backup created by DynamoDB will expire. + This SYSTEM on-demand backup expires automatically 35 days after its creation. format: date-time type: string backupSizeBytes: - description: Size of the backup in bytes. DynamoDB updates this value - approximately every six hours. Recent changes might not be reflected - in this value. + description: |- + Size of the backup in bytes. DynamoDB updates this value approximately every + six hours. Recent changes might not be reflected in this value. format: int64 type: integer backupStatus: @@ -121,23 +127,32 @@ spec: ACTIVE, DELETED.' type: string backupType: - description: "BackupType: \n * USER - You create and manage these - using the on-demand backup feature. \n * SYSTEM - If you delete - a table with point-in-time recovery enabled, a SYSTEM backup is - automatically created and is retained for 35 days (at no additional - cost). System backups allow you to restore the deleted table to - the state it was in just before the point of deletion. \n * AWS_BACKUP - - On-demand backup created by you from Backup service." + description: |- + BackupType: + + + * USER - You create and manage these using the on-demand backup feature. + + + * SYSTEM - If you delete a table with point-in-time recovery enabled, + a SYSTEM backup is automatically created and is retained for 35 days (at + no additional cost). System backups allow you to restore the deleted table + to the state it was in just before the point of deletion. + + + * AWS_BACKUP - On-demand backup created by you from Backup service. 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 diff --git a/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_globaltables.yaml b/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_globaltables.yaml index 5c2f6a15..69d1cba2 100644 --- a/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_globaltables.yaml +++ b/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_globaltables.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.14.0 name: globaltables.dynamodb.services.k8s.aws spec: group: dynamodb.services.k8s.aws @@ -21,20 +20,28 @@ spec: description: GlobalTable is the Schema for the GlobalTables 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 spec: - description: "GlobalTableSpec defines the desired state of GlobalTable. - \n Represents the properties of a global table." + description: |- + GlobalTableSpec defines the desired state of GlobalTable. + + + Represents the properties of a global table. properties: globalTableName: description: The global table name. @@ -56,24 +63,26 @@ spec: description: GlobalTableStatus defines the observed state of GlobalTable 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. + TODO(vijat@): Find a better strategy for resources that do not have ARN in CreateOutputResponse + 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 @@ -84,14 +93,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 @@ -121,10 +132,20 @@ spec: format: date-time type: string globalTableStatus: - description: "The current state of the global table: \n * CREATING - - The global table is being created. \n * UPDATING - The global - table is being updated. \n * DELETING - The global table is being - deleted. \n * ACTIVE - The global table is ready for use." + description: |- + The current state of the global table: + + + * CREATING - The global table is being created. + + + * UPDATING - The global table is being updated. + + + * DELETING - The global table is being deleted. + + + * ACTIVE - The global table is ready for use. type: string type: object type: object diff --git a/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_tables.yaml b/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_tables.yaml index c16c2324..ea51d601 100644 --- a/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_tables.yaml +++ b/addons/dynamodb-chart/crds/dynamodb.services.k8s.aws_tables.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.14.0 name: tables.dynamodb.services.k8s.aws spec: group: dynamodb.services.k8s.aws @@ -38,14 +37,19 @@ spec: description: Table is the Schema for the Tables 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 @@ -66,14 +70,17 @@ spec: type: object type: array billingMode: - description: "Controls how you are charged for read and write throughput - and how you manage capacity. This setting can be changed later. - \n - PROVISIONED - We recommend using PROVISIONED for predictable - workloads. PROVISIONED sets the billing mode to Provisioned Mode - (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual). - \n - PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable - workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode - (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand)." + description: |- + Controls how you are charged for read and write throughput and how you manage + capacity. This setting can be changed later. + + + - PROVISIONED - We recommend using PROVISIONED for predictable workloads. + PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual). + + + - PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable + workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand). type: string continuousBackups: description: Represents the settings used to enable point in time @@ -83,31 +90,44 @@ spec: type: boolean type: object deletionProtectionEnabled: - description: Indicates whether deletion protection is to be enabled - (true) or disabled (false) on the table. + description: |- + Indicates whether deletion protection is to be enabled (true) or disabled + (false) on the table. type: boolean globalSecondaryIndexes: - description: "One or more global secondary indexes (the maximum is - 20) to be created on the table. Each global secondary index in the - array includes the following: \n - IndexName - The name of the global - secondary index. Must be unique only for this table. \n - KeySchema - - Specifies the key schema for the global secondary index. \n - - Projection - Specifies attributes that are copied (projected) from - the table into the index. These are in addition to the primary key - attributes and index key attributes, which are automatically projected. - Each attribute specification is composed of: ProjectionType - One - of the following: KEYS_ONLY \n - Only the index and primary keys - are projected into the index. INCLUDE \n - Only the specified table - attributes are projected into the index. The list of projected attributes - is in NonKeyAttributes. ALL - All of the table attributes are projected - into the index. NonKeyAttributes - A list of one or more non-key - attribute names that are projected into the secondary index. The - total count of attributes provided in NonKeyAttributes, summed across - all of the secondary indexes, must not exceed 100. If you project - the same attribute into two different indexes, this counts as two - distinct attributes when determining the total. \n - ProvisionedThroughput - - The provisioned throughput settings for the global secondary index, - consisting of read and write capacity units." + description: |- + One or more global secondary indexes (the maximum is 20) to be created on + the table. Each global secondary index in the array includes the following: + + + - IndexName - The name of the global secondary index. Must be unique only + for this table. + + + - KeySchema - Specifies the key schema for the global secondary index. + + + - Projection - Specifies attributes that are copied (projected) from the + table into the index. These are in addition to the primary key attributes + and index key attributes, which are automatically projected. Each attribute + specification is composed of: ProjectionType - One of the following: KEYS_ONLY + + + - Only the index and primary keys are projected into the index. INCLUDE + + + - Only the specified table attributes are projected into the index. The + list of projected attributes is in NonKeyAttributes. ALL - All of the + table attributes are projected into the index. NonKeyAttributes - A list + of one or more non-key attribute names that are projected into the secondary + index. The total count of attributes provided in NonKeyAttributes, summed + across all of the secondary indexes, must not exceed 100. If you project + the same attribute into two different indexes, this counts as two distinct + attributes when determining the total. + + + - ProvisionedThroughput - The provisioned throughput settings for the + global secondary index, consisting of read and write capacity units. items: description: Represents the properties of a global secondary index. properties: @@ -115,18 +135,20 @@ spec: type: string keySchema: items: - description: "Represents a single element of a key schema. - A key schema specifies the attributes that make up the primary - key of a table, or the key attributes of an index. \n A - KeySchemaElement represents exactly one attribute of the - primary key. For example, a simple primary key would be - represented by one KeySchemaElement (for the partition key). - A composite primary key would require one KeySchemaElement - for the partition key, and another KeySchemaElement for - the sort key. \n A KeySchemaElement must be a scalar, top-level - attribute (not a nested attribute). The data type must be - one of String, Number, or Binary. The attribute cannot be - nested within a List or a Map." + description: |- + Represents a single element of a key schema. A key schema specifies the attributes + that make up the primary key of a table, or the key attributes of an index. + + + A KeySchemaElement represents exactly one attribute of the primary key. For + example, a simple primary key would be represented by one KeySchemaElement + (for the partition key). A composite primary key would require one KeySchemaElement + for the partition key, and another KeySchemaElement for the sort key. + + + A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). + The data type must be one of String, Number, or Binary. The attribute cannot + be nested within a List or a Map. properties: attributeName: type: string @@ -135,10 +157,10 @@ spec: type: object type: array projection: - description: Represents attributes that are copied (projected) - from the table into an index. These are in addition to the - primary key attributes and index key attributes, which are - automatically projected. + description: |- + Represents attributes that are copied (projected) from the table into an + index. These are in addition to the primary key attributes and index key + attributes, which are automatically projected. properties: nonKeyAttributes: items: @@ -148,12 +170,14 @@ spec: type: string type: object provisionedThroughput: - description: "Represents the provisioned throughput settings - for a specified table or index. The settings can be modified - using the UpdateTable operation. \n For current minimum and - maximum provisioned throughput values, see Service, Account, - and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) - in the Amazon DynamoDB Developer Guide." + description: |- + Represents the provisioned throughput settings for a specified table or index. + The settings can be modified using the UpdateTable operation. + + + For current minimum and maximum provisioned throughput values, see Service, + Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) + in the Amazon DynamoDB Developer Guide. properties: readCapacityUnits: format: int64 @@ -165,40 +189,60 @@ spec: type: object type: array keySchema: - description: "Specifies the attributes that make up the primary key - for a table or an index. The attributes in KeySchema must also be - defined in the AttributeDefinitions array. For more information, - see Data Model (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) - in the Amazon DynamoDB Developer Guide. \n Each KeySchemaElement - in the array is composed of: \n - AttributeName - The name of this - key attribute. \n - KeyType - The role that the key attribute will - assume: HASH - partition key RANGE - sort key \n The partition key - of an item is also known as its hash attribute. The term \"hash - attribute\" derives from the DynamoDB usage of an internal hash - function to evenly distribute data items across partitions, based - on their partition key values. \n The sort key of an item is also - known as its range attribute. The term \"range attribute\" derives - from the way DynamoDB stores items with the same partition key physically - close together, in sorted order by the sort key value. \n For a - simple primary key (partition key), you must provide exactly one - element with a KeyType of HASH. \n For a composite primary key (partition - key and sort key), you must provide exactly two elements, in this - order: The first element must have a KeyType of HASH, and the second - element must have a KeyType of RANGE. \n For more information, see - Working with Tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key) - in the Amazon DynamoDB Developer Guide." + description: |- + Specifies the attributes that make up the primary key for a table or an index. + The attributes in KeySchema must also be defined in the AttributeDefinitions + array. For more information, see Data Model (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) + in the Amazon DynamoDB Developer Guide. + + + Each KeySchemaElement in the array is composed of: + + + - AttributeName - The name of this key attribute. + + + - KeyType - The role that the key attribute will assume: HASH - partition + key RANGE - sort key + + + The partition key of an item is also known as its hash attribute. The term + "hash attribute" derives from the DynamoDB usage of an internal hash function + to evenly distribute data items across partitions, based on their partition + key values. + + + The sort key of an item is also known as its range attribute. The term "range + attribute" derives from the way DynamoDB stores items with the same partition + key physically close together, in sorted order by the sort key value. + + + For a simple primary key (partition key), you must provide exactly one element + with a KeyType of HASH. + + + For a composite primary key (partition key and sort key), you must provide + exactly two elements, in this order: The first element must have a KeyType + of HASH, and the second element must have a KeyType of RANGE. + + + For more information, see Working with Tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key) + in the Amazon DynamoDB Developer Guide. items: - description: "Represents a single element of a key schema. A key - schema specifies the attributes that make up the primary key of - a table, or the key attributes of an index. \n A KeySchemaElement - represents exactly one attribute of the primary key. For example, - a simple primary key would be represented by one KeySchemaElement - (for the partition key). A composite primary key would require - one KeySchemaElement for the partition key, and another KeySchemaElement - for the sort key. \n A KeySchemaElement must be a scalar, top-level - attribute (not a nested attribute). The data type must be one - of String, Number, or Binary. The attribute cannot be nested within - a List or a Map." + description: |- + Represents a single element of a key schema. A key schema specifies the attributes + that make up the primary key of a table, or the key attributes of an index. + + + A KeySchemaElement represents exactly one attribute of the primary key. For + example, a simple primary key would be represented by one KeySchemaElement + (for the partition key). A composite primary key would require one KeySchemaElement + for the partition key, and another KeySchemaElement for the sort key. + + + A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). + The data type must be one of String, Number, or Binary. The attribute cannot + be nested within a List or a Map. properties: attributeName: type: string @@ -207,29 +251,41 @@ spec: type: object type: array localSecondaryIndexes: - description: "One or more local secondary indexes (the maximum is - 5) to be created on the table. Each index is scoped to a given partition - key value. There is a 10 GB size limit per partition key value; - otherwise, the size of a local secondary index is unconstrained. - \n Each local secondary index in the array includes the following: - \n - IndexName - The name of the local secondary index. Must be - unique only for this table. \n - KeySchema - Specifies the key schema - for the local secondary index. The key schema must begin with the - same partition key as the table. \n - Projection - Specifies attributes - that are copied (projected) from the table into the index. These - are in addition to the primary key attributes and index key attributes, - which are automatically projected. Each attribute specification - is composed of: ProjectionType - One of the following: KEYS_ONLY - \n - Only the index and primary keys are projected into the index. - INCLUDE \n - Only the specified table attributes are projected into - the index. The list of projected attributes is in NonKeyAttributes. - ALL - All of the table attributes are projected into the index. - NonKeyAttributes - A list of one or more non-key attribute names - that are projected into the secondary index. The total count of - attributes provided in NonKeyAttributes, summed across all of the - secondary indexes, must not exceed 100. If you project the same - attribute into two different indexes, this counts as two distinct - attributes when determining the total." + description: |- + One or more local secondary indexes (the maximum is 5) to be created on the + table. Each index is scoped to a given partition key value. There is a 10 + GB size limit per partition key value; otherwise, the size of a local secondary + index is unconstrained. + + + Each local secondary index in the array includes the following: + + + - IndexName - The name of the local secondary index. Must be unique only + for this table. + + + - KeySchema - Specifies the key schema for the local secondary index. + The key schema must begin with the same partition key as the table. + + + - Projection - Specifies attributes that are copied (projected) from the + table into the index. These are in addition to the primary key attributes + and index key attributes, which are automatically projected. Each attribute + specification is composed of: ProjectionType - One of the following: KEYS_ONLY + + + - Only the index and primary keys are projected into the index. INCLUDE + + + - Only the specified table attributes are projected into the index. The + list of projected attributes is in NonKeyAttributes. ALL - All of the + table attributes are projected into the index. NonKeyAttributes - A list + of one or more non-key attribute names that are projected into the secondary + index. The total count of attributes provided in NonKeyAttributes, summed + across all of the secondary indexes, must not exceed 100. If you project + the same attribute into two different indexes, this counts as two distinct + attributes when determining the total. items: description: Represents the properties of a local secondary index. properties: @@ -237,18 +293,20 @@ spec: type: string keySchema: items: - description: "Represents a single element of a key schema. - A key schema specifies the attributes that make up the primary - key of a table, or the key attributes of an index. \n A - KeySchemaElement represents exactly one attribute of the - primary key. For example, a simple primary key would be - represented by one KeySchemaElement (for the partition key). - A composite primary key would require one KeySchemaElement - for the partition key, and another KeySchemaElement for - the sort key. \n A KeySchemaElement must be a scalar, top-level - attribute (not a nested attribute). The data type must be - one of String, Number, or Binary. The attribute cannot be - nested within a List or a Map." + description: |- + Represents a single element of a key schema. A key schema specifies the attributes + that make up the primary key of a table, or the key attributes of an index. + + + A KeySchemaElement represents exactly one attribute of the primary key. For + example, a simple primary key would be represented by one KeySchemaElement + (for the partition key). A composite primary key would require one KeySchemaElement + for the partition key, and another KeySchemaElement for the sort key. + + + A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). + The data type must be one of String, Number, or Binary. The attribute cannot + be nested within a List or a Map. properties: attributeName: type: string @@ -257,10 +315,10 @@ spec: type: object type: array projection: - description: Represents attributes that are copied (projected) - from the table into an index. These are in addition to the - primary key attributes and index key attributes, which are - automatically projected. + description: |- + Represents attributes that are copied (projected) from the table into an + index. These are in addition to the primary key attributes and index key + attributes, which are automatically projected. properties: nonKeyAttributes: items: @@ -272,14 +330,18 @@ spec: type: object type: array provisionedThroughput: - description: "Represents the provisioned throughput settings for a - specified table or index. The settings can be modified using the - UpdateTable operation. \n If you set BillingMode as PROVISIONED, - you must specify this property. If you set BillingMode as PAY_PER_REQUEST, - you cannot specify this property. \n For current minimum and maximum - provisioned throughput values, see Service, Account, and Table Quotas - (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) - in the Amazon DynamoDB Developer Guide." + description: |- + Represents the provisioned throughput settings for a specified table or index. + The settings can be modified using the UpdateTable operation. + + + If you set BillingMode as PROVISIONED, you must specify this property. If + you set BillingMode as PAY_PER_REQUEST, you cannot specify this property. + + + For current minimum and maximum provisioned throughput values, see Service, + Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) + in the Amazon DynamoDB Developer Guide. properties: readCapacityUnits: format: int64 @@ -299,17 +361,22 @@ spec: type: string type: object streamSpecification: - description: "The settings for DynamoDB Streams on the table. These - settings consist of: \n - StreamEnabled - Indicates whether DynamoDB - Streams is to be enabled (true) or disabled (false). \n - StreamViewType - - When an item in the table is modified, StreamViewType determines - what information is written to the table's stream. Valid values - for StreamViewType are: KEYS_ONLY - Only the key attributes of the - modified item are written to the stream. NEW_IMAGE - The entire - item, as it appears after it was modified, is written to the stream. - OLD_IMAGE - The entire item, as it appeared before it was modified, - is written to the stream. NEW_AND_OLD_IMAGES - Both the new and - the old item images of the item are written to the stream." + description: |- + The settings for DynamoDB Streams on the table. These settings consist of: + + + - StreamEnabled - Indicates whether DynamoDB Streams is to be enabled + (true) or disabled (false). + + + - StreamViewType - When an item in the table is modified, StreamViewType + determines what information is written to the table's stream. Valid values + for StreamViewType are: KEYS_ONLY - Only the key attributes of the modified + item are written to the stream. NEW_IMAGE - The entire item, as it appears + after it was modified, is written to the stream. OLD_IMAGE - The entire + item, as it appeared before it was modified, is written to the stream. + NEW_AND_OLD_IMAGES - Both the new and the old item images of the item + are written to the stream. properties: streamEnabled: type: boolean @@ -324,18 +391,24 @@ spec: description: The name of the table to create. type: string tags: - description: A list of key-value pairs to label the table. For more - information, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html). + description: |- + A list of key-value pairs to label the table. For more information, see Tagging + for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html). items: - description: "Describes a tag. A tag is a key-value pair. You can - add up to 50 tags to a single DynamoDB table. \n Amazon Web Services-assigned - tag names and values are automatically assigned the aws: prefix, - which the user cannot assign. Amazon Web Services-assigned tag - names do not count towards the tag limit of 50. User-assigned - tag names have the prefix user: in the Cost Allocation Report. - You cannot backdate the application of a tag. \n For an overview - on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) - in the Amazon DynamoDB Developer Guide." + description: |- + Describes a tag. A tag is a key-value pair. You can add up to 50 tags to + a single DynamoDB table. + + + Amazon Web Services-assigned tag names and values are automatically assigned + the aws: prefix, which the user cannot assign. Amazon Web Services-assigned + tag names do not count towards the tag limit of 50. User-assigned tag names + have the prefix user: in the Cost Allocation Report. You cannot backdate + the application of a tag. + + + For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) + in the Amazon DynamoDB Developer Guide. properties: key: type: string @@ -344,8 +417,9 @@ spec: type: object type: array timeToLive: - description: Represents the settings used to enable or disable Time - to Live for the specified table. + description: |- + Represents the settings used to enable or disable Time to Live for the specified + table. properties: attributeName: type: string @@ -361,24 +435,26 @@ spec: description: TableStatus defines the observed state of Table 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. + TODO(vijat@): Find a better strategy for resources that do not have ARN in CreateOutputResponse + 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 @@ -400,14 +476,16 @@ spec: type: string 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 @@ -433,8 +511,9 @@ spec: type: object type: array creationDateTime: - description: The date and time when the table was created, in UNIX - epoch time (http://www.epochconverter.com/) format. + description: |- + The date and time when the table was created, in UNIX epoch time (http://www.epochconverter.com/) + format. format: date-time type: string globalSecondaryIndexesDescriptions: @@ -457,18 +536,20 @@ spec: type: integer keySchema: items: - description: "Represents a single element of a key schema. - A key schema specifies the attributes that make up the primary - key of a table, or the key attributes of an index. \n A - KeySchemaElement represents exactly one attribute of the - primary key. For example, a simple primary key would be - represented by one KeySchemaElement (for the partition key). - A composite primary key would require one KeySchemaElement - for the partition key, and another KeySchemaElement for - the sort key. \n A KeySchemaElement must be a scalar, top-level - attribute (not a nested attribute). The data type must be - one of String, Number, or Binary. The attribute cannot be - nested within a List or a Map." + description: |- + Represents a single element of a key schema. A key schema specifies the attributes + that make up the primary key of a table, or the key attributes of an index. + + + A KeySchemaElement represents exactly one attribute of the primary key. For + example, a simple primary key would be represented by one KeySchemaElement + (for the partition key). A composite primary key would require one KeySchemaElement + for the partition key, and another KeySchemaElement for the sort key. + + + A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). + The data type must be one of String, Number, or Binary. The attribute cannot + be nested within a List or a Map. properties: attributeName: type: string @@ -477,10 +558,10 @@ spec: type: object type: array projection: - description: Represents attributes that are copied (projected) - from the table into an index. These are in addition to the - primary key attributes and index key attributes, which are - automatically projected. + description: |- + Represents attributes that are copied (projected) from the table into an + index. These are in addition to the primary key attributes and index key + attributes, which are automatically projected. properties: nonKeyAttributes: items: @@ -490,9 +571,9 @@ spec: type: string type: object provisionedThroughput: - description: Represents the provisioned throughput settings - for the table, consisting of read and write capacity units, - along with data about increases and decreases. + description: |- + Represents the provisioned throughput settings for the table, consisting + of read and write capacity units, along with data about increases and decreases. properties: lastDecreaseDateTime: format: date-time @@ -513,26 +594,39 @@ spec: type: object type: array globalTableVersion: - description: Represents the version of global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html) + description: |- + Represents the version of global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html) in use, if the table is replicated across Amazon Web Services Regions. type: string itemCount: - description: The number of items in the specified table. DynamoDB - updates this value approximately every six hours. Recent changes - might not be reflected in this value. + description: |- + The number of items in the specified table. DynamoDB updates this value approximately + every six hours. Recent changes might not be reflected in this value. format: int64 type: integer latestStreamARN: - description: The Amazon Resource Name (ARN) that uniquely identifies - the latest stream for this table. + description: |- + The Amazon Resource Name (ARN) that uniquely identifies the latest stream + for this table. type: string latestStreamLabel: - description: "A timestamp, in ISO 8601 format, for this stream. \n - Note that LatestStreamLabel is not a unique identifier for the stream, - because it is possible that a stream from another table might have - the same timestamp. However, the combination of the following three - elements is guaranteed to be unique: \n * Amazon Web Services customer - ID \n * Table name \n * StreamLabel" + description: |- + A timestamp, in ISO 8601 format, for this stream. + + + Note that LatestStreamLabel is not a unique identifier for the stream, because + it is possible that a stream from another table might have the same timestamp. + However, the combination of the following three elements is guaranteed to + be unique: + + + * Amazon Web Services customer ID + + + * Table name + + + * StreamLabel type: string replicas: description: Represents replicas of the table. @@ -547,9 +641,9 @@ spec: indexName: type: string provisionedThroughputOverride: - description: Replica-specific provisioned throughput settings. - If not specified, uses the source table's provisioned - throughput settings. + description: |- + Replica-specific provisioned throughput settings. If not specified, uses + the source table's provisioned throughput settings. properties: readCapacityUnits: format: int64 @@ -560,9 +654,9 @@ spec: kmsMasterKeyID: type: string provisionedThroughputOverride: - description: Replica-specific provisioned throughput settings. - If not specified, uses the source table's provisioned throughput - settings. + description: |- + Replica-specific provisioned throughput settings. If not specified, uses + the source table's provisioned throughput settings. properties: readCapacityUnits: format: int64 @@ -608,23 +702,42 @@ spec: was created. type: string tableSizeBytes: - description: The total size of the specified table, in bytes. DynamoDB - updates this value approximately every six hours. Recent changes - might not be reflected in this value. + description: |- + The total size of the specified table, in bytes. DynamoDB updates this value + approximately every six hours. Recent changes might not be reflected in this + value. format: int64 type: integer tableStatus: - description: "The current state of the table: \n * CREATING - The - table is being created. \n * UPDATING - The table/index configuration - is being updated. The table/index remains available for data operations - when UPDATING. \n * DELETING - The table is being deleted. \n * - ACTIVE - The table is ready for use. \n * INACCESSIBLE_ENCRYPTION_CREDENTIALS - - The KMS key used to encrypt the table in inaccessible. Table operations - may fail due to failure to use the KMS key. DynamoDB will initiate - the table archival process when a table's KMS key remains inaccessible - for more than seven days. \n * ARCHIVING - The table is being archived. - Operations are not allowed until archival is complete. \n * ARCHIVED - - The table has been archived. See the ArchivalReason for more information." + description: |- + The current state of the table: + + + * CREATING - The table is being created. + + + * UPDATING - The table/index configuration is being updated. The table/index + remains available for data operations when UPDATING. + + + * DELETING - The table is being deleted. + + + * ACTIVE - The table is ready for use. + + + * INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the + table in inaccessible. Table operations may fail due to failure to use + the KMS key. DynamoDB will initiate the table archival process when a + table's KMS key remains inaccessible for more than seven days. + + + * ARCHIVING - The table is being archived. Operations are not allowed + until archival is complete. + + + * ARCHIVED - The table has been archived. See the ArchivalReason for more + information. type: string type: object type: object diff --git a/addons/dynamodb-chart/crds/services.k8s.aws_adoptedresources.yaml b/addons/dynamodb-chart/crds/services.k8s.aws_adoptedresources.yaml index d8d51261..65eff735 100644 --- a/addons/dynamodb-chart/crds/services.k8s.aws_adoptedresources.yaml +++ b/addons/dynamodb-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.14.0 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,149 @@ 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 +212,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/dynamodb-chart/crds/services.k8s.aws_fieldexports.yaml b/addons/dynamodb-chart/crds/services.k8s.aws_fieldexports.yaml index 4a7ab61b..4d3a8f1d 100644 --- a/addons/dynamodb-chart/crds/services.k8s.aws_fieldexports.yaml +++ b/addons/dynamodb-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.14.0 name: fieldexports.services.k8s.aws spec: group: services.k8s.aws @@ -21,14 +20,19 @@ spec: description: FieldExport is the schema for the FieldExport API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -36,15 +40,17 @@ spec: description: FieldExportSpec defines the desired state of the FieldExport. properties: from: - description: ResourceFieldSelector provides the values necessary to - identify an individual field on an individual K8s resource. + description: |- + ResourceFieldSelector provides the values necessary to identify an individual + field on an individual K8s resource. properties: path: type: string resource: - description: NamespacedResource provides all the values necessary - to identify an ACK resource of a given type (within the same - namespace as the custom resource containing this type). + description: |- + NamespacedResource provides all the values necessary to identify an ACK + resource of a given type (within the same namespace as the custom resource + containing this type). properties: group: type: string @@ -62,16 +68,18 @@ spec: - resource type: object to: - description: FieldExportTarget provides the values necessary to identify - the output path for a field export. + description: |- + FieldExportTarget provides the values necessary to identify the + output path for a field export. properties: key: description: Key overrides the default value (`.`) for the FieldExport target type: string kind: - description: FieldExportOutputType represents all types that can - be produced by a field export operation + description: |- + FieldExportOutputType represents all types that can be produced by a field + export operation enum: - configmap - secret @@ -94,12 +102,14 @@ spec: description: FieldExportStatus defines the observed status of the FieldExport. properties: conditions: - description: A collection of `ackv1alpha1.Condition` objects that - describe the various recoverable states of the field CR + description: |- + A collection of `ackv1alpha1.Condition` objects that describe the various + recoverable states of the field CR items: - description: Condition is the common struct used by all CRDs managed - by ACK service controllers to indicate terminal states of the - CR and its backend AWS service API resource + description: |- + Condition is the common struct used by all CRDs managed by ACK service + controllers to indicate terminal states of the CR and its backend AWS + service API resource properties: lastTransitionTime: description: Last time the condition transitioned from one status diff --git a/addons/dynamodb-chart/templates/NOTES.txt b/addons/dynamodb-chart/templates/NOTES.txt index 931df9d0..05e5d83b 100644 --- a/addons/dynamodb-chart/templates/NOTES.txt +++ b/addons/dynamodb-chart/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/dynamodb-controller:1.2.6". +This chart deploys "public.ecr.aws/aws-controllers-k8s/dynamodb-controller:1.2.9". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/addons/dynamodb-chart/templates/_helpers.tpl b/addons/dynamodb-chart/templates/_helpers.tpl index 391d5de3..a0f4f36a 100644 --- a/addons/dynamodb-chart/templates/_helpers.tpl +++ b/addons/dynamodb-chart/templates/_helpers.tpl @@ -1,5 +1,5 @@ {{/* The name of the application this chart installs */}} -{{- define "app.name" -}} +{{- define "ack-dynamodb-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-dynamodb-controller.app.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -22,27 +22,159 @@ 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-dynamodb-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-dynamodb-controller.service-account.name" -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} -{{- define "watch-namespace" -}} +{{- define "ack-dynamodb-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-dynamodb-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-dynamodb-controller.aws.credentials.path" -}} +{{ $secret_mount_path := include "ack-dynamodb-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-dynamodb-controller.rbac-rules" -}} +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: + - dynamodb.services.k8s.aws + resources: + - backups + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dynamodb.services.k8s.aws + resources: + - backups/status + verbs: + - get + - patch + - update +- apiGroups: + - dynamodb.services.k8s.aws + resources: + - globaltables + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dynamodb.services.k8s.aws + resources: + - globaltables/status + verbs: + - get + - patch + - update +- apiGroups: + - dynamodb.services.k8s.aws + resources: + - tables + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dynamodb.services.k8s.aws + resources: + - tables/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/dynamodb-chart/templates/caches-role-binding.yaml b/addons/dynamodb-chart/templates/caches-role-binding.yaml new file mode 100644 index 00000000..1c5b27ae --- /dev/null +++ b/addons/dynamodb-chart/templates/caches-role-binding.yaml @@ -0,0 +1,26 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: ack-namespaces-cache-dynamodb-controller +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: ack-namespaces-cache-dynamodb-controller +subjects: +- kind: ServiceAccount + name: ack-dynamodb-controller + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: ack-configmaps-cache-dynamodb-controller + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + apiGroup: rbac.authorization.k8s.io + name: ack-configmaps-cache-dynamodb-controller +subjects: +- kind: ServiceAccount + name: ack-dynamodb-controller + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/addons/dynamodb-chart/templates/caches-role.yaml b/addons/dynamodb-chart/templates/caches-role.yaml new file mode 100644 index 00000000..188513cf --- /dev/null +++ b/addons/dynamodb-chart/templates/caches-role.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ack-namespaces-cache-dynamodb-controller +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: ack-configmaps-cache-dynamodb-controller + namespace: {{ .Release.Namespace }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch \ No newline at end of file diff --git a/addons/dynamodb-chart/templates/cluster-role-binding.yaml b/addons/dynamodb-chart/templates/cluster-role-binding.yaml index dfaa2326..c576d003 100644 --- a/addons/dynamodb-chart/templates/cluster-role-binding.yaml +++ b/addons/dynamodb-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-dynamodb-controller.app.fullname" . }} roleRef: kind: ClusterRole -{{ else }} + apiGroup: rbac.authorization.k8s.io + name: ack-dynamodb-controller +subjects: +- kind: ServiceAccount + name: {{ include "ack-dynamodb-controller.service-account.name" . }} + namespace: {{ .Release.Namespace }} +{{ else if eq .Values.installScope "namespace" }} +{{ $wn := include "ack-dynamodb-controller.watch-namespace" . }} +{{ $namespaces := split "," $wn }} +{{ $fullname := include "ack-dynamodb-controller.app.fullname" . }} +{{ $releaseNamespace := .Release.Namespace }} +{{ $serviceAccountName := include "ack-dynamodb-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-dynamodb-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/dynamodb-chart/templates/cluster-role-controller.yaml b/addons/dynamodb-chart/templates/cluster-role-controller.yaml index 8a049980..754b4c1e 100644 --- a/addons/dynamodb-chart/templates/cluster-role-controller.yaml +++ b/addons/dynamodb-chart/templates/cluster-role-controller.yaml @@ -1,148 +1,29 @@ -apiVersion: rbac.authorization.k8s.io/v1 +{{ $labels := .Values.role.labels }} +{{ $rbacRules := include "ack-dynamodb-controller.rbac-rules" . }} {{ if eq .Values.installScope "cluster" }} +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: ack-dynamodb-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-dynamodb-controller.watch-namespace" . }} +{{ $namespaces := split "," $wn }} +{{ range $namespaces }} +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - creationTimestamp: null name: ack-dynamodb-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: - - dynamodb.services.k8s.aws - resources: - - backups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - dynamodb.services.k8s.aws - resources: - - backups/status - verbs: - - get - - patch - - update -- apiGroups: - - dynamodb.services.k8s.aws - resources: - - globaltables - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - dynamodb.services.k8s.aws - resources: - - globaltables/status - verbs: - - get - - patch - - update -- apiGroups: - - dynamodb.services.k8s.aws - resources: - - tables - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - dynamodb.services.k8s.aws - resources: - - tables/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/dynamodb-chart/templates/deployment.yaml b/addons/dynamodb-chart/templates/deployment.yaml index cea38ec9..0c23b5e6 100644 --- a/addons/dynamodb-chart/templates/deployment.yaml +++ b/addons/dynamodb-chart/templates/deployment.yaml @@ -1,20 +1,20 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "app.fullname" . }} + name: {{ include "ack-dynamodb-controller.app.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-dynamodb-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-dynamodb-controller.app.name" . }} + helm.sh/chart: {{ include "ack-dynamodb-controller.chart.name-version" . }} spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-dynamodb-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-dynamodb-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm - k8s-app: {{ include "app.name" . }} + k8s-app: {{ include "ack-dynamodb-controller.app.name" . }} {{- range $key, $value := .Values.deployment.labels }} {{ $key }}: {{ $value | quote }} {{- end }} spec: - serviceAccountName: {{ include "service-account.name" . }} + serviceAccountName: {{ include "ack-dynamodb-controller.service-account.name" . }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{- range .Values.image.pullSecrets }} @@ -64,13 +64,21 @@ 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 }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} @@ -90,7 +98,7 @@ spec: - name: AWS_ENDPOINT_URL value: {{ .Values.aws.endpoint_url | quote }} - name: ACK_WATCH_NAMESPACE - value: {{ include "watch-namespace" . }} + value: {{ include "ack-dynamodb-controller.watch-namespace" . }} - name: DELETION_POLICY value: {{ .Values.deletionPolicy }} - name: LEADER_ELECTION_NAMESPACE @@ -99,17 +107,25 @@ 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.aws.credentials.secretName }} - name: AWS_SHARED_CREDENTIALS_FILE - value: {{ include "aws.credentials.path" . }} + value: {{ include "ack-dynamodb-controller.aws.credentials.path" . }} - name: AWS_PROFILE value: {{ .Values.aws.credentials.profile }} {{- end }} @@ -119,7 +135,7 @@ spec: volumeMounts: {{- if .Values.aws.credentials.secretName }} - name: {{ .Values.aws.credentials.secretName }} - mountPath: {{ include "aws.credentials.secret_mount_path" . }} + mountPath: {{ include "ack-dynamodb-controller.aws.credentials.secret_mount_path" . }} readOnly: true {{- end }} {{- if .Values.deployment.extraVolumeMounts -}} @@ -132,6 +148,18 @@ spec: 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/dynamodb-chart/templates/leader-election-role-binding.yaml b/addons/dynamodb-chart/templates/leader-election-role-binding.yaml index 2c72a1aa..52284b18 100644 --- a/addons/dynamodb-chart/templates/leader-election-role-binding.yaml +++ b/addons/dynamodb-chart/templates/leader-election-role-binding.yaml @@ -14,5 +14,5 @@ roleRef: name: dynamodb-leader-election-role subjects: - kind: ServiceAccount - name: {{ include "service-account.name" . }} + name: {{ include "ack-dynamodb-controller.service-account.name" . }} namespace: {{ .Release.Namespace }}{{- end }} diff --git a/addons/dynamodb-chart/templates/metrics-service.yaml b/addons/dynamodb-chart/templates/metrics-service.yaml index 638858a3..3d3fdf75 100644 --- a/addons/dynamodb-chart/templates/metrics-service.yaml +++ b/addons/dynamodb-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-dynamodb-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-dynamodb-controller.app.name" . }} + helm.sh/chart: {{ include "ack-dynamodb-controller.chart.name-version" . }} spec: selector: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-dynamodb-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm - k8s-app: {{ include "app.name" . }} + k8s-app: {{ include "ack-dynamodb-controller.app.name" . }} {{- range $key, $value := .Values.deployment.labels }} {{ $key }}: {{ $value | quote }} {{- end }} diff --git a/addons/dynamodb-chart/templates/role-writer.yaml b/addons/dynamodb-chart/templates/role-writer.yaml index 3672e740..d7bf37a3 100644 --- a/addons/dynamodb-chart/templates/role-writer.yaml +++ b/addons/dynamodb-chart/templates/role-writer.yaml @@ -10,11 +10,8 @@ rules: - dynamodb.services.k8s.aws resources: - backups - - globaltables - - tables - verbs: - create - delete diff --git a/addons/dynamodb-chart/templates/service-account.yaml b/addons/dynamodb-chart/templates/service-account.yaml index 73306395..adc5aa95 100644 --- a/addons/dynamodb-chart/templates/service-account.yaml +++ b/addons/dynamodb-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-dynamodb-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-dynamodb-controller.app.name" . }} + helm.sh/chart: {{ include "ack-dynamodb-controller.chart.name-version" . }} + name: {{ include "ack-dynamodb-controller.service-account.name" . }} namespace: {{ .Release.Namespace }} annotations: {{- range $key, $value := .Values.serviceAccount.annotations }} diff --git a/addons/dynamodb-chart/values.schema.json b/addons/dynamodb-chart/values.schema.json index ac28b680..742163eb 100644 --- a/addons/dynamodb-chart/values.schema.json +++ b/addons/dynamodb-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" diff --git a/addons/dynamodb-chart/values.yaml b/addons/dynamodb-chart/values.yaml index a63ff3ad..c8941fb7 100644 --- a/addons/dynamodb-chart/values.yaml +++ b/addons/dynamodb-chart/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/dynamodb-controller - tag: 1.2.6 + tag: 1.2.9 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