diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index ee63afdc..00abe7f8 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,8 +1,8 @@ ack_generate_info: - build_date: "2024-06-28T14:33:25Z" - build_hash: 14cef51778d471698018b6c38b604181a6948248 - go_version: go1.22.2 - version: v0.34.0 + build_date: "2024-10-10T04:08:29Z" + build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b + go_version: go1.23.2 + version: v0.39.1 api_directory_checksum: 73afd1cf92f1261c45bbb52544adf4da5c6a7cd0 api_version: v1alpha1 aws_sdk_go_version: v1.49.0 diff --git a/apis/v1alpha1/cache_parameter_group.go b/apis/v1alpha1/cache_parameter_group.go index a74dd72c..71335998 100644 --- a/apis/v1alpha1/cache_parameter_group.go +++ b/apis/v1alpha1/cache_parameter_group.go @@ -29,7 +29,7 @@ type CacheParameterGroupSpec struct { // can be used with. // // Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | - // redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x + // redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | redis7 // +kubebuilder:validation:Required CacheParameterGroupFamily *string `json:"cacheParameterGroupFamily"` // A user-specified name for the cache parameter group. diff --git a/apis/v1alpha1/cache_subnet_group.go b/apis/v1alpha1/cache_subnet_group.go index 0286553e..b1f89a8b 100644 --- a/apis/v1alpha1/cache_subnet_group.go +++ b/apis/v1alpha1/cache_subnet_group.go @@ -67,6 +67,11 @@ type CacheSubnetGroupStatus struct { // A list of subnets associated with the cache subnet group. // +kubebuilder:validation:Optional Subnets []*Subnet `json:"subnets,omitempty"` + // Either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads using Redis + // engine version 6.2 onward or Memcached engine version 1.6.6 on all instances + // built on the Nitro system (http://aws.amazon.com/ec2/nitro/). + // +kubebuilder:validation:Optional + SupportedNetworkTypes []*string `json:"supportedNetworkTypes,omitempty"` // The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet // group. // +kubebuilder:validation:Optional diff --git a/apis/v1alpha1/replication_group.go b/apis/v1alpha1/replication_group.go index 48f9bfbd..3491a578 100644 --- a/apis/v1alpha1/replication_group.go +++ b/apis/v1alpha1/replication_group.go @@ -72,44 +72,45 @@ type ReplicationGroupSpec struct { // the current generation types provide more memory and computational power // at lower cost when compared to their equivalent previous generation counterparts. // - // - General purpose: Current generation: M6g node types (available only - // for Redis engine version 5.0.6 onward and for Memcached engine version - // 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, - // cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge - // For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, - // cache.m5.12xlarge, cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge T4g node types (available - // only for Redis engine version 5.0.6 onward and Memcached engine version - // 1.5.16 onward): cache.t4g.micro, cache.t4g.small, cache.t4g.medium T3 - // node types: cache.t3.micro, cache.t3.small, cache.t3.medium T2 node types: - // cache.t2.micro, cache.t2.small, cache.t2.medium Previous generation: (not - // recommended. Existing clusters are still supported but creation of new - // clusters is not supported for these types.) T1 node types: cache.t1.micro - // M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // - General purpose: Current generation: M7g node types: cache.m7g.large, + // cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, + // cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported + // Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + // M6g node types (available only for Redis engine version 5.0.6 onward and + // for Memcached engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, + // cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, + // cache.m6g.16xlarge M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, + // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: + // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // T4g node types (available only for Redis engine version 5.0.6 onward and + // Memcached engine version 1.5.16 onward): cache.t4g.micro, cache.t4g.small, + // cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium + // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium Previous + // generation: (not recommended. Existing clusters are still supported but + // creation of new clusters is not supported for these types.) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // // - Compute optimized: Previous generation: (not recommended. Existing clusters // are still supported but creation of new clusters is not supported for // these types.) C1 node types: cache.c1.xlarge // - // - Memory optimized with data tiering: Current generation: R6gd node types - // (available only for Redis engine version 6.2 onward). cache.r6gd.xlarge, - // cache.r6gd.2xlarge, cache.r6gd.4xlarge, cache.r6gd.8xlarge, cache.r6gd.12xlarge, - // cache.r6gd.16xlarge - // - // - Memory optimized: Current generation: R6g node types (available only - // for Redis engine version 5.0.6 onward and for Memcached engine version - // 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge - // For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, - // cache.r5.12xlarge, cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, - // cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge - // Previous generation: (not recommended. Existing clusters are still supported - // but creation of new clusters is not supported for these types.) M2 node - // types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge R3 node types: - // cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge + // - Memory optimized: Current generation: R7g node types: cache.r7g.large, + // cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, + // cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported + // Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + // R6g node types (available only for Redis engine version 5.0.6 onward and + // for Memcached engine version 1.5.16 onward): cache.r6g.large, cache.r6g.xlarge, + // cache.r6g.2xlarge, cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, + // cache.r6g.16xlarge R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, + // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: + // cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, + // cache.r4.16xlarge Previous generation: (not recommended. Existing clusters + // are still supported but creation of new clusters is not supported for + // these types.) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // cache.r3.8xlarge // // Additional node type info // @@ -144,6 +145,13 @@ type ReplicationGroupSpec struct { // see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string `json:"cacheSubnetGroupName,omitempty"` CacheSubnetGroupRef *ackv1alpha1.AWSResourceReferenceWrapper `json:"cacheSubnetGroupRef,omitempty"` + // Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you + // must first set the cluster mode to Compatible. Compatible mode allows your + // Redis clients to connect using both cluster mode enabled and cluster mode + // disabled. After you migrate all Redis clients to use cluster mode enabled, + // you can then complete cluster mode configuration and set the cluster mode + // to Enabled. + ClusterMode *string `json:"clusterMode,omitempty"` // Enables data tiering. Data tiering is only supported for replication groups // using the r6gd node type. This parameter must be set to true when using r6gd // nodes. For more information, see Data tiering (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html). @@ -152,7 +160,7 @@ type ReplicationGroupSpec struct { // +kubebuilder:validation:Required Description *string `json:"description"` // The name of the cache engine to be used for the clusters in this replication - // group. Must be Redis. + // group. The value must be set to Redis. Engine *string `json:"engine,omitempty"` // The version number of the cache engine to be used for the clusters in this // replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions @@ -165,6 +173,11 @@ type ReplicationGroupSpec struct { // existing cluster or replication group and create it anew with the earlier // engine version. EngineVersion *string `json:"engineVersion,omitempty"` + // The network type you choose when creating a replication group, either ipv4 + // | ipv6. IPv6 is supported for workloads using Redis engine version 6.2 onward + // or Memcached engine version 1.6.6 on all instances built on the Nitro system + // (http://aws.amazon.com/ec2/nitro/). + IPDiscovery *string `json:"ipDiscovery,omitempty"` // The ID of the KMS key used to encrypt the disk in the cluster. KMSKeyID *string `json:"kmsKeyID,omitempty"` // Specifies the destination, format and type of the logs. @@ -172,6 +185,10 @@ type ReplicationGroupSpec struct { // A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. // For more information, see Minimizing Downtime: Multi-AZ (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html). MultiAZEnabled *bool `json:"multiAZEnabled,omitempty"` + // Must be either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads + // using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on + // all instances built on the Nitro system (http://aws.amazon.com/ec2/nitro/). + NetworkType *string `json:"networkType,omitempty"` // A list of node group (shard) configuration options. Each node group (shard) // configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, // ReplicaCount, and Slots. @@ -267,6 +284,9 @@ type ReplicationGroupSpec struct { // Virtual Private Cloud (Amazon VPC). SecurityGroupIDs []*string `json:"securityGroupIDs,omitempty"` SecurityGroupRefs []*ackv1alpha1.AWSResourceReferenceWrapper `json:"securityGroupRefs,omitempty"` + // The name of the snapshot used to create a replication group. Available for + // Redis only. + ServerlessCacheSnapshotName *string `json:"serverlessCacheSnapshotName,omitempty"` // A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB // snapshot files stored in Amazon S3. The snapshot files are used to populate // the new replication group. The Amazon S3 object name in the ARN cannot contain @@ -302,10 +322,6 @@ type ReplicationGroupSpec struct { Tags []*Tag `json:"tags,omitempty"` // A flag that enables in-transit encryption when set to true. // - // You cannot modify the value of TransitEncryptionEnabled after the cluster - // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - // to true when you create a cluster. - // // This parameter is valid only if the Engine parameter is redis, the EngineVersion // parameter is 3.2.6, 4.x or later, and the cluster is being created in an // Amazon VPC. @@ -320,6 +336,21 @@ type ReplicationGroupSpec struct { // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, // an AuthToken, and a CacheSubnetGroup. TransitEncryptionEnabled *bool `json:"transitEncryptionEnabled,omitempty"` + // A setting that allows you to migrate your clients to use in-transit encryption, + // with no downtime. + // + // When setting TransitEncryptionEnabled to true, you can set your TransitEncryptionMode + // to preferred in the same request, to allow both encrypted and unencrypted + // connections at the same time. Once you migrate all your Redis clients to + // use encrypted connections you can modify the value to required to allow encrypted + // connections only. + // + // Setting TransitEncryptionMode to required is a two-step process that requires + // you to first set the TransitEncryptionMode to preferred, after that you can + // set TransitEncryptionMode to required. + // + // This process will not trigger the replacement of the replication group. + TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty"` // The user group to associate with the replication group. UserGroupIDs []*string `json:"userGroupIDs,omitempty"` } diff --git a/apis/v1alpha1/snapshot.go b/apis/v1alpha1/snapshot.go index 8b29231e..9f499206 100644 --- a/apis/v1alpha1/snapshot.go +++ b/apis/v1alpha1/snapshot.go @@ -75,45 +75,45 @@ type SnapshotStatus struct { // the current generation types provide more memory and computational power // at lower cost when compared to their equivalent previous generation counterparts. // - // * General purpose: Current generation: M6g node types (available only - // for Redis engine version 5.0.6 onward and for Memcached engine version - // 1.5.16 onward). cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, - // cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge - // For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, - // cache.m5.12xlarge, cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge T4g node types (available - // only for Redis engine version 5.0.6 onward and Memcached engine version - // 1.5.16 onward): cache.t4g.micro, cache.t4g.small, cache.t4g.medium T3 - // node types: cache.t3.micro, cache.t3.small, cache.t3.medium T2 node types: - // cache.t2.micro, cache.t2.small, cache.t2.medium Previous generation: (not - // recommended. Existing clusters are still supported but creation of new - // clusters is not supported for these types.) T1 node types: cache.t1.micro - // M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * General purpose: Current generation: M7g node types: cache.m7g.large, + // cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, + // cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported + // Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + // M6g node types (available only for Redis engine version 5.0.6 onward and + // for Memcached engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, + // cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, + // cache.m6g.16xlarge M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, + // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: + // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // T4g node types (available only for Redis engine version 5.0.6 onward and + // Memcached engine version 1.5.16 onward): cache.t4g.micro, cache.t4g.small, + // cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium + // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium Previous + // generation: (not recommended. Existing clusters are still supported but + // creation of new clusters is not supported for these types.) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // // * Compute optimized: Previous generation: (not recommended. Existing clusters // are still supported but creation of new clusters is not supported for // these types.) C1 node types: cache.c1.xlarge // - // * Memory optimized with data tiering: Current generation: R6gd node types - // (available only for Redis engine version 6.2 onward). cache.r6gd.xlarge, - // cache.r6gd.2xlarge, cache.r6gd.4xlarge, cache.r6gd.8xlarge, cache.r6gd.12xlarge, - // cache.r6gd.16xlarge - // - // * Memory optimized: Current generation: R6g node types (available only - // for Redis engine version 5.0.6 onward and for Memcached engine version - // 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge - // For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - // For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, - // cache.r5.12xlarge, cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, - // cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge - // Previous generation: (not recommended. Existing clusters are still supported - // but creation of new clusters is not supported for these types.) M2 node - // types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge R3 node types: - // cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge + // * Memory optimized: Current generation: R7g node types: cache.r7g.large, + // cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, + // cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported + // Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + // R6g node types (available only for Redis engine version 5.0.6 onward and + // for Memcached engine version 1.5.16 onward): cache.r6g.large, cache.r6g.xlarge, + // cache.r6g.2xlarge, cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, + // cache.r6g.16xlarge R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, + // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: + // cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, + // cache.r4.16xlarge Previous generation: (not recommended. Existing clusters + // are still supported but creation of new clusters is not supported for + // these types.) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // cache.r3.8xlarge // // Additional node type info // diff --git a/apis/v1alpha1/types.go b/apis/v1alpha1/types.go index a3ef42e4..82e3a685 100644 --- a/apis/v1alpha1/types.go +++ b/apis/v1alpha1/types.go @@ -34,6 +34,12 @@ type Authentication struct { Type *string `json:"type_,omitempty"` } +// Specifies the authentication mode to use. +type AuthenticationMode struct { + Passwords []*string `json:"passwords,omitempty"` + Type *string `json:"type_,omitempty"` +} + // Describes an Availability Zone in which the cluster is launched. type AvailabilityZone struct { Name *string `json:"name,omitempty"` @@ -239,6 +245,7 @@ type CacheSubnetGroup_SDK struct { CacheSubnetGroupDescription *string `json:"cacheSubnetGroupDescription,omitempty"` CacheSubnetGroupName *string `json:"cacheSubnetGroupName,omitempty"` Subnets []*Subnet `json:"subnets,omitempty"` + SupportedNetworkTypes []*string `json:"supportedNetworkTypes,omitempty"` VPCID *string `json:"vpcID,omitempty"` } @@ -251,8 +258,10 @@ type CloudWatchLogsDestinationDetails struct { // Each node group (shard) configuration has the following members: NodeGroupId, // NewReplicaCount, and PreferredAvailabilityZones. type ConfigureShard struct { - NewReplicaCount *int64 `json:"newReplicaCount,omitempty"` - NodeGroupID *string `json:"nodeGroupID,omitempty"` + NewReplicaCount *int64 `json:"newReplicaCount,omitempty"` + NodeGroupID *string `json:"nodeGroupID,omitempty"` + PreferredAvailabilityZones []*string `json:"preferredAvailabilityZones,omitempty"` + PreferredOutpostARNs []*string `json:"preferredOutpostARNs,omitempty"` } // The endpoint from which data should be migrated. @@ -261,6 +270,11 @@ type CustomerNodeEndpoint struct { Port *int64 `json:"port,omitempty"` } +// The data storage limit. +type DataStorage struct { + Maximum *int64 `json:"maximum,omitempty"` +} + // Configuration details of either a CloudWatch Logs destination or Kinesis // Data Firehose destination. type DestinationDetails struct { @@ -277,6 +291,12 @@ type EC2SecurityGroup struct { Status *string `json:"status,omitempty"` } +// The configuration for the number of ElastiCache Processing Units (ECPU) the +// cache can consume per second. +type ECPUPerSecond struct { + Maximum *int64 `json:"maximum,omitempty"` +} + // Represents the information required for client programs to connect to a cache // node. type Endpoint struct { @@ -525,10 +545,13 @@ type RegionalConfiguration struct { type ReplicationGroupPendingModifiedValues struct { AuthTokenStatus *string `json:"authTokenStatus,omitempty"` AutomaticFailoverStatus *string `json:"automaticFailoverStatus,omitempty"` + ClusterMode *string `json:"clusterMode,omitempty"` LogDeliveryConfigurations []*PendingLogDeliveryConfiguration `json:"logDeliveryConfigurations,omitempty"` PrimaryClusterID *string `json:"primaryClusterID,omitempty"` // The status of an online resharding operation. - Resharding *ReshardingStatus `json:"resharding,omitempty"` + Resharding *ReshardingStatus `json:"resharding,omitempty"` + TransitEncryptionEnabled *bool `json:"transitEncryptionEnabled,omitempty"` + TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty"` // The status of the user group update. UserGroups *UserGroupsUpdateStatus `json:"userGroups,omitempty"` } @@ -543,6 +566,7 @@ type ReplicationGroup_SDK struct { AutomaticFailover *string `json:"automaticFailover,omitempty"` CacheNodeType *string `json:"cacheNodeType,omitempty"` ClusterEnabled *bool `json:"clusterEnabled,omitempty"` + ClusterMode *string `json:"clusterMode,omitempty"` // Represents the information required for client programs to connect to a cache // node. ConfigurationEndpoint *Endpoint `json:"configurationEndpoint,omitempty"` @@ -551,11 +575,13 @@ type ReplicationGroup_SDK struct { // The name of the Global datastore and role of this replication group in the // Global datastore. GlobalReplicationGroupInfo *GlobalReplicationGroupInfo `json:"globalReplicationGroupInfo,omitempty"` + IPDiscovery *string `json:"ipDiscovery,omitempty"` KMSKeyID *string `json:"kmsKeyID,omitempty"` LogDeliveryConfigurations []*LogDeliveryConfiguration `json:"logDeliveryConfigurations,omitempty"` MemberClusters []*string `json:"memberClusters,omitempty"` MemberClustersOutpostARNs []*string `json:"memberClustersOutpostARNs,omitempty"` MultiAZ *string `json:"multiAZ,omitempty"` + NetworkType *string `json:"networkType,omitempty"` NodeGroups []*NodeGroup `json:"nodeGroups,omitempty"` // The settings to be applied to the Redis replication group, either immediately // or during the next maintenance window. @@ -567,6 +593,7 @@ type ReplicationGroup_SDK struct { SnapshottingClusterID *string `json:"snapshottingClusterID,omitempty"` Status *string `json:"status,omitempty"` TransitEncryptionEnabled *bool `json:"transitEncryptionEnabled,omitempty"` + TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty"` UserGroupIDs []*string `json:"userGroupIDs,omitempty"` } @@ -616,6 +643,49 @@ type SecurityGroupMembership struct { Status *string `json:"status,omitempty"` } +// The resource representing a serverless cache. +type ServerlessCache struct { + ARN *string `json:"arn,omitempty"` + CreateTime *metav1.Time `json:"createTime,omitempty"` + DailySnapshotTime *string `json:"dailySnapshotTime,omitempty"` + Description *string `json:"description,omitempty"` + // Represents the information required for client programs to connect to a cache + // node. + Endpoint *Endpoint `json:"endpoint,omitempty"` + Engine *string `json:"engine,omitempty"` + FullEngineVersion *string `json:"fullEngineVersion,omitempty"` + KMSKeyID *string `json:"kmsKeyID,omitempty"` + MajorEngineVersion *string `json:"majorEngineVersion,omitempty"` + // Represents the information required for client programs to connect to a cache + // node. + ReaderEndpoint *Endpoint `json:"readerEndpoint,omitempty"` + SecurityGroupIDs []*string `json:"securityGroupIDs,omitempty"` + ServerlessCacheName *string `json:"serverlessCacheName,omitempty"` + SnapshotRetentionLimit *int64 `json:"snapshotRetentionLimit,omitempty"` + Status *string `json:"status,omitempty"` + UserGroupID *string `json:"userGroupID,omitempty"` +} + +// The configuration settings for a specific serverless cache. +type ServerlessCacheConfiguration struct { + Engine *string `json:"engine,omitempty"` + MajorEngineVersion *string `json:"majorEngineVersion,omitempty"` + ServerlessCacheName *string `json:"serverlessCacheName,omitempty"` +} + +// The resource representing a serverless cache snapshot. Available for Redis +// only. +type ServerlessCacheSnapshot struct { + ARN *string `json:"arn,omitempty"` + BytesUsedForCache *string `json:"bytesUsedForCache,omitempty"` + CreateTime *metav1.Time `json:"createTime,omitempty"` + ExpiryTime *metav1.Time `json:"expiryTime,omitempty"` + KMSKeyID *string `json:"kmsKeyID,omitempty"` + ServerlessCacheSnapshotName *string `json:"serverlessCacheSnapshotName,omitempty"` + SnapshotType *string `json:"snapshotType,omitempty"` + Status *string `json:"status,omitempty"` +} + // An update that you can apply to your Redis clusters. type ServiceUpdate struct { AutoUpdateAfterRecommendedApplyByDate *bool `json:"autoUpdateAfterRecommendedApplyByDate,omitempty"` @@ -675,7 +745,8 @@ type Subnet struct { SubnetAvailabilityZone *AvailabilityZone `json:"subnetAvailabilityZone,omitempty"` SubnetIdentifier *string `json:"subnetIdentifier,omitempty"` // The ID of the outpost subnet. - SubnetOutpost *SubnetOutpost `json:"subnetOutpost,omitempty"` + SubnetOutpost *SubnetOutpost `json:"subnetOutpost,omitempty"` + SupportedNetworkTypes []*string `json:"supportedNetworkTypes,omitempty"` } // The ID of the outpost subnet. @@ -738,6 +809,7 @@ type UserGroup_SDK struct { // Returns the updates being applied to the user group. PendingChanges *UserGroupPendingChanges `json:"pendingChanges,omitempty"` ReplicationGroups []*string `json:"replicationGroups,omitempty"` + ServerlessCaches []*string `json:"serverlessCaches,omitempty"` Status *string `json:"status,omitempty"` UserGroupID *string `json:"userGroupID,omitempty"` UserIDs []*string `json:"userIDs,omitempty"` diff --git a/apis/v1alpha1/user.go b/apis/v1alpha1/user.go index 1be62ed7..46afb8ff 100644 --- a/apis/v1alpha1/user.go +++ b/apis/v1alpha1/user.go @@ -28,6 +28,8 @@ type UserSpec struct { // Access permissions string used for this user. // +kubebuilder:validation:Required AccessString *string `json:"accessString"` + // Specifies how to authenticate the user. + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` // The current supported value is Redis. // +kubebuilder:validation:Required Engine *string `json:"engine"` diff --git a/apis/v1alpha1/user_group.go b/apis/v1alpha1/user_group.go index 1cd3b17f..e10abddc 100644 --- a/apis/v1alpha1/user_group.go +++ b/apis/v1alpha1/user_group.go @@ -29,7 +29,8 @@ type UserGroupSpec struct { // +kubebuilder:validation:Required Engine *string `json:"engine"` // A list of tags to be added to this resource. A tag is a key-value pair. A - // tag key must be accompanied by a tag value, although null is accepted. + // tag key must be accompanied by a tag value, although null is accepted. Available + // for Redis only. Tags []*Tag `json:"tags,omitempty"` // The ID of the user group. // +kubebuilder:validation:Required @@ -60,6 +61,10 @@ type UserGroupStatus struct { // A list of replication groups that the user group can access. // +kubebuilder:validation:Optional ReplicationGroups []*string `json:"replicationGroups,omitempty"` + // Indicates which serverless caches the specified user group is associated + // with. Available for Redis only. + // +kubebuilder:validation:Optional + ServerlessCaches []*string `json:"serverlessCaches,omitempty"` // Indicates user group status. Can be "creating", "active", "modifying", "deleting". // +kubebuilder:validation:Optional Status *string `json:"status,omitempty"` diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 013abe4c..0627ef85 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -49,6 +49,37 @@ func (in *Authentication) DeepCopy() *Authentication { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthenticationMode) DeepCopyInto(out *AuthenticationMode) { + *out = *in + if in.Passwords != nil { + in, out := &in.Passwords, &out.Passwords + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationMode. +func (in *AuthenticationMode) DeepCopy() *AuthenticationMode { + if in == nil { + return nil + } + out := new(AuthenticationMode) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AvailabilityZone) DeepCopyInto(out *AvailabilityZone) { *out = *in @@ -1059,6 +1090,17 @@ func (in *CacheParameterGroupStatus) DeepCopy() *CacheParameterGroupStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CacheParameterGroupStatus_SDK) DeepCopyInto(out *CacheParameterGroupStatus_SDK) { *out = *in + if in.CacheNodeIDsToReboot != nil { + in, out := &in.CacheNodeIDsToReboot, &out.CacheNodeIDsToReboot + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.CacheParameterGroupName != nil { in, out := &in.CacheParameterGroupName, &out.CacheParameterGroupName *out = new(string) @@ -1339,6 +1381,17 @@ func (in *CacheSubnetGroupStatus) DeepCopyInto(out *CacheSubnetGroupStatus) { } } } + if in.SupportedNetworkTypes != nil { + in, out := &in.SupportedNetworkTypes, &out.SupportedNetworkTypes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.VPCID != nil { in, out := &in.VPCID, &out.VPCID *out = new(string) @@ -1385,6 +1438,17 @@ func (in *CacheSubnetGroup_SDK) DeepCopyInto(out *CacheSubnetGroup_SDK) { } } } + if in.SupportedNetworkTypes != nil { + in, out := &in.SupportedNetworkTypes, &out.SupportedNetworkTypes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.VPCID != nil { in, out := &in.VPCID, &out.VPCID *out = new(string) @@ -1435,6 +1499,28 @@ func (in *ConfigureShard) DeepCopyInto(out *ConfigureShard) { *out = new(string) **out = **in } + if in.PreferredAvailabilityZones != nil { + in, out := &in.PreferredAvailabilityZones, &out.PreferredAvailabilityZones + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PreferredOutpostARNs != nil { + in, out := &in.PreferredOutpostARNs, &out.PreferredOutpostARNs + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigureShard. @@ -1472,6 +1558,26 @@ func (in *CustomerNodeEndpoint) DeepCopy() *CustomerNodeEndpoint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataStorage) DeepCopyInto(out *DataStorage) { + *out = *in + if in.Maximum != nil { + in, out := &in.Maximum, &out.Maximum + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataStorage. +func (in *DataStorage) DeepCopy() *DataStorage { + if in == nil { + return nil + } + out := new(DataStorage) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DestinationDetails) DeepCopyInto(out *DestinationDetails) { *out = *in @@ -1527,6 +1633,26 @@ func (in *EC2SecurityGroup) DeepCopy() *EC2SecurityGroup { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ECPUPerSecond) DeepCopyInto(out *ECPUPerSecond) { + *out = *in + if in.Maximum != nil { + in, out := &in.Maximum, &out.Maximum + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ECPUPerSecond. +func (in *ECPUPerSecond) DeepCopy() *ECPUPerSecond { + if in == nil { + return nil + } + out := new(ECPUPerSecond) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Endpoint) DeepCopyInto(out *Endpoint) { *out = *in @@ -2542,6 +2668,11 @@ func (in *ReplicationGroupPendingModifiedValues) DeepCopyInto(out *ReplicationGr *out = new(string) **out = **in } + if in.ClusterMode != nil { + in, out := &in.ClusterMode, &out.ClusterMode + *out = new(string) + **out = **in + } if in.LogDeliveryConfigurations != nil { in, out := &in.LogDeliveryConfigurations, &out.LogDeliveryConfigurations *out = make([]*PendingLogDeliveryConfiguration, len(*in)) @@ -2563,6 +2694,16 @@ func (in *ReplicationGroupPendingModifiedValues) DeepCopyInto(out *ReplicationGr *out = new(ReshardingStatus) (*in).DeepCopyInto(*out) } + if in.TransitEncryptionEnabled != nil { + in, out := &in.TransitEncryptionEnabled, &out.TransitEncryptionEnabled + *out = new(bool) + **out = **in + } + if in.TransitEncryptionMode != nil { + in, out := &in.TransitEncryptionMode, &out.TransitEncryptionMode + *out = new(string) + **out = **in + } if in.UserGroups != nil { in, out := &in.UserGroups, &out.UserGroups *out = new(UserGroupsUpdateStatus) @@ -2634,6 +2775,11 @@ func (in *ReplicationGroupSpec) DeepCopyInto(out *ReplicationGroupSpec) { *out = new(corev1alpha1.AWSResourceReferenceWrapper) (*in).DeepCopyInto(*out) } + if in.ClusterMode != nil { + in, out := &in.ClusterMode, &out.ClusterMode + *out = new(string) + **out = **in + } if in.DataTieringEnabled != nil { in, out := &in.DataTieringEnabled, &out.DataTieringEnabled *out = new(bool) @@ -2654,6 +2800,11 @@ func (in *ReplicationGroupSpec) DeepCopyInto(out *ReplicationGroupSpec) { *out = new(string) **out = **in } + if in.IPDiscovery != nil { + in, out := &in.IPDiscovery, &out.IPDiscovery + *out = new(string) + **out = **in + } if in.KMSKeyID != nil { in, out := &in.KMSKeyID, &out.KMSKeyID *out = new(string) @@ -2675,6 +2826,11 @@ func (in *ReplicationGroupSpec) DeepCopyInto(out *ReplicationGroupSpec) { *out = new(bool) **out = **in } + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) + **out = **in + } if in.NodeGroupConfiguration != nil { in, out := &in.NodeGroupConfiguration, &out.NodeGroupConfiguration *out = make([]*NodeGroupConfiguration, len(*in)) @@ -2754,6 +2910,11 @@ func (in *ReplicationGroupSpec) DeepCopyInto(out *ReplicationGroupSpec) { } } } + if in.ServerlessCacheSnapshotName != nil { + in, out := &in.ServerlessCacheSnapshotName, &out.ServerlessCacheSnapshotName + *out = new(string) + **out = **in + } if in.SnapshotARNs != nil { in, out := &in.SnapshotARNs, &out.SnapshotARNs *out = make([]*string, len(*in)) @@ -2796,6 +2957,11 @@ func (in *ReplicationGroupSpec) DeepCopyInto(out *ReplicationGroupSpec) { *out = new(bool) **out = **in } + if in.TransitEncryptionMode != nil { + in, out := &in.TransitEncryptionMode, &out.TransitEncryptionMode + *out = new(string) + **out = **in + } if in.UserGroupIDs != nil { in, out := &in.UserGroupIDs, &out.UserGroupIDs *out = make([]*string, len(*in)) @@ -3032,6 +3198,11 @@ func (in *ReplicationGroup_SDK) DeepCopyInto(out *ReplicationGroup_SDK) { *out = new(bool) **out = **in } + if in.ClusterMode != nil { + in, out := &in.ClusterMode, &out.ClusterMode + *out = new(string) + **out = **in + } if in.ConfigurationEndpoint != nil { in, out := &in.ConfigurationEndpoint, &out.ConfigurationEndpoint *out = new(Endpoint) @@ -3052,6 +3223,11 @@ func (in *ReplicationGroup_SDK) DeepCopyInto(out *ReplicationGroup_SDK) { *out = new(GlobalReplicationGroupInfo) (*in).DeepCopyInto(*out) } + if in.IPDiscovery != nil { + in, out := &in.IPDiscovery, &out.IPDiscovery + *out = new(string) + **out = **in + } if in.KMSKeyID != nil { in, out := &in.KMSKeyID, &out.KMSKeyID *out = new(string) @@ -3095,6 +3271,11 @@ func (in *ReplicationGroup_SDK) DeepCopyInto(out *ReplicationGroup_SDK) { *out = new(string) **out = **in } + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) + **out = **in + } if in.NodeGroups != nil { in, out := &in.NodeGroups, &out.NodeGroups *out = make([]*NodeGroup, len(*in)) @@ -3145,6 +3326,11 @@ func (in *ReplicationGroup_SDK) DeepCopyInto(out *ReplicationGroup_SDK) { *out = new(bool) **out = **in } + if in.TransitEncryptionMode != nil { + in, out := &in.TransitEncryptionMode, &out.TransitEncryptionMode + *out = new(string) + **out = **in + } if in.UserGroupIDs != nil { in, out := &in.UserGroupIDs, &out.UserGroupIDs *out = make([]*string, len(*in)) @@ -3368,6 +3554,184 @@ func (in *SecurityGroupMembership) DeepCopy() *SecurityGroupMembership { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerlessCache) DeepCopyInto(out *ServerlessCache) { + *out = *in + if in.ARN != nil { + in, out := &in.ARN, &out.ARN + *out = new(string) + **out = **in + } + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = (*in).DeepCopy() + } + if in.DailySnapshotTime != nil { + in, out := &in.DailySnapshotTime, &out.DailySnapshotTime + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Endpoint != nil { + in, out := &in.Endpoint, &out.Endpoint + *out = new(Endpoint) + (*in).DeepCopyInto(*out) + } + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.FullEngineVersion != nil { + in, out := &in.FullEngineVersion, &out.FullEngineVersion + *out = new(string) + **out = **in + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.MajorEngineVersion != nil { + in, out := &in.MajorEngineVersion, &out.MajorEngineVersion + *out = new(string) + **out = **in + } + if in.ReaderEndpoint != nil { + in, out := &in.ReaderEndpoint, &out.ReaderEndpoint + *out = new(Endpoint) + (*in).DeepCopyInto(*out) + } + if in.SecurityGroupIDs != nil { + in, out := &in.SecurityGroupIDs, &out.SecurityGroupIDs + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ServerlessCacheName != nil { + in, out := &in.ServerlessCacheName, &out.ServerlessCacheName + *out = new(string) + **out = **in + } + if in.SnapshotRetentionLimit != nil { + in, out := &in.SnapshotRetentionLimit, &out.SnapshotRetentionLimit + *out = new(int64) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.UserGroupID != nil { + in, out := &in.UserGroupID, &out.UserGroupID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessCache. +func (in *ServerlessCache) DeepCopy() *ServerlessCache { + if in == nil { + return nil + } + out := new(ServerlessCache) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerlessCacheConfiguration) DeepCopyInto(out *ServerlessCacheConfiguration) { + *out = *in + if in.Engine != nil { + in, out := &in.Engine, &out.Engine + *out = new(string) + **out = **in + } + if in.MajorEngineVersion != nil { + in, out := &in.MajorEngineVersion, &out.MajorEngineVersion + *out = new(string) + **out = **in + } + if in.ServerlessCacheName != nil { + in, out := &in.ServerlessCacheName, &out.ServerlessCacheName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessCacheConfiguration. +func (in *ServerlessCacheConfiguration) DeepCopy() *ServerlessCacheConfiguration { + if in == nil { + return nil + } + out := new(ServerlessCacheConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerlessCacheSnapshot) DeepCopyInto(out *ServerlessCacheSnapshot) { + *out = *in + if in.ARN != nil { + in, out := &in.ARN, &out.ARN + *out = new(string) + **out = **in + } + if in.BytesUsedForCache != nil { + in, out := &in.BytesUsedForCache, &out.BytesUsedForCache + *out = new(string) + **out = **in + } + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = (*in).DeepCopy() + } + if in.ExpiryTime != nil { + in, out := &in.ExpiryTime, &out.ExpiryTime + *out = (*in).DeepCopy() + } + if in.KMSKeyID != nil { + in, out := &in.KMSKeyID, &out.KMSKeyID + *out = new(string) + **out = **in + } + if in.ServerlessCacheSnapshotName != nil { + in, out := &in.ServerlessCacheSnapshotName, &out.ServerlessCacheSnapshotName + *out = new(string) + **out = **in + } + if in.SnapshotType != nil { + in, out := &in.SnapshotType, &out.SnapshotType + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessCacheSnapshot. +func (in *ServerlessCacheSnapshot) DeepCopy() *ServerlessCacheSnapshot { + if in == nil { + return nil + } + out := new(ServerlessCacheSnapshot) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceUpdate) DeepCopyInto(out *ServiceUpdate) { *out = *in @@ -3884,6 +4248,17 @@ func (in *Subnet) DeepCopyInto(out *Subnet) { *out = new(SubnetOutpost) (*in).DeepCopyInto(*out) } + if in.SupportedNetworkTypes != nil { + in, out := &in.SupportedNetworkTypes, &out.SupportedNetworkTypes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet. @@ -4275,6 +4650,17 @@ func (in *UserGroupStatus) DeepCopyInto(out *UserGroupStatus) { } } } + if in.ServerlessCaches != nil { + in, out := &in.ServerlessCaches, &out.ServerlessCaches + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.Status != nil { in, out := &in.Status, &out.Status *out = new(string) @@ -4326,6 +4712,17 @@ func (in *UserGroup_SDK) DeepCopyInto(out *UserGroup_SDK) { } } } + if in.ServerlessCaches != nil { + in, out := &in.ServerlessCaches, &out.ServerlessCaches + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.Status != nil { in, out := &in.Status, &out.Status *out = new(string) @@ -4436,6 +4833,11 @@ func (in *UserSpec) DeepCopyInto(out *UserSpec) { *out = new(string) **out = **in } + if in.AuthenticationMode != nil { + in, out := &in.AuthenticationMode, &out.AuthenticationMode + *out = new(AuthenticationMode) + (*in).DeepCopyInto(*out) + } if in.Engine != nil { in, out := &in.Engine, &out.Engine *out = new(string) diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 38a413ef..f6bfc6c0 100644 --- a/config/controller/kustomization.yaml +++ b/config/controller/kustomization.yaml @@ -6,4 +6,4 @@ kind: Kustomization images: - name: controller newName: public.ecr.aws/aws-controllers-k8s/elasticache-controller - newTag: 0.1.0 + newTag: 0.1.1 diff --git a/config/crd/bases/elasticache.services.k8s.aws_cacheclusters.yaml b/config/crd/bases/elasticache.services.k8s.aws_cacheclusters.yaml index c51ef39e..c4e27e37 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_cacheclusters.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_cacheclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: cacheclusters.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -57,28 +57,22 @@ spec: description: |- CacheClusterSpec defines the desired state of CacheCluster. - Contains all of the attributes of a specific cluster. properties: authToken: description: |- Reserved parameter. The password used to access a password protected server. - Password constraints: - * Must be only printable ASCII characters. - * Must be at least 16 characters and no more than 128 characters in length. - * The only permitted printable special characters are !, &, #, $, ^, <, >, and -. Other printable special characters cannot be used in the AUTH token. - For more information, see AUTH password (http://redis.io/commands/AUTH) at http://redis.io/commands/AUTH. properties: @@ -109,10 +103,8 @@ spec: Availability Zone or created across multiple Availability Zones in the cluster's region. - This parameter is only supported for Memcached clusters. - If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache assumes single-az mode. type: string @@ -121,28 +113,22 @@ spec: The node group (shard) identifier. This parameter is stored as a lowercase string. - Constraints: - * A name must contain from 1 to 50 alphanumeric characters or hyphens. - * The first character must be a letter. - * A name cannot end with a hyphen or contain two consecutive hyphens. type: string cacheNodeType: description: |- The compute and memory capacity of the nodes in the node group (shard). - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - * General purpose: Current generation: M7g node types: cache.m7g.large, cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported @@ -163,12 +149,10 @@ spec: cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - * Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - * Memory optimized: Current generation: R7g node types: cache.r7g.large, cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported @@ -185,19 +169,14 @@ spec: R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - Additional node type info - * All current generation instance types are created in Amazon VPC by default. - * Redis append-only files (AOF) are not supported for T1 or T2 instances. - * Redis Multi-AZ with automatic failover is not supported on T1 instances. - * Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. type: string @@ -211,7 +190,7 @@ spec: cacheParameterGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -221,13 +200,14 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object cacheSecurityGroupNames: description: |- A list of security group names to associate with this cluster. - Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). items: @@ -237,11 +217,9 @@ spec: description: |- The name of the subnet group to be used for the cluster. - Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC). - If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). @@ -249,7 +227,7 @@ spec: cacheSubnetGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -259,13 +237,14 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object engine: description: |- The name of the cache engine to be used for this cluster. - Valid values for this parameter are: memcached | redis type: string engineVersion: @@ -274,7 +253,6 @@ spec: the supported cache engine versions, use the DescribeCacheEngineVersions operation. - Important: You can upgrade to a newer engine version (see Selecting a Cache Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), but you cannot downgrade to an earlier engine version. If you want to use @@ -334,13 +312,12 @@ spec: The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. - The Amazon SNS topic owner must be the same as the cluster owner. type: string notificationTopicRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -350,17 +327,17 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object numCacheNodes: description: |- The initial number of cache nodes that the cluster has. - For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 40. - If you need more than 40 nodes for your Memcached cluster, please fill out the ElastiCache Limit Increase Request form at http://aws.amazon.com/contact-us/elasticache-node-limit-request/ (http://aws.amazon.com/contact-us/elasticache-node-limit-request/). @@ -380,12 +357,10 @@ spec: description: |- The EC2 Availability Zone in which the cluster is created. - All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use PreferredAvailabilityZones. - Default: System chosen Availability Zone. type: string preferredAvailabilityZones: @@ -393,22 +368,17 @@ spec: A list of the Availability Zones in which cache nodes are created. The order of the zones in the list is not important. - This option is only supported on Memcached. - If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group. - The number of Availability Zones listed must equal the value of NumCacheNodes. - If you want all the nodes in the same Availability Zone, use PreferredAvailabilityZone instead, or repeat the Availability Zone multiple times in the list. - Default: System chosen Availability Zones. items: type: string @@ -434,18 +404,16 @@ spec: group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group. - If the specified replication group is Multi-AZ enabled and the Availability Zone is not specified, the cluster is created in Availability Zones that provide the best spread of read replicas across Availability Zones. - This parameter is only valid if the Engine parameter is redis. type: string replicationGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -455,13 +423,14 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object securityGroupIDs: description: |- One or more VPC security groups associated with the cluster. - Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC). items: @@ -474,10 +443,8 @@ spec: file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas. - This parameter is only valid if the Engine parameter is redis. - Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb items: type: string @@ -488,13 +455,12 @@ spec: group (shard). The snapshot status changes to restoring while the new node group (shard) is being created. - This parameter is only valid if the Engine parameter is redis. type: string snapshotRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -504,6 +470,8 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object snapshotRetentionLimit: @@ -512,10 +480,8 @@ spec: deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot taken today is retained for 5 days before being deleted. - This parameter is only valid if the Engine parameter is redis. - Default: 0 (i.e., automatic backups are disabled for this cache cluster). format: int64 type: integer @@ -524,14 +490,11 @@ spec: The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). - Example: 05:00-09:00 - If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range. - This parameter is only valid if the Engine parameter is redis. type: string tags: @@ -575,7 +538,6 @@ spec: 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: @@ -595,23 +557,19 @@ spec: description: |- A flag that enables encryption at-rest when set to true. - You cannot modify the value of AtRestEncryptionEnabled after the cluster is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled to true when you create a cluster. - Required: Only available when creating a replication group in an Amazon VPC using redis version 3.2.6, 4.x or later. - Default: false type: boolean authTokenEnabled: description: |- A flag that enables using an AuthToken (password) when issuing Redis commands. - Default: false type: boolean authTokenLastModifiedDate: @@ -636,12 +594,10 @@ spec: its own instance of the cluster's protocol-compliant caching software - either Memcached or Redis. - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - * General purpose: Current generation: M7g node types: cache.m7g.large, cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported @@ -662,12 +618,10 @@ spec: cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - * Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - * Memory optimized: Current generation: R7g node types: cache.r7g.large, cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported @@ -684,19 +638,14 @@ spec: R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - Additional node type info - * All current generation instance types are created in Amazon VPC by default. - * Redis append-only files (AOF) are not supported for T1 or T2 instances. - * Redis Multi-AZ with automatic failover is not supported on T1 instances. - * Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. properties: @@ -799,7 +748,6 @@ spec: to connect to any node in the cluster. The configuration endpoint will always have .cfg in it. - Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 properties: address: diff --git a/config/crd/bases/elasticache.services.k8s.aws_cacheparametergroups.yaml b/config/crd/bases/elasticache.services.k8s.aws_cacheparametergroups.yaml index a873d1bf..18c1fd37 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_cacheparametergroups.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_cacheparametergroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: cacheparametergroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -41,7 +41,6 @@ spec: description: |- CacheParameterGroupSpec defines the desired state of CacheParameterGroup. - Represents the output of a CreateCacheParameterGroup operation. properties: cacheParameterGroupFamily: @@ -49,9 +48,8 @@ spec: The name of the cache parameter group family that the cache parameter group can be used with. - Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | - redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x + redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | redis7 type: string cacheParameterGroupName: description: A user-specified name for the cache parameter group. @@ -116,7 +114,6 @@ spec: 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: diff --git a/config/crd/bases/elasticache.services.k8s.aws_cachesubnetgroups.yaml b/config/crd/bases/elasticache.services.k8s.aws_cachesubnetgroups.yaml index a87a3bc5..3492f0e1 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_cachesubnetgroups.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_cachesubnetgroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: cachesubnetgroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -40,13 +40,10 @@ spec: description: |- CacheSubnetGroupSpec defines the desired state of CacheSubnetGroup. - Represents the output of one of the following operations: - * CreateCacheSubnetGroup - * ModifyCacheSubnetGroup properties: cacheSubnetGroupDescription: @@ -56,10 +53,8 @@ spec: description: |- A name for the cache subnet group. This value is stored as a lowercase string. - Constraints: Must contain no more than 255 alphanumeric characters or hyphens. - Example: mysubnetgroup type: string subnetIDs: @@ -71,7 +66,7 @@ spec: items: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -81,6 +76,8 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object type: array @@ -124,7 +121,6 @@ spec: 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: @@ -219,8 +215,20 @@ spec: subnetOutpostARN: type: string type: object + supportedNetworkTypes: + items: + type: string + type: array type: object type: array + supportedNetworkTypes: + description: |- + Either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads using Redis + engine version 6.2 onward or Memcached engine version 1.6.6 on all instances + built on the Nitro system (http://aws.amazon.com/ec2/nitro/). + items: + type: string + type: array vpcID: description: |- The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet diff --git a/config/crd/bases/elasticache.services.k8s.aws_replicationgroups.yaml b/config/crd/bases/elasticache.services.k8s.aws_replicationgroups.yaml index 69cbe8fa..d1994a03 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_replicationgroups.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_replicationgroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: replicationgroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -40,53 +40,42 @@ spec: description: |- ReplicationGroupSpec defines the desired state of ReplicationGroup. - Contains all of the attributes of a specific Redis replication group. properties: atRestEncryptionEnabled: description: |- A flag that enables encryption at rest when set to true. - You cannot modify the value of AtRestEncryptionEnabled after the replication group is created. To enable encryption at rest on a replication group you must set AtRestEncryptionEnabled to true when you create the replication group. - Required: Only available when creating a replication group in an Amazon VPC using redis version 3.2.6, 4.x or later. - Default: false type: boolean authToken: description: |- Reserved parameter. The password used to access a password protected server. - AuthToken can be specified only on replication groups where TransitEncryptionEnabled is true. - For HIPAA compliance, you must specify TransitEncryptionEnabled as true, an AuthToken, and a CacheSubnetGroup. - Password constraints: - * Must be only printable ASCII characters. - * Must be at least 16 characters and no more than 128 characters in length. - * The only permitted printable special characters are !, &, #, $, ^, <, >, and -. Other printable special characters cannot be used in the AUTH token. - For more information, see AUTH password (http://redis.io/commands/AUTH) at http://redis.io/commands/AUTH. properties: @@ -110,78 +99,67 @@ spec: Specifies whether a read-only replica is automatically promoted to read/write primary if the existing primary fails. - AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) replication groups. - Default: false type: boolean cacheNodeType: description: |- The compute and memory capacity of the nodes in the node group (shard). - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - - * General purpose: Current generation: M6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, - cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, - cache.m5.12xlarge, cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, - cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge T4g node types (available - only for Redis engine version 5.0.6 onward and Memcached engine version - 1.5.16 onward): cache.t4g.micro, cache.t4g.small, cache.t4g.medium T3 - node types: cache.t3.micro, cache.t3.small, cache.t3.medium T2 node types: - cache.t2.micro, cache.t2.small, cache.t2.medium Previous generation: (not - recommended. Existing clusters are still supported but creation of new - clusters is not supported for these types.) T1 node types: cache.t1.micro - M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - + * General purpose: Current generation: M7g node types: cache.m7g.large, + cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, + cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + M6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, + cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, + cache.m6g.16xlarge M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, + cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: + cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + T4g node types (available only for Redis engine version 5.0.6 onward and + Memcached engine version 1.5.16 onward): cache.t4g.micro, cache.t4g.small, + cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium + T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium Previous + generation: (not recommended. Existing clusters are still supported but + creation of new clusters is not supported for these types.) T1 node types: + cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + cache.m3.2xlarge * Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - - * Memory optimized with data tiering: Current generation: R6gd node types - (available only for Redis engine version 6.2 onward). cache.r6gd.xlarge, - cache.r6gd.2xlarge, cache.r6gd.4xlarge, cache.r6gd.8xlarge, cache.r6gd.12xlarge, - cache.r6gd.16xlarge - - - * Memory optimized: Current generation: R6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, - cache.r5.12xlarge, cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, - cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge - Previous generation: (not recommended. Existing clusters are still supported - but creation of new clusters is not supported for these types.) M2 node - types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge R3 node types: - cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - + * Memory optimized: Current generation: R7g node types: cache.r7g.large, + cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, + cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + R6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.r6g.large, cache.r6g.xlarge, + cache.r6g.2xlarge, cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, + cache.r6g.16xlarge R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, + cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: + cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, + cache.r4.16xlarge Previous generation: (not recommended. Existing clusters + are still supported but creation of new clusters is not supported for + these types.) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + cache.r3.8xlarge Additional node type info - * All current generation instance types are created in Amazon VPC by default. - * Redis append-only files (AOF) are not supported for T1 or T2 instances. - * Redis Multi-AZ with automatic failover is not supported on T1 instances. - * Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. type: string @@ -191,21 +169,18 @@ spec: If this argument is omitted, the default cache parameter group for the specified engine is used. - If you are running Redis version 3.2.4 or later, only one node group (shard), and want to use a default parameter group, we recommend that you specify the parameter group by name. - * To create a Redis (cluster mode disabled) replication group, use CacheParameterGroupName=default.redis3.2. - * To create a Redis (cluster mode enabled) replication group, use CacheParameterGroupName=default.redis3.2.cluster.on. type: string cacheParameterGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -215,6 +190,8 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object cacheSecurityGroupNames: @@ -227,7 +204,6 @@ spec: description: |- The name of the cache subnet group to be used for the replication group. - If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). @@ -235,7 +211,7 @@ spec: cacheSubnetGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -245,8 +221,19 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object + clusterMode: + description: |- + Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you + must first set the cluster mode to Compatible. Compatible mode allows your + Redis clients to connect using both cluster mode enabled and cluster mode + disabled. After you migrate all Redis clients to use cluster mode enabled, + you can then complete cluster mode configuration and set the cluster mode + to Enabled. + type: string dataTieringEnabled: description: |- Enables data tiering. Data tiering is only supported for replication groups @@ -259,7 +246,7 @@ spec: engine: description: |- The name of the cache engine to be used for the clusters in this replication - group. Must be Redis. + group. The value must be set to Redis. type: string engineVersion: description: |- @@ -267,7 +254,6 @@ spec: replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation. - Important: You can upgrade to a newer engine version (see Selecting a Cache Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) in the ElastiCache User Guide, but you cannot downgrade to an earlier engine @@ -275,6 +261,13 @@ spec: existing cluster or replication group and create it anew with the earlier engine version. type: string + ipDiscovery: + description: |- + The network type you choose when creating a replication group, either ipv4 + | ipv6. IPv6 is supported for workloads using Redis engine version 6.2 onward + or Memcached engine version 1.6.6 on all instances built on the Nitro system + (http://aws.amazon.com/ec2/nitro/). + type: string kmsKeyID: description: The ID of the KMS key used to encrypt the disk in the cluster. @@ -319,13 +312,18 @@ spec: A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see Minimizing Downtime: Multi-AZ (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html). type: boolean + networkType: + description: |- + Must be either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads + using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on + all instances built on the Nitro system (http://aws.amazon.com/ec2/nitro/). + type: string nodeGroupConfiguration: description: |- A list of node group (shard) configuration options. Each node group (shard) configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, ReplicaCount, and Slots. - If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group, you can use this parameter to individually configure each node group (shard), or you can omit this parameter. However, it is required @@ -364,7 +362,6 @@ spec: The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. - The Amazon SNS topic owner must be the same as the cluster owner. type: string numNodeGroups: @@ -373,7 +370,6 @@ spec: this Redis (cluster mode enabled) replication group. For Redis (cluster mode disabled) either omit this parameter or set it to 1. - Default: 1 format: int64 type: integer @@ -389,19 +385,15 @@ spec: in which clusters are allocated. The primary cluster is created in the first AZ in the list. - This parameter is not used if there is more than one node group (shard). You should use NodeGroupConfiguration instead. - If you are creating your replication group in an Amazon VPC (recommended), you can only locate clusters in Availability Zones associated with the subnets in the selected subnet group. - The number of Availability Zones listed must equal the value of NumCacheClusters. - Default: system chosen Availability Zones. items: type: string @@ -413,36 +405,26 @@ spec: (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for ddd are: - Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. - Valid values for ddd are: - * sun - * mon - * tue - * wed - * thu - * fri - * sat - Example: sun:23:00-mon:01:30 type: string primaryClusterID: @@ -450,7 +432,6 @@ spec: The identifier of the cluster that serves as the primary for this replication group. This cluster must already exist and have a status of available. - This parameter is not required if NumCacheClusters, NumNodeGroups, or ReplicasPerNodeGroup is specified. type: string @@ -465,23 +446,18 @@ spec: The replication group identifier. This parameter is stored as a lowercase string. - Constraints: - * A name must contain from 1 to 40 alphanumeric characters or hyphens. - * The first character must be a letter. - * A name cannot end with a hyphen or contain two consecutive hyphens. type: string securityGroupIDs: description: |- One or more Amazon VPC security groups associated with this replication group. - Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud (Amazon VPC). items: @@ -491,7 +467,7 @@ spec: items: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -501,9 +477,16 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object type: array + serverlessCacheSnapshotName: + description: |- + The name of the snapshot used to create a replication group. Available for + Redis only. + type: string snapshotARNs: description: |- A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB @@ -514,7 +497,6 @@ spec: of node groups configured by NodeGroupConfiguration regardless of the number of ARNs specified here. - Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb items: type: string @@ -531,7 +513,6 @@ spec: deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted. - Default: 0 (i.e., automatic backups are disabled for this cluster). format: int64 type: integer @@ -540,10 +521,8 @@ spec: The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). - Example: 05:00-09:00 - If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range. type: string @@ -572,30 +551,37 @@ spec: description: |- A flag that enables in-transit encryption when set to true. - - You cannot modify the value of TransitEncryptionEnabled after the cluster - is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - to true when you create a cluster. - - This parameter is valid only if the Engine parameter is redis, the EngineVersion parameter is 3.2.6, 4.x or later, and the cluster is being created in an Amazon VPC. - If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. - Required: Only available when creating a replication group in an Amazon VPC using redis version 3.2.6, 4.x or later. - Default: false - For HIPAA compliance, you must specify TransitEncryptionEnabled as true, an AuthToken, and a CacheSubnetGroup. type: boolean + transitEncryptionMode: + description: |- + A setting that allows you to migrate your clients to use in-transit encryption, + with no downtime. + + When setting TransitEncryptionEnabled to true, you can set your TransitEncryptionMode + to preferred in the same request, to allow both encrypted and unencrypted + connections at the same time. Once you migrate all your Redis clients to + use encrypted connections you can modify the value to required to allow encrypted + connections only. + + Setting TransitEncryptionMode to required is a two-step process that requires + you to first set the TransitEncryptionMode to preferred, after that you can + set TransitEncryptionMode to required. + + This process will not trigger the replacement of the replication group. + type: string userGroupIDs: description: The user group to associate with the replication group. items: @@ -622,7 +608,6 @@ spec: 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: @@ -652,7 +637,6 @@ spec: A string list, each element of which specifies a cache node type which you can use to scale your cluster or replication group. - When scaling up a Redis cluster or replication group using ModifyCacheCluster or ModifyReplicationGroup, use a value from this list for the CacheNodeType parameter. @@ -663,7 +647,6 @@ spec: description: |- A flag that enables using an AuthToken (password) when issuing Redis commands. - Default: false type: boolean authTokenLastModifiedDate: @@ -686,7 +669,6 @@ spec: i.e., whether its data can be partitioned across multiple shards (API/CLI: node groups). - Valid values: true | false type: boolean conditions: @@ -904,6 +886,8 @@ spec: type: string automaticFailoverStatus: type: string + clusterMode: + type: string logDeliveryConfigurations: items: description: The log delivery configurations being modified @@ -949,6 +933,10 @@ spec: type: number type: object type: object + transitEncryptionEnabled: + type: boolean + transitEncryptionMode: + type: string userGroups: description: The status of the user group update. properties: diff --git a/config/crd/bases/elasticache.services.k8s.aws_snapshots.yaml b/config/crd/bases/elasticache.services.k8s.aws_snapshots.yaml index 09c6ca24..56244023 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_snapshots.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_snapshots.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: snapshots.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -40,7 +40,6 @@ spec: description: |- SnapshotSpec defines the desired state of Snapshot. - Represents a copy of an entire Redis cluster as of the time when the snapshot was taken. properties: @@ -103,7 +102,6 @@ spec: 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: @@ -138,68 +136,58 @@ spec: description: |- The name of the compute and memory capacity node type for the source cluster. - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - - * General purpose: Current generation: M6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward). cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, - cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, - cache.m5.12xlarge, cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, - cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge T4g node types (available - only for Redis engine version 5.0.6 onward and Memcached engine version - 1.5.16 onward): cache.t4g.micro, cache.t4g.small, cache.t4g.medium T3 - node types: cache.t3.micro, cache.t3.small, cache.t3.medium T2 node types: - cache.t2.micro, cache.t2.small, cache.t2.medium Previous generation: (not - recommended. Existing clusters are still supported but creation of new - clusters is not supported for these types.) T1 node types: cache.t1.micro - M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - + * General purpose: Current generation: M7g node types: cache.m7g.large, + cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, + cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + M6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, + cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, + cache.m6g.16xlarge M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, + cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: + cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + T4g node types (available only for Redis engine version 5.0.6 onward and + Memcached engine version 1.5.16 onward): cache.t4g.micro, cache.t4g.small, + cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium + T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium Previous + generation: (not recommended. Existing clusters are still supported but + creation of new clusters is not supported for these types.) T1 node types: + cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + cache.m3.2xlarge * Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - - * Memory optimized with data tiering: Current generation: R6gd node types - (available only for Redis engine version 6.2 onward). cache.r6gd.xlarge, - cache.r6gd.2xlarge, cache.r6gd.4xlarge, cache.r6gd.8xlarge, cache.r6gd.12xlarge, - cache.r6gd.16xlarge - - - * Memory optimized: Current generation: R6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, - cache.r5.12xlarge, cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, - cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge - Previous generation: (not recommended. Existing clusters are still supported - but creation of new clusters is not supported for these types.) M2 node - types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge R3 node types: - cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - + * Memory optimized: Current generation: R7g node types: cache.r7g.large, + cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, + cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + R6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.r6g.large, cache.r6g.xlarge, + cache.r6g.2xlarge, cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, + cache.r6g.16xlarge R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, + cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: + cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, + cache.r4.16xlarge Previous generation: (not recommended. Existing clusters + are still supported but creation of new clusters is not supported for + these types.) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + cache.r3.8xlarge Additional node type info - * All current generation instance types are created in Amazon VPC by default. - * Redis append-only files (AOF) are not supported for T1 or T2 instances. - * Redis Multi-AZ with automatic failover is not supported on T1 instances. - * Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. type: string @@ -312,7 +300,6 @@ spec: description: |- The number of cache nodes in the source cluster. - For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 40. format: int64 @@ -339,31 +326,22 @@ spec: performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. - Valid values for ddd are: - * sun - * mon - * tue - * wed - * thu - * fri - * sat - Example: sun:23:00-mon:01:30 type: string preferredOutpostARN: @@ -377,13 +355,11 @@ spec: For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting it. - For manual snapshots, this field reflects the SnapshotRetentionLimit for the source cluster when the snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can only be deleted using the DeleteSnapshot operation. - Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. format: int64 diff --git a/config/crd/bases/elasticache.services.k8s.aws_usergroups.yaml b/config/crd/bases/elasticache.services.k8s.aws_usergroups.yaml index fb0c481a..4d7f445a 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_usergroups.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_usergroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: usergroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -44,7 +44,8 @@ spec: tags: description: |- A list of tags to be added to this resource. A tag is a key-value pair. A - tag key must be accompanied by a tag value, although null is accepted. + tag key must be accompanied by a tag value, although null is accepted. Available + for Redis only. items: description: |- A tag that can be added to an ElastiCache cluster or replication group. Tags @@ -89,7 +90,6 @@ spec: 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: @@ -161,6 +161,13 @@ spec: items: type: string type: array + serverlessCaches: + description: |- + Indicates which serverless caches the specified user group is associated + with. Available for Redis only. + items: + type: string + type: array status: description: Indicates user group status. Can be "creating", "active", "modifying", "deleting". diff --git a/config/crd/bases/elasticache.services.k8s.aws_users.yaml b/config/crd/bases/elasticache.services.k8s.aws_users.yaml index 1507f204..1c013ffc 100644 --- a/config/crd/bases/elasticache.services.k8s.aws_users.yaml +++ b/config/crd/bases/elasticache.services.k8s.aws_users.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: users.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -41,6 +41,16 @@ spec: accessString: description: Access permissions string used for this user. type: string + authenticationMode: + description: Specifies how to authenticate the user. + properties: + passwords: + items: + type: string + type: array + type_: + type: string + type: object engine: description: The current supported value is Redis. type: string @@ -120,7 +130,6 @@ spec: 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: diff --git a/config/crd/common/bases/services.k8s.aws_adoptedresources.yaml b/config/crd/common/bases/services.k8s.aws_adoptedresources.yaml index 65eff735..b7be3224 100644 --- a/config/crd/common/bases/services.k8s.aws_adoptedresources.yaml +++ b/config/crd/common/bases/services.k8s.aws_adoptedresources.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: adoptedresources.services.k8s.aws spec: group: services.k8s.aws @@ -78,11 +78,9 @@ spec: 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: @@ -105,13 +103,11 @@ spec: 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 @@ -140,7 +136,6 @@ spec: 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 diff --git a/config/crd/common/bases/services.k8s.aws_fieldexports.yaml b/config/crd/common/bases/services.k8s.aws_fieldexports.yaml index 4d3a8f1d..49b4f383 100644 --- a/config/crd/common/bases/services.k8s.aws_fieldexports.yaml +++ b/config/crd/common/bases/services.k8s.aws_fieldexports.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: fieldexports.services.k8s.aws spec: group: services.k8s.aws diff --git a/config/rbac/cluster-role-controller.yaml b/config/rbac/cluster-role-controller.yaml index bb1c76a1..0fc7a8d8 100644 --- a/config/rbac/cluster-role-controller.yaml +++ b/config/rbac/cluster-role-controller.yaml @@ -8,6 +8,7 @@ rules: - "" resources: - configmaps + - secrets verbs: - get - list @@ -21,39 +22,12 @@ rules: - get - list - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - patch - - watch - apiGroups: - ec2.services.k8s.aws resources: - securitygroups - verbs: - - get - - list -- apiGroups: - - ec2.services.k8s.aws - resources: - securitygroups/status - verbs: - - get - - list -- apiGroups: - - ec2.services.k8s.aws - resources: - subnets - verbs: - - get - - list -- apiGroups: - - ec2.services.k8s.aws - resources: - subnets/status verbs: - get @@ -62,125 +36,11 @@ rules: - elasticache.services.k8s.aws resources: - cacheclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - cacheclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - cacheparametergroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - cacheparametergroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - cachesubnetgroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - cachesubnetgroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - replicationgroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - replicationgroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - snapshots - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - snapshots/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - usergroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - usergroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - users verbs: - create @@ -193,6 +53,12 @@ rules: - apiGroups: - elasticache.services.k8s.aws resources: + - cacheclusters/status + - cacheparametergroups/status + - cachesubnetgroups/status + - replicationgroups/status + - snapshots/status + - usergroups/status - users/status verbs: - get @@ -202,25 +68,6 @@ rules: - 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 @@ -233,6 +80,7 @@ rules: - apiGroups: - services.k8s.aws resources: + - adoptedresources/status - fieldexports/status verbs: - get @@ -242,12 +90,6 @@ rules: - sns.services.k8s.aws resources: - topics - verbs: - - get - - list -- apiGroups: - - sns.services.k8s.aws - resources: - topics/status verbs: - get diff --git a/go.mod b/go.mod index 75c4bdcb..f2f73f3f 100644 --- a/go.mod +++ b/go.mod @@ -1,45 +1,46 @@ module github.com/aws-controllers-k8s/elasticache-controller -go 1.21 +go 1.22.0 -toolchain go1.21.5 +toolchain go1.23.2 require ( github.com/aws-controllers-k8s/ec2-controller v1.0.7 - github.com/aws-controllers-k8s/runtime v0.34.0 + github.com/aws-controllers-k8s/runtime v0.39.0 github.com/aws-controllers-k8s/sns-controller v1.0.11 github.com/aws/aws-sdk-go v1.49.0 github.com/ghodss/yaml v1.0.0 - github.com/go-logr/logr v1.4.1 + github.com/go-logr/logr v1.4.2 github.com/google/go-cmp v0.6.0 github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.26.0 - k8s.io/api v0.29.0 - k8s.io/apimachinery v0.29.0 - k8s.io/client-go v0.29.0 - sigs.k8s.io/controller-runtime v0.17.2 + k8s.io/api v0.31.0 + k8s.io/apimachinery v0.31.0 + k8s.io/client-go v0.31.0 + sigs.k8s.io/controller-runtime v0.19.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/itchyny/gojq v0.12.6 // indirect github.com/itchyny/timefmt-go v0.1.3 // indirect @@ -48,36 +49,34 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.18.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/samber/lo v1.37.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.0 // indirect - k8s.io/component-base v0.29.0 // indirect - k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index c02376b5..6d78fe24 100644 --- a/go.sum +++ b/go.sum @@ -1,66 +1,66 @@ github.com/aws-controllers-k8s/ec2-controller v1.0.7 h1:7MDu2bq8NFKbgzzgHYPFRT7bf+SmTchgWuq8ixKK0Jc= github.com/aws-controllers-k8s/ec2-controller v1.0.7/go.mod h1:PvsQehgncHgcu9FiY13M45+GkVsKI98g7G83SrgH7vY= -github.com/aws-controllers-k8s/runtime v0.34.0 h1:pz8MTzz8bY9JMTSMjvWx9SAJ6bJQIEx5ZrXw6wS74mc= -github.com/aws-controllers-k8s/runtime v0.34.0/go.mod h1:aCud9ahYydZ22JhBStUOW2hnzyE1lWPhGAfxW5AW1YU= +github.com/aws-controllers-k8s/runtime v0.39.0 h1:IgOXluSzvb4UcDr9eU7SPw5MJnL7kt5R6DuF5Qu9zVQ= +github.com/aws-controllers-k8s/runtime v0.39.0/go.mod h1:G07g26y1cxyZO6Ngp+LwXf03CqFyLNL7os4Py4IdyGY= github.com/aws-controllers-k8s/sns-controller v1.0.11 h1:nnkywTHzO64y7RrrfoPNyYf1TOkkQHtlg+S0jEPKUZ8= github.com/aws-controllers-k8s/sns-controller v1.0.11/go.mod h1:ODQIDZR3hHQqcyif4UXVFQfEzTaWU1jqFtVr83K2p9M= github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= -github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/itchyny/gojq v0.12.6 h1:VjaFn59Em2wTxDNGcrRkDK9ZHMNa8IksOgL13sLL4d0= @@ -90,8 +90,6 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -99,38 +97,42 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= -github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -142,19 +144,18 @@ go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -163,38 +164,35 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -205,24 +203,22 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= -k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= -k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= -k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= -k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= -k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= -k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= -k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= -k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= -sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/helm/Chart.yaml b/helm/Chart.yaml index d776d053..2ab96f9f 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: elasticache-chart description: A Helm chart for the ACK service controller for Amazon ElastiCache (ElastiCache) -version: 0.1.0 -appVersion: 0.1.0 +version: 0.1.1 +appVersion: 0.1.1 home: https://github.com/aws-controllers-k8s/elasticache-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/helm/crds/elasticache.services.k8s.aws_cacheclusters.yaml b/helm/crds/elasticache.services.k8s.aws_cacheclusters.yaml index bc042534..4a015665 100644 --- a/helm/crds/elasticache.services.k8s.aws_cacheclusters.yaml +++ b/helm/crds/elasticache.services.k8s.aws_cacheclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: cacheclusters.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -57,28 +57,22 @@ spec: description: |- CacheClusterSpec defines the desired state of CacheCluster. - Contains all of the attributes of a specific cluster. properties: authToken: description: |- Reserved parameter. The password used to access a password protected server. - Password constraints: - - Must be only printable ASCII characters. - - Must be at least 16 characters and no more than 128 characters in length. - - The only permitted printable special characters are !, &, #, $, ^, <, >, and -. Other printable special characters cannot be used in the AUTH token. - For more information, see AUTH password (http://redis.io/commands/AUTH) at http://redis.io/commands/AUTH. properties: @@ -109,10 +103,8 @@ spec: Availability Zone or created across multiple Availability Zones in the cluster's region. - This parameter is only supported for Memcached clusters. - If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache assumes single-az mode. type: string @@ -121,28 +113,22 @@ spec: The node group (shard) identifier. This parameter is stored as a lowercase string. - Constraints: - - A name must contain from 1 to 50 alphanumeric characters or hyphens. - - The first character must be a letter. - - A name cannot end with a hyphen or contain two consecutive hyphens. type: string cacheNodeType: description: |- The compute and memory capacity of the nodes in the node group (shard). - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - - General purpose: Current generation: M7g node types: cache.m7g.large, cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported @@ -163,12 +149,10 @@ spec: cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - - Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - - Memory optimized: Current generation: R7g node types: cache.r7g.large, cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported @@ -185,19 +169,14 @@ spec: R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - Additional node type info - - All current generation instance types are created in Amazon VPC by default. - - Redis append-only files (AOF) are not supported for T1 or T2 instances. - - Redis Multi-AZ with automatic failover is not supported on T1 instances. - - Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. type: string @@ -211,7 +190,7 @@ spec: cacheParameterGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -221,13 +200,14 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object cacheSecurityGroupNames: description: |- A list of security group names to associate with this cluster. - Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). items: @@ -237,11 +217,9 @@ spec: description: |- The name of the subnet group to be used for the cluster. - Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC). - If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). @@ -249,7 +227,7 @@ spec: cacheSubnetGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -259,13 +237,14 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object engine: description: |- The name of the cache engine to be used for this cluster. - Valid values for this parameter are: memcached | redis type: string engineVersion: @@ -274,7 +253,6 @@ spec: the supported cache engine versions, use the DescribeCacheEngineVersions operation. - Important: You can upgrade to a newer engine version (see Selecting a Cache Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), but you cannot downgrade to an earlier engine version. If you want to use @@ -334,13 +312,12 @@ spec: The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. - The Amazon SNS topic owner must be the same as the cluster owner. type: string notificationTopicRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -350,17 +327,17 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object numCacheNodes: description: |- The initial number of cache nodes that the cluster has. - For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 40. - If you need more than 40 nodes for your Memcached cluster, please fill out the ElastiCache Limit Increase Request form at http://aws.amazon.com/contact-us/elasticache-node-limit-request/ (http://aws.amazon.com/contact-us/elasticache-node-limit-request/). @@ -380,12 +357,10 @@ spec: description: |- The EC2 Availability Zone in which the cluster is created. - All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use PreferredAvailabilityZones. - Default: System chosen Availability Zone. type: string preferredAvailabilityZones: @@ -393,22 +368,17 @@ spec: A list of the Availability Zones in which cache nodes are created. The order of the zones in the list is not important. - This option is only supported on Memcached. - If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group. - The number of Availability Zones listed must equal the value of NumCacheNodes. - If you want all the nodes in the same Availability Zone, use PreferredAvailabilityZone instead, or repeat the Availability Zone multiple times in the list. - Default: System chosen Availability Zones. items: type: string @@ -434,18 +404,16 @@ spec: group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group. - If the specified replication group is Multi-AZ enabled and the Availability Zone is not specified, the cluster is created in Availability Zones that provide the best spread of read replicas across Availability Zones. - This parameter is only valid if the Engine parameter is redis. type: string replicationGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -455,13 +423,14 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object securityGroupIDs: description: |- One or more VPC security groups associated with the cluster. - Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC). items: @@ -474,10 +443,8 @@ spec: file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas. - This parameter is only valid if the Engine parameter is redis. - Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb items: type: string @@ -488,13 +455,12 @@ spec: group (shard). The snapshot status changes to restoring while the new node group (shard) is being created. - This parameter is only valid if the Engine parameter is redis. type: string snapshotRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -504,6 +470,8 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object snapshotRetentionLimit: @@ -512,10 +480,8 @@ spec: deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot taken today is retained for 5 days before being deleted. - This parameter is only valid if the Engine parameter is redis. - Default: 0 (i.e., automatic backups are disabled for this cache cluster). format: int64 type: integer @@ -524,14 +490,11 @@ spec: The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). - Example: 05:00-09:00 - If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range. - This parameter is only valid if the Engine parameter is redis. type: string tags: @@ -575,7 +538,6 @@ spec: 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: @@ -595,23 +557,19 @@ spec: description: |- A flag that enables encryption at-rest when set to true. - You cannot modify the value of AtRestEncryptionEnabled after the cluster is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled to true when you create a cluster. - Required: Only available when creating a replication group in an Amazon VPC using redis version 3.2.6, 4.x or later. - Default: false type: boolean authTokenEnabled: description: |- A flag that enables using an AuthToken (password) when issuing Redis commands. - Default: false type: boolean authTokenLastModifiedDate: @@ -636,12 +594,10 @@ spec: its own instance of the cluster's protocol-compliant caching software - either Memcached or Redis. - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - - General purpose: Current generation: M7g node types: cache.m7g.large, cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported @@ -662,12 +618,10 @@ spec: cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - - Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - - Memory optimized: Current generation: R7g node types: cache.r7g.large, cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported @@ -684,19 +638,14 @@ spec: R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - Additional node type info - - All current generation instance types are created in Amazon VPC by default. - - Redis append-only files (AOF) are not supported for T1 or T2 instances. - - Redis Multi-AZ with automatic failover is not supported on T1 instances. - - Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. properties: @@ -799,7 +748,6 @@ spec: to connect to any node in the cluster. The configuration endpoint will always have .cfg in it. - Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 properties: address: diff --git a/helm/crds/elasticache.services.k8s.aws_cacheparametergroups.yaml b/helm/crds/elasticache.services.k8s.aws_cacheparametergroups.yaml index a873d1bf..18c1fd37 100644 --- a/helm/crds/elasticache.services.k8s.aws_cacheparametergroups.yaml +++ b/helm/crds/elasticache.services.k8s.aws_cacheparametergroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: cacheparametergroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -41,7 +41,6 @@ spec: description: |- CacheParameterGroupSpec defines the desired state of CacheParameterGroup. - Represents the output of a CreateCacheParameterGroup operation. properties: cacheParameterGroupFamily: @@ -49,9 +48,8 @@ spec: The name of the cache parameter group family that the cache parameter group can be used with. - Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | - redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x + redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | redis7 type: string cacheParameterGroupName: description: A user-specified name for the cache parameter group. @@ -116,7 +114,6 @@ spec: 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: diff --git a/helm/crds/elasticache.services.k8s.aws_cachesubnetgroups.yaml b/helm/crds/elasticache.services.k8s.aws_cachesubnetgroups.yaml index 8b3f1234..5471ec6e 100644 --- a/helm/crds/elasticache.services.k8s.aws_cachesubnetgroups.yaml +++ b/helm/crds/elasticache.services.k8s.aws_cachesubnetgroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: cachesubnetgroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -40,13 +40,10 @@ spec: description: |- CacheSubnetGroupSpec defines the desired state of CacheSubnetGroup. - Represents the output of one of the following operations: - - CreateCacheSubnetGroup - - ModifyCacheSubnetGroup properties: cacheSubnetGroupDescription: @@ -56,10 +53,8 @@ spec: description: |- A name for the cache subnet group. This value is stored as a lowercase string. - Constraints: Must contain no more than 255 alphanumeric characters or hyphens. - Example: mysubnetgroup type: string subnetIDs: @@ -71,7 +66,7 @@ spec: items: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -81,6 +76,8 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object type: array @@ -124,7 +121,6 @@ spec: 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: @@ -219,8 +215,20 @@ spec: subnetOutpostARN: type: string type: object + supportedNetworkTypes: + items: + type: string + type: array type: object type: array + supportedNetworkTypes: + description: |- + Either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads using Redis + engine version 6.2 onward or Memcached engine version 1.6.6 on all instances + built on the Nitro system (http://aws.amazon.com/ec2/nitro/). + items: + type: string + type: array vpcID: description: |- The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet diff --git a/helm/crds/elasticache.services.k8s.aws_replicationgroups.yaml b/helm/crds/elasticache.services.k8s.aws_replicationgroups.yaml index 340168a3..f45238ec 100644 --- a/helm/crds/elasticache.services.k8s.aws_replicationgroups.yaml +++ b/helm/crds/elasticache.services.k8s.aws_replicationgroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: replicationgroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -40,53 +40,42 @@ spec: description: |- ReplicationGroupSpec defines the desired state of ReplicationGroup. - Contains all of the attributes of a specific Redis replication group. properties: atRestEncryptionEnabled: description: |- A flag that enables encryption at rest when set to true. - You cannot modify the value of AtRestEncryptionEnabled after the replication group is created. To enable encryption at rest on a replication group you must set AtRestEncryptionEnabled to true when you create the replication group. - Required: Only available when creating a replication group in an Amazon VPC using redis version 3.2.6, 4.x or later. - Default: false type: boolean authToken: description: |- Reserved parameter. The password used to access a password protected server. - AuthToken can be specified only on replication groups where TransitEncryptionEnabled is true. - For HIPAA compliance, you must specify TransitEncryptionEnabled as true, an AuthToken, and a CacheSubnetGroup. - Password constraints: - - Must be only printable ASCII characters. - - Must be at least 16 characters and no more than 128 characters in length. - - The only permitted printable special characters are !, &, #, $, ^, <, >, and -. Other printable special characters cannot be used in the AUTH token. - For more information, see AUTH password (http://redis.io/commands/AUTH) at http://redis.io/commands/AUTH. properties: @@ -110,78 +99,67 @@ spec: Specifies whether a read-only replica is automatically promoted to read/write primary if the existing primary fails. - AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) replication groups. - Default: false type: boolean cacheNodeType: description: |- The compute and memory capacity of the nodes in the node group (shard). - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - - - General purpose: Current generation: M6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, - cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, - cache.m5.12xlarge, cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, - cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge T4g node types (available - only for Redis engine version 5.0.6 onward and Memcached engine version - 1.5.16 onward): cache.t4g.micro, cache.t4g.small, cache.t4g.medium T3 - node types: cache.t3.micro, cache.t3.small, cache.t3.medium T2 node types: - cache.t2.micro, cache.t2.small, cache.t2.medium Previous generation: (not - recommended. Existing clusters are still supported but creation of new - clusters is not supported for these types.) T1 node types: cache.t1.micro - M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - + - General purpose: Current generation: M7g node types: cache.m7g.large, + cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, + cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + M6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, + cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, + cache.m6g.16xlarge M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, + cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: + cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + T4g node types (available only for Redis engine version 5.0.6 onward and + Memcached engine version 1.5.16 onward): cache.t4g.micro, cache.t4g.small, + cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium + T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium Previous + generation: (not recommended. Existing clusters are still supported but + creation of new clusters is not supported for these types.) T1 node types: + cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + cache.m3.2xlarge - Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - - - Memory optimized with data tiering: Current generation: R6gd node types - (available only for Redis engine version 6.2 onward). cache.r6gd.xlarge, - cache.r6gd.2xlarge, cache.r6gd.4xlarge, cache.r6gd.8xlarge, cache.r6gd.12xlarge, - cache.r6gd.16xlarge - - - - Memory optimized: Current generation: R6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, - cache.r5.12xlarge, cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, - cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge - Previous generation: (not recommended. Existing clusters are still supported - but creation of new clusters is not supported for these types.) M2 node - types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge R3 node types: - cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - + - Memory optimized: Current generation: R7g node types: cache.r7g.large, + cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, + cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + R6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.r6g.large, cache.r6g.xlarge, + cache.r6g.2xlarge, cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, + cache.r6g.16xlarge R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, + cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: + cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, + cache.r4.16xlarge Previous generation: (not recommended. Existing clusters + are still supported but creation of new clusters is not supported for + these types.) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + cache.r3.8xlarge Additional node type info - - All current generation instance types are created in Amazon VPC by default. - - Redis append-only files (AOF) are not supported for T1 or T2 instances. - - Redis Multi-AZ with automatic failover is not supported on T1 instances. - - Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. type: string @@ -191,21 +169,18 @@ spec: If this argument is omitted, the default cache parameter group for the specified engine is used. - If you are running Redis version 3.2.4 or later, only one node group (shard), and want to use a default parameter group, we recommend that you specify the parameter group by name. - - To create a Redis (cluster mode disabled) replication group, use CacheParameterGroupName=default.redis3.2. - - To create a Redis (cluster mode enabled) replication group, use CacheParameterGroupName=default.redis3.2.cluster.on. type: string cacheParameterGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -215,6 +190,8 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object cacheSecurityGroupNames: @@ -227,7 +204,6 @@ spec: description: |- The name of the cache subnet group to be used for the replication group. - If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). @@ -235,7 +211,7 @@ spec: cacheSubnetGroupRef: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -245,8 +221,19 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object + clusterMode: + description: |- + Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you + must first set the cluster mode to Compatible. Compatible mode allows your + Redis clients to connect using both cluster mode enabled and cluster mode + disabled. After you migrate all Redis clients to use cluster mode enabled, + you can then complete cluster mode configuration and set the cluster mode + to Enabled. + type: string dataTieringEnabled: description: |- Enables data tiering. Data tiering is only supported for replication groups @@ -259,7 +246,7 @@ spec: engine: description: |- The name of the cache engine to be used for the clusters in this replication - group. Must be Redis. + group. The value must be set to Redis. type: string engineVersion: description: |- @@ -267,7 +254,6 @@ spec: replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation. - Important: You can upgrade to a newer engine version (see Selecting a Cache Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) in the ElastiCache User Guide, but you cannot downgrade to an earlier engine @@ -275,6 +261,13 @@ spec: existing cluster or replication group and create it anew with the earlier engine version. type: string + ipDiscovery: + description: |- + The network type you choose when creating a replication group, either ipv4 + | ipv6. IPv6 is supported for workloads using Redis engine version 6.2 onward + or Memcached engine version 1.6.6 on all instances built on the Nitro system + (http://aws.amazon.com/ec2/nitro/). + type: string kmsKeyID: description: The ID of the KMS key used to encrypt the disk in the cluster. @@ -319,13 +312,18 @@ spec: A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see Minimizing Downtime: Multi-AZ (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html). type: boolean + networkType: + description: |- + Must be either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads + using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on + all instances built on the Nitro system (http://aws.amazon.com/ec2/nitro/). + type: string nodeGroupConfiguration: description: |- A list of node group (shard) configuration options. Each node group (shard) configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, ReplicaCount, and Slots. - If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group, you can use this parameter to individually configure each node group (shard), or you can omit this parameter. However, it is required @@ -364,7 +362,6 @@ spec: The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. - The Amazon SNS topic owner must be the same as the cluster owner. type: string numNodeGroups: @@ -373,7 +370,6 @@ spec: this Redis (cluster mode enabled) replication group. For Redis (cluster mode disabled) either omit this parameter or set it to 1. - Default: 1 format: int64 type: integer @@ -389,19 +385,15 @@ spec: in which clusters are allocated. The primary cluster is created in the first AZ in the list. - This parameter is not used if there is more than one node group (shard). You should use NodeGroupConfiguration instead. - If you are creating your replication group in an Amazon VPC (recommended), you can only locate clusters in Availability Zones associated with the subnets in the selected subnet group. - The number of Availability Zones listed must equal the value of NumCacheClusters. - Default: system chosen Availability Zones. items: type: string @@ -413,36 +405,26 @@ spec: (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for ddd are: - Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. - Valid values for ddd are: - - sun - - mon - - tue - - wed - - thu - - fri - - sat - Example: sun:23:00-mon:01:30 type: string primaryClusterID: @@ -450,7 +432,6 @@ spec: The identifier of the cluster that serves as the primary for this replication group. This cluster must already exist and have a status of available. - This parameter is not required if NumCacheClusters, NumNodeGroups, or ReplicasPerNodeGroup is specified. type: string @@ -465,23 +446,18 @@ spec: The replication group identifier. This parameter is stored as a lowercase string. - Constraints: - - A name must contain from 1 to 40 alphanumeric characters or hyphens. - - The first character must be a letter. - - A name cannot end with a hyphen or contain two consecutive hyphens. type: string securityGroupIDs: description: |- One or more Amazon VPC security groups associated with this replication group. - Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud (Amazon VPC). items: @@ -491,7 +467,7 @@ spec: items: description: "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax - for references using 'from' field\nEx:\nAPIIDRef:\n\n\n\tfrom:\n\t + for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t \ name: my-api" properties: from: @@ -501,9 +477,16 @@ spec: properties: name: type: string + namespace: + type: string type: object type: object type: array + serverlessCacheSnapshotName: + description: |- + The name of the snapshot used to create a replication group. Available for + Redis only. + type: string snapshotARNs: description: |- A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB @@ -514,7 +497,6 @@ spec: of node groups configured by NodeGroupConfiguration regardless of the number of ARNs specified here. - Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb items: type: string @@ -531,7 +513,6 @@ spec: deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted. - Default: 0 (i.e., automatic backups are disabled for this cluster). format: int64 type: integer @@ -540,10 +521,8 @@ spec: The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). - Example: 05:00-09:00 - If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range. type: string @@ -572,30 +551,37 @@ spec: description: |- A flag that enables in-transit encryption when set to true. - - You cannot modify the value of TransitEncryptionEnabled after the cluster - is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - to true when you create a cluster. - - This parameter is valid only if the Engine parameter is redis, the EngineVersion parameter is 3.2.6, 4.x or later, and the cluster is being created in an Amazon VPC. - If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. - Required: Only available when creating a replication group in an Amazon VPC using redis version 3.2.6, 4.x or later. - Default: false - For HIPAA compliance, you must specify TransitEncryptionEnabled as true, an AuthToken, and a CacheSubnetGroup. type: boolean + transitEncryptionMode: + description: |- + A setting that allows you to migrate your clients to use in-transit encryption, + with no downtime. + + When setting TransitEncryptionEnabled to true, you can set your TransitEncryptionMode + to preferred in the same request, to allow both encrypted and unencrypted + connections at the same time. Once you migrate all your Redis clients to + use encrypted connections you can modify the value to required to allow encrypted + connections only. + + Setting TransitEncryptionMode to required is a two-step process that requires + you to first set the TransitEncryptionMode to preferred, after that you can + set TransitEncryptionMode to required. + + This process will not trigger the replacement of the replication group. + type: string userGroupIDs: description: The user group to associate with the replication group. items: @@ -622,7 +608,6 @@ spec: 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: @@ -652,7 +637,6 @@ spec: A string list, each element of which specifies a cache node type which you can use to scale your cluster or replication group. - When scaling up a Redis cluster or replication group using ModifyCacheCluster or ModifyReplicationGroup, use a value from this list for the CacheNodeType parameter. @@ -663,7 +647,6 @@ spec: description: |- A flag that enables using an AuthToken (password) when issuing Redis commands. - Default: false type: boolean authTokenLastModifiedDate: @@ -686,7 +669,6 @@ spec: i.e., whether its data can be partitioned across multiple shards (API/CLI: node groups). - Valid values: true | false type: boolean conditions: @@ -904,6 +886,8 @@ spec: type: string automaticFailoverStatus: type: string + clusterMode: + type: string logDeliveryConfigurations: items: description: The log delivery configurations being modified @@ -949,6 +933,10 @@ spec: type: number type: object type: object + transitEncryptionEnabled: + type: boolean + transitEncryptionMode: + type: string userGroups: description: The status of the user group update. properties: diff --git a/helm/crds/elasticache.services.k8s.aws_snapshots.yaml b/helm/crds/elasticache.services.k8s.aws_snapshots.yaml index 09c6ca24..56244023 100644 --- a/helm/crds/elasticache.services.k8s.aws_snapshots.yaml +++ b/helm/crds/elasticache.services.k8s.aws_snapshots.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: snapshots.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -40,7 +40,6 @@ spec: description: |- SnapshotSpec defines the desired state of Snapshot. - Represents a copy of an entire Redis cluster as of the time when the snapshot was taken. properties: @@ -103,7 +102,6 @@ spec: 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: @@ -138,68 +136,58 @@ spec: description: |- The name of the compute and memory capacity node type for the source cluster. - The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. - - * General purpose: Current generation: M6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward). cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, - cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, - cache.m5.12xlarge, cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, - cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge T4g node types (available - only for Redis engine version 5.0.6 onward and Memcached engine version - 1.5.16 onward): cache.t4g.micro, cache.t4g.small, cache.t4g.medium T3 - node types: cache.t3.micro, cache.t3.small, cache.t3.medium T2 node types: - cache.t2.micro, cache.t2.small, cache.t2.medium Previous generation: (not - recommended. Existing clusters are still supported but creation of new - clusters is not supported for these types.) T1 node types: cache.t1.micro - M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - + * General purpose: Current generation: M7g node types: cache.m7g.large, + cache.m7g.xlarge, cache.m7g.2xlarge, cache.m7g.4xlarge, cache.m7g.8xlarge, + cache.m7g.12xlarge, cache.m7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + M6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, + cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, + cache.m6g.16xlarge M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, + cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: + cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + T4g node types (available only for Redis engine version 5.0.6 onward and + Memcached engine version 1.5.16 onward): cache.t4g.micro, cache.t4g.small, + cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium + T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium Previous + generation: (not recommended. Existing clusters are still supported but + creation of new clusters is not supported for these types.) T1 node types: + cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + cache.m3.2xlarge * Compute optimized: Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.) C1 node types: cache.c1.xlarge - - * Memory optimized with data tiering: Current generation: R6gd node types - (available only for Redis engine version 6.2 onward). cache.r6gd.xlarge, - cache.r6gd.2xlarge, cache.r6gd.4xlarge, cache.r6gd.8xlarge, cache.r6gd.12xlarge, - cache.r6gd.16xlarge - - - * Memory optimized: Current generation: R6g node types (available only - for Redis engine version 5.0.6 onward and for Memcached engine version - 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - For region availability, see Supported Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) - R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, - cache.r5.12xlarge, cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, - cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge - Previous generation: (not recommended. Existing clusters are still supported - but creation of new clusters is not supported for these types.) M2 node - types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge R3 node types: - cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge - + * Memory optimized: Current generation: R7g node types: cache.r7g.large, + cache.r7g.xlarge, cache.r7g.2xlarge, cache.r7g.4xlarge, cache.r7g.8xlarge, + cache.r7g.12xlarge, cache.r7g.16xlarge For region availability, see Supported + Node Types (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + R6g node types (available only for Redis engine version 5.0.6 onward and + for Memcached engine version 1.5.16 onward): cache.r6g.large, cache.r6g.xlarge, + cache.r6g.2xlarge, cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, + cache.r6g.16xlarge R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, + cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: + cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, + cache.r4.16xlarge Previous generation: (not recommended. Existing clusters + are still supported but creation of new clusters is not supported for + these types.) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + cache.r3.8xlarge Additional node type info - * All current generation instance types are created in Amazon VPC by default. - * Redis append-only files (AOF) are not supported for T1 or T2 instances. - * Redis Multi-AZ with automatic failover is not supported on T1 instances. - * Redis configuration variables appendonly and appendfsync are not supported on Redis version 2.8.22 and later. type: string @@ -312,7 +300,6 @@ spec: description: |- The number of cache nodes in the source cluster. - For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 40. format: int64 @@ -339,31 +326,22 @@ spec: performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. - Valid values for ddd are: - * sun - * mon - * tue - * wed - * thu - * fri - * sat - Example: sun:23:00-mon:01:30 type: string preferredOutpostARN: @@ -377,13 +355,11 @@ spec: For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting it. - For manual snapshots, this field reflects the SnapshotRetentionLimit for the source cluster when the snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can only be deleted using the DeleteSnapshot operation. - Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. format: int64 diff --git a/helm/crds/elasticache.services.k8s.aws_usergroups.yaml b/helm/crds/elasticache.services.k8s.aws_usergroups.yaml index fb0c481a..4d7f445a 100644 --- a/helm/crds/elasticache.services.k8s.aws_usergroups.yaml +++ b/helm/crds/elasticache.services.k8s.aws_usergroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: usergroups.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -44,7 +44,8 @@ spec: tags: description: |- A list of tags to be added to this resource. A tag is a key-value pair. A - tag key must be accompanied by a tag value, although null is accepted. + tag key must be accompanied by a tag value, although null is accepted. Available + for Redis only. items: description: |- A tag that can be added to an ElastiCache cluster or replication group. Tags @@ -89,7 +90,6 @@ spec: 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: @@ -161,6 +161,13 @@ spec: items: type: string type: array + serverlessCaches: + description: |- + Indicates which serverless caches the specified user group is associated + with. Available for Redis only. + items: + type: string + type: array status: description: Indicates user group status. Can be "creating", "active", "modifying", "deleting". diff --git a/helm/crds/elasticache.services.k8s.aws_users.yaml b/helm/crds/elasticache.services.k8s.aws_users.yaml index 1507f204..1c013ffc 100644 --- a/helm/crds/elasticache.services.k8s.aws_users.yaml +++ b/helm/crds/elasticache.services.k8s.aws_users.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: users.elasticache.services.k8s.aws spec: group: elasticache.services.k8s.aws @@ -41,6 +41,16 @@ spec: accessString: description: Access permissions string used for this user. type: string + authenticationMode: + description: Specifies how to authenticate the user. + properties: + passwords: + items: + type: string + type: array + type_: + type: string + type: object engine: description: The current supported value is Redis. type: string @@ -120,7 +130,6 @@ spec: 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: diff --git a/helm/crds/services.k8s.aws_adoptedresources.yaml b/helm/crds/services.k8s.aws_adoptedresources.yaml index 65eff735..b7be3224 100644 --- a/helm/crds/services.k8s.aws_adoptedresources.yaml +++ b/helm/crds/services.k8s.aws_adoptedresources.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: adoptedresources.services.k8s.aws spec: group: services.k8s.aws @@ -78,11 +78,9 @@ spec: 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: @@ -105,13 +103,11 @@ spec: 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 @@ -140,7 +136,6 @@ spec: 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 diff --git a/helm/crds/services.k8s.aws_fieldexports.yaml b/helm/crds/services.k8s.aws_fieldexports.yaml index 4d3a8f1d..49b4f383 100644 --- a/helm/crds/services.k8s.aws_fieldexports.yaml +++ b/helm/crds/services.k8s.aws_fieldexports.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.2 name: fieldexports.services.k8s.aws spec: group: services.k8s.aws diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt index 752add27..92e070cf 100644 --- a/helm/templates/NOTES.txt +++ b/helm/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/elasticache-controller:0.1.0". +This chart deploys "public.ecr.aws/aws-controllers-k8s/elasticache-controller:0.1.1". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index cb8aba9a..e62eff6b 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -55,6 +55,7 @@ rules: - "" resources: - configmaps + - secrets verbs: - get - list @@ -68,39 +69,12 @@ rules: - get - list - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - patch - - watch - apiGroups: - ec2.services.k8s.aws resources: - securitygroups - verbs: - - get - - list -- apiGroups: - - ec2.services.k8s.aws - resources: - securitygroups/status - verbs: - - get - - list -- apiGroups: - - ec2.services.k8s.aws - resources: - subnets - verbs: - - get - - list -- apiGroups: - - ec2.services.k8s.aws - resources: - subnets/status verbs: - get @@ -109,125 +83,11 @@ rules: - elasticache.services.k8s.aws resources: - cacheclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - cacheclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - cacheparametergroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - cacheparametergroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - cachesubnetgroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - cachesubnetgroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - replicationgroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - replicationgroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - snapshots - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - snapshots/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - usergroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - elasticache.services.k8s.aws - resources: - - usergroups/status - verbs: - - get - - patch - - update -- apiGroups: - - elasticache.services.k8s.aws - resources: - users verbs: - create @@ -240,6 +100,12 @@ rules: - apiGroups: - elasticache.services.k8s.aws resources: + - cacheclusters/status + - cacheparametergroups/status + - cachesubnetgroups/status + - replicationgroups/status + - snapshots/status + - usergroups/status - users/status verbs: - get @@ -249,25 +115,6 @@ rules: - 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 @@ -280,6 +127,7 @@ rules: - apiGroups: - services.k8s.aws resources: + - adoptedresources/status - fieldexports/status verbs: - get @@ -289,14 +137,17 @@ rules: - sns.services.k8s.aws resources: - topics - verbs: - - get - - list -- apiGroups: - - sns.services.k8s.aws - resources: - topics/status verbs: - get - list -{{- end }} \ No newline at end of file +{{- end }} + +{{/* Convert k/v map to string like: "key1=value1,key2=value2,..." */}} +{{- define "ack-elasticache-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/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 95f84407..da135c6f 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -79,6 +79,10 @@ spec: {{- 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 }} @@ -122,6 +126,10 @@ spec: {{- 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-elasticache-controller.feature-gates" . }} {{- end }} {{- if .Values.aws.credentials.secretName }} - name: AWS_SHARED_CREDENTIALS_FILE @@ -144,6 +152,7 @@ spec: securityContext: allowPrivilegeEscalation: false privileged: false + readOnlyRootFilesystem: true runAsNonRoot: true capabilities: drop: diff --git a/helm/values.schema.json b/helm/values.schema.json index 742163eb..7ccb485d 100644 --- a/helm/values.schema.json +++ b/helm/values.schema.json @@ -268,6 +268,13 @@ "type": "object" } }, + "featureGates": { + "description": "Feature gates settings", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, "required": [ "image", "deployment", diff --git a/helm/values.yaml b/helm/values.yaml index 8522d9ad..827cf0bb 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/elasticache-controller - tag: 0.1.0 + tag: 0.1.1 pullPolicy: IfNotPresent pullSecrets: [] @@ -153,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 diff --git a/pkg/resource/cache_cluster/delta.go b/pkg/resource/cache_cluster/delta.go index f2198593..cbf4dd7d 100644 --- a/pkg/resource/cache_cluster/delta.go +++ b/pkg/resource/cache_cluster/delta.go @@ -126,6 +126,13 @@ func newResourceDelta( delta.Add("Spec.IPDiscovery", a.ko.Spec.IPDiscovery, b.ko.Spec.IPDiscovery) } } + if len(a.ko.Spec.LogDeliveryConfigurations) != len(b.ko.Spec.LogDeliveryConfigurations) { + delta.Add("Spec.LogDeliveryConfigurations", a.ko.Spec.LogDeliveryConfigurations, b.ko.Spec.LogDeliveryConfigurations) + } else if len(a.ko.Spec.LogDeliveryConfigurations) > 0 { + if !reflect.DeepEqual(a.ko.Spec.LogDeliveryConfigurations, b.ko.Spec.LogDeliveryConfigurations) { + delta.Add("Spec.LogDeliveryConfigurations", a.ko.Spec.LogDeliveryConfigurations, b.ko.Spec.LogDeliveryConfigurations) + } + } if ackcompare.HasNilDifference(a.ko.Spec.NetworkType, b.ko.Spec.NetworkType) { delta.Add("Spec.NetworkType", a.ko.Spec.NetworkType, b.ko.Spec.NetworkType) } else if a.ko.Spec.NetworkType != nil && b.ko.Spec.NetworkType != nil { diff --git a/pkg/resource/cache_cluster/manager_factory.go b/pkg/resource/cache_cluster/manager_factory.go index 1c63020a..9f214878 100644 --- a/pkg/resource/cache_cluster/manager_factory.go +++ b/pkg/resource/cache_cluster/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/cache_cluster/references.go b/pkg/resource/cache_cluster/references.go index 0c0b666b..590cb93b 100644 --- a/pkg/resource/cache_cluster/references.go +++ b/pkg/resource/cache_cluster/references.go @@ -76,36 +76,35 @@ func (rm *resourceManager) ResolveReferences( apiReader client.Reader, res acktypes.AWSResource, ) (acktypes.AWSResource, bool, error) { - namespace := res.MetaObject().GetNamespace() ko := rm.concreteResource(res).ko resourceHasReferences := false err := validateReferenceFields(ko) - if fieldHasReferences, err := rm.resolveReferenceForCacheParameterGroupName(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForCacheParameterGroupName(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences } - if fieldHasReferences, err := rm.resolveReferenceForCacheSubnetGroupName(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForCacheSubnetGroupName(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences } - if fieldHasReferences, err := rm.resolveReferenceForNotificationTopicARN(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForNotificationTopicARN(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences } - if fieldHasReferences, err := rm.resolveReferenceForReplicationGroupID(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForReplicationGroupID(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences } - if fieldHasReferences, err := rm.resolveReferenceForSnapshotName(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForSnapshotName(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences @@ -147,7 +146,6 @@ func validateReferenceFields(ko *svcapitypes.CacheCluster) error { func (rm *resourceManager) resolveReferenceForCacheParameterGroupName( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.CacheCluster, ) (hasReferences bool, err error) { if ko.Spec.CacheParameterGroupRef != nil && ko.Spec.CacheParameterGroupRef.From != nil { @@ -156,6 +154,10 @@ func (rm *resourceManager) resolveReferenceForCacheParameterGroupName( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: CacheParameterGroupRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &svcapitypes.CacheParameterGroup{} if err := getReferencedResourceState_CacheParameterGroup(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -185,12 +187,8 @@ func getReferencedResourceState_CacheParameterGroup( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -203,6 +201,13 @@ func getReferencedResourceState_CacheParameterGroup( "CacheParameterGroup", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "CacheParameterGroup", @@ -224,7 +229,6 @@ func getReferencedResourceState_CacheParameterGroup( func (rm *resourceManager) resolveReferenceForCacheSubnetGroupName( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.CacheCluster, ) (hasReferences bool, err error) { if ko.Spec.CacheSubnetGroupRef != nil && ko.Spec.CacheSubnetGroupRef.From != nil { @@ -233,6 +237,10 @@ func (rm *resourceManager) resolveReferenceForCacheSubnetGroupName( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: CacheSubnetGroupRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &svcapitypes.CacheSubnetGroup{} if err := getReferencedResourceState_CacheSubnetGroup(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -262,12 +270,8 @@ func getReferencedResourceState_CacheSubnetGroup( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -280,6 +284,13 @@ func getReferencedResourceState_CacheSubnetGroup( "CacheSubnetGroup", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "CacheSubnetGroup", @@ -301,7 +312,6 @@ func getReferencedResourceState_CacheSubnetGroup( func (rm *resourceManager) resolveReferenceForNotificationTopicARN( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.CacheCluster, ) (hasReferences bool, err error) { if ko.Spec.NotificationTopicRef != nil && ko.Spec.NotificationTopicRef.From != nil { @@ -310,6 +320,10 @@ func (rm *resourceManager) resolveReferenceForNotificationTopicARN( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: NotificationTopicRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &snsapitypes.Topic{} if err := getReferencedResourceState_Topic(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -339,12 +353,8 @@ func getReferencedResourceState_Topic( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -357,6 +367,13 @@ func getReferencedResourceState_Topic( "Topic", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "Topic", @@ -378,7 +395,6 @@ func getReferencedResourceState_Topic( func (rm *resourceManager) resolveReferenceForReplicationGroupID( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.CacheCluster, ) (hasReferences bool, err error) { if ko.Spec.ReplicationGroupRef != nil && ko.Spec.ReplicationGroupRef.From != nil { @@ -387,6 +403,10 @@ func (rm *resourceManager) resolveReferenceForReplicationGroupID( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: ReplicationGroupRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &svcapitypes.ReplicationGroup{} if err := getReferencedResourceState_ReplicationGroup(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -416,12 +436,8 @@ func getReferencedResourceState_ReplicationGroup( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -434,6 +450,13 @@ func getReferencedResourceState_ReplicationGroup( "ReplicationGroup", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "ReplicationGroup", @@ -455,7 +478,6 @@ func getReferencedResourceState_ReplicationGroup( func (rm *resourceManager) resolveReferenceForSnapshotName( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.CacheCluster, ) (hasReferences bool, err error) { if ko.Spec.SnapshotRef != nil && ko.Spec.SnapshotRef.From != nil { @@ -464,6 +486,10 @@ func (rm *resourceManager) resolveReferenceForSnapshotName( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: SnapshotRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &svcapitypes.Snapshot{} if err := getReferencedResourceState_Snapshot(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -493,12 +519,8 @@ func getReferencedResourceState_Snapshot( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -511,6 +533,13 @@ func getReferencedResourceState_Snapshot( "Snapshot", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "Snapshot", diff --git a/pkg/resource/cache_parameter_group/manager_factory.go b/pkg/resource/cache_parameter_group/manager_factory.go index 76549b75..4a862a8b 100644 --- a/pkg/resource/cache_parameter_group/manager_factory.go +++ b/pkg/resource/cache_parameter_group/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/cache_subnet_group/manager_factory.go b/pkg/resource/cache_subnet_group/manager_factory.go index 9296270e..5a8c741d 100644 --- a/pkg/resource/cache_subnet_group/manager_factory.go +++ b/pkg/resource/cache_subnet_group/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/cache_subnet_group/references.go b/pkg/resource/cache_subnet_group/references.go index bc719a34..70fa70ff 100644 --- a/pkg/resource/cache_subnet_group/references.go +++ b/pkg/resource/cache_subnet_group/references.go @@ -60,12 +60,11 @@ func (rm *resourceManager) ResolveReferences( apiReader client.Reader, res acktypes.AWSResource, ) (acktypes.AWSResource, bool, error) { - namespace := res.MetaObject().GetNamespace() ko := rm.concreteResource(res).ko resourceHasReferences := false err := validateReferenceFields(ko) - if fieldHasReferences, err := rm.resolveReferenceForSubnetIDs(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForSubnetIDs(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences @@ -94,7 +93,6 @@ func validateReferenceFields(ko *svcapitypes.CacheSubnetGroup) error { func (rm *resourceManager) resolveReferenceForSubnetIDs( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.CacheSubnetGroup, ) (hasReferences bool, err error) { for _, f0iter := range ko.Spec.SubnetRefs { @@ -104,6 +102,10 @@ func (rm *resourceManager) resolveReferenceForSubnetIDs( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: SubnetRefs") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &ec2apitypes.Subnet{} if err := getReferencedResourceState_Subnet(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -137,12 +139,8 @@ func getReferencedResourceState_Subnet( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -155,6 +153,13 @@ func getReferencedResourceState_Subnet( "Subnet", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "Subnet", diff --git a/pkg/resource/cache_subnet_group/sdk.go b/pkg/resource/cache_subnet_group/sdk.go index 63a914f5..025a4e89 100644 --- a/pkg/resource/cache_subnet_group/sdk.go +++ b/pkg/resource/cache_subnet_group/sdk.go @@ -126,12 +126,32 @@ func (rm *resourceManager) sdkFind( } f3elem.SubnetOutpost = f3elemf2 } + if f3iter.SupportedNetworkTypes != nil { + f3elemf3 := []*string{} + for _, f3elemf3iter := range f3iter.SupportedNetworkTypes { + var f3elemf3elem string + f3elemf3elem = *f3elemf3iter + f3elemf3 = append(f3elemf3, &f3elemf3elem) + } + f3elem.SupportedNetworkTypes = f3elemf3 + } f3 = append(f3, f3elem) } ko.Status.Subnets = f3 } else { ko.Status.Subnets = nil } + if elem.SupportedNetworkTypes != nil { + f4 := []*string{} + for _, f4iter := range elem.SupportedNetworkTypes { + var f4elem string + f4elem = *f4iter + f4 = append(f4, &f4elem) + } + ko.Status.SupportedNetworkTypes = f4 + } else { + ko.Status.SupportedNetworkTypes = nil + } if elem.VpcId != nil { ko.Status.VPCID = elem.VpcId } else { @@ -252,12 +272,32 @@ func (rm *resourceManager) sdkCreate( } f3elem.SubnetOutpost = f3elemf2 } + if f3iter.SupportedNetworkTypes != nil { + f3elemf3 := []*string{} + for _, f3elemf3iter := range f3iter.SupportedNetworkTypes { + var f3elemf3elem string + f3elemf3elem = *f3elemf3iter + f3elemf3 = append(f3elemf3, &f3elemf3elem) + } + f3elem.SupportedNetworkTypes = f3elemf3 + } f3 = append(f3, f3elem) } ko.Status.Subnets = f3 } else { ko.Status.Subnets = nil } + if resp.CacheSubnetGroup.SupportedNetworkTypes != nil { + f4 := []*string{} + for _, f4iter := range resp.CacheSubnetGroup.SupportedNetworkTypes { + var f4elem string + f4elem = *f4iter + f4 = append(f4, &f4elem) + } + ko.Status.SupportedNetworkTypes = f4 + } else { + ko.Status.SupportedNetworkTypes = nil + } if resp.CacheSubnetGroup.VpcId != nil { ko.Status.VPCID = resp.CacheSubnetGroup.VpcId } else { @@ -376,12 +416,32 @@ func (rm *resourceManager) sdkUpdate( } f3elem.SubnetOutpost = f3elemf2 } + if f3iter.SupportedNetworkTypes != nil { + f3elemf3 := []*string{} + for _, f3elemf3iter := range f3iter.SupportedNetworkTypes { + var f3elemf3elem string + f3elemf3elem = *f3elemf3iter + f3elemf3 = append(f3elemf3, &f3elemf3elem) + } + f3elem.SupportedNetworkTypes = f3elemf3 + } f3 = append(f3, f3elem) } ko.Status.Subnets = f3 } else { ko.Status.Subnets = nil } + if resp.CacheSubnetGroup.SupportedNetworkTypes != nil { + f4 := []*string{} + for _, f4iter := range resp.CacheSubnetGroup.SupportedNetworkTypes { + var f4elem string + f4elem = *f4iter + f4 = append(f4, &f4elem) + } + ko.Status.SupportedNetworkTypes = f4 + } else { + ko.Status.SupportedNetworkTypes = nil + } if resp.CacheSubnetGroup.VpcId != nil { ko.Status.VPCID = resp.CacheSubnetGroup.VpcId } else { diff --git a/pkg/resource/replication_group/delta.go b/pkg/resource/replication_group/delta.go index fe220197..8dfa0aa7 100644 --- a/pkg/resource/replication_group/delta.go +++ b/pkg/resource/replication_group/delta.go @@ -91,6 +91,13 @@ func newResourceDelta( if !reflect.DeepEqual(a.ko.Spec.CacheSubnetGroupRef, b.ko.Spec.CacheSubnetGroupRef) { delta.Add("Spec.CacheSubnetGroupRef", a.ko.Spec.CacheSubnetGroupRef, b.ko.Spec.CacheSubnetGroupRef) } + if ackcompare.HasNilDifference(a.ko.Spec.ClusterMode, b.ko.Spec.ClusterMode) { + delta.Add("Spec.ClusterMode", a.ko.Spec.ClusterMode, b.ko.Spec.ClusterMode) + } else if a.ko.Spec.ClusterMode != nil && b.ko.Spec.ClusterMode != nil { + if *a.ko.Spec.ClusterMode != *b.ko.Spec.ClusterMode { + delta.Add("Spec.ClusterMode", a.ko.Spec.ClusterMode, b.ko.Spec.ClusterMode) + } + } if ackcompare.HasNilDifference(a.ko.Spec.DataTieringEnabled, b.ko.Spec.DataTieringEnabled) { delta.Add("Spec.DataTieringEnabled", a.ko.Spec.DataTieringEnabled, b.ko.Spec.DataTieringEnabled) } else if a.ko.Spec.DataTieringEnabled != nil && b.ko.Spec.DataTieringEnabled != nil { @@ -119,6 +126,13 @@ func newResourceDelta( delta.Add("Spec.EngineVersion", a.ko.Spec.EngineVersion, b.ko.Spec.EngineVersion) } } + if ackcompare.HasNilDifference(a.ko.Spec.IPDiscovery, b.ko.Spec.IPDiscovery) { + delta.Add("Spec.IPDiscovery", a.ko.Spec.IPDiscovery, b.ko.Spec.IPDiscovery) + } else if a.ko.Spec.IPDiscovery != nil && b.ko.Spec.IPDiscovery != nil { + if *a.ko.Spec.IPDiscovery != *b.ko.Spec.IPDiscovery { + delta.Add("Spec.IPDiscovery", a.ko.Spec.IPDiscovery, b.ko.Spec.IPDiscovery) + } + } if ackcompare.HasNilDifference(a.ko.Spec.KMSKeyID, b.ko.Spec.KMSKeyID) { delta.Add("Spec.KMSKeyID", a.ko.Spec.KMSKeyID, b.ko.Spec.KMSKeyID) } else if a.ko.Spec.KMSKeyID != nil && b.ko.Spec.KMSKeyID != nil { @@ -126,6 +140,13 @@ func newResourceDelta( delta.Add("Spec.KMSKeyID", a.ko.Spec.KMSKeyID, b.ko.Spec.KMSKeyID) } } + if ackcompare.HasNilDifference(a.ko.Spec.NetworkType, b.ko.Spec.NetworkType) { + delta.Add("Spec.NetworkType", a.ko.Spec.NetworkType, b.ko.Spec.NetworkType) + } else if a.ko.Spec.NetworkType != nil && b.ko.Spec.NetworkType != nil { + if *a.ko.Spec.NetworkType != *b.ko.Spec.NetworkType { + delta.Add("Spec.NetworkType", a.ko.Spec.NetworkType, b.ko.Spec.NetworkType) + } + } if len(a.ko.Spec.NodeGroupConfiguration) != len(b.ko.Spec.NodeGroupConfiguration) { delta.Add("Spec.NodeGroupConfiguration", a.ko.Spec.NodeGroupConfiguration, b.ko.Spec.NodeGroupConfiguration) } else if len(a.ko.Spec.NodeGroupConfiguration) > 0 { @@ -192,6 +213,13 @@ func newResourceDelta( if !reflect.DeepEqual(a.ko.Spec.SecurityGroupRefs, b.ko.Spec.SecurityGroupRefs) { delta.Add("Spec.SecurityGroupRefs", a.ko.Spec.SecurityGroupRefs, b.ko.Spec.SecurityGroupRefs) } + if ackcompare.HasNilDifference(a.ko.Spec.ServerlessCacheSnapshotName, b.ko.Spec.ServerlessCacheSnapshotName) { + delta.Add("Spec.ServerlessCacheSnapshotName", a.ko.Spec.ServerlessCacheSnapshotName, b.ko.Spec.ServerlessCacheSnapshotName) + } else if a.ko.Spec.ServerlessCacheSnapshotName != nil && b.ko.Spec.ServerlessCacheSnapshotName != nil { + if *a.ko.Spec.ServerlessCacheSnapshotName != *b.ko.Spec.ServerlessCacheSnapshotName { + delta.Add("Spec.ServerlessCacheSnapshotName", a.ko.Spec.ServerlessCacheSnapshotName, b.ko.Spec.ServerlessCacheSnapshotName) + } + } if len(a.ko.Spec.SnapshotARNs) != len(b.ko.Spec.SnapshotARNs) { delta.Add("Spec.SnapshotARNs", a.ko.Spec.SnapshotARNs, b.ko.Spec.SnapshotARNs) } else if len(a.ko.Spec.SnapshotARNs) > 0 { @@ -230,6 +258,13 @@ func newResourceDelta( delta.Add("Spec.TransitEncryptionEnabled", a.ko.Spec.TransitEncryptionEnabled, b.ko.Spec.TransitEncryptionEnabled) } } + if ackcompare.HasNilDifference(a.ko.Spec.TransitEncryptionMode, b.ko.Spec.TransitEncryptionMode) { + delta.Add("Spec.TransitEncryptionMode", a.ko.Spec.TransitEncryptionMode, b.ko.Spec.TransitEncryptionMode) + } else if a.ko.Spec.TransitEncryptionMode != nil && b.ko.Spec.TransitEncryptionMode != nil { + if *a.ko.Spec.TransitEncryptionMode != *b.ko.Spec.TransitEncryptionMode { + delta.Add("Spec.TransitEncryptionMode", a.ko.Spec.TransitEncryptionMode, b.ko.Spec.TransitEncryptionMode) + } + } if len(a.ko.Spec.UserGroupIDs) != len(b.ko.Spec.UserGroupIDs) { delta.Add("Spec.UserGroupIDs", a.ko.Spec.UserGroupIDs, b.ko.Spec.UserGroupIDs) } else if len(a.ko.Spec.UserGroupIDs) > 0 { diff --git a/pkg/resource/replication_group/manager_factory.go b/pkg/resource/replication_group/manager_factory.go index 279b8c73..f0290838 100644 --- a/pkg/resource/replication_group/manager_factory.go +++ b/pkg/resource/replication_group/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/replication_group/references.go b/pkg/resource/replication_group/references.go index 10a62617..8e631e7b 100644 --- a/pkg/resource/replication_group/references.go +++ b/pkg/resource/replication_group/references.go @@ -68,24 +68,23 @@ func (rm *resourceManager) ResolveReferences( apiReader client.Reader, res acktypes.AWSResource, ) (acktypes.AWSResource, bool, error) { - namespace := res.MetaObject().GetNamespace() ko := rm.concreteResource(res).ko resourceHasReferences := false err := validateReferenceFields(ko) - if fieldHasReferences, err := rm.resolveReferenceForCacheParameterGroupName(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForCacheParameterGroupName(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences } - if fieldHasReferences, err := rm.resolveReferenceForCacheSubnetGroupName(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForCacheSubnetGroupName(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences } - if fieldHasReferences, err := rm.resolveReferenceForSecurityGroupIDs(ctx, apiReader, namespace, ko); err != nil { + if fieldHasReferences, err := rm.resolveReferenceForSecurityGroupIDs(ctx, apiReader, ko); err != nil { return &resource{ko}, (resourceHasReferences || fieldHasReferences), err } else { resourceHasReferences = resourceHasReferences || fieldHasReferences @@ -119,7 +118,6 @@ func validateReferenceFields(ko *svcapitypes.ReplicationGroup) error { func (rm *resourceManager) resolveReferenceForCacheParameterGroupName( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.ReplicationGroup, ) (hasReferences bool, err error) { if ko.Spec.CacheParameterGroupRef != nil && ko.Spec.CacheParameterGroupRef.From != nil { @@ -128,6 +126,10 @@ func (rm *resourceManager) resolveReferenceForCacheParameterGroupName( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: CacheParameterGroupRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &svcapitypes.CacheParameterGroup{} if err := getReferencedResourceState_CacheParameterGroup(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -157,12 +159,8 @@ func getReferencedResourceState_CacheParameterGroup( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -175,6 +173,13 @@ func getReferencedResourceState_CacheParameterGroup( "CacheParameterGroup", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "CacheParameterGroup", @@ -196,7 +201,6 @@ func getReferencedResourceState_CacheParameterGroup( func (rm *resourceManager) resolveReferenceForCacheSubnetGroupName( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.ReplicationGroup, ) (hasReferences bool, err error) { if ko.Spec.CacheSubnetGroupRef != nil && ko.Spec.CacheSubnetGroupRef.From != nil { @@ -205,6 +209,10 @@ func (rm *resourceManager) resolveReferenceForCacheSubnetGroupName( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: CacheSubnetGroupRef") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &svcapitypes.CacheSubnetGroup{} if err := getReferencedResourceState_CacheSubnetGroup(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -234,12 +242,8 @@ func getReferencedResourceState_CacheSubnetGroup( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -252,6 +256,13 @@ func getReferencedResourceState_CacheSubnetGroup( "CacheSubnetGroup", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "CacheSubnetGroup", @@ -273,7 +284,6 @@ func getReferencedResourceState_CacheSubnetGroup( func (rm *resourceManager) resolveReferenceForSecurityGroupIDs( ctx context.Context, apiReader client.Reader, - namespace string, ko *svcapitypes.ReplicationGroup, ) (hasReferences bool, err error) { for _, f0iter := range ko.Spec.SecurityGroupRefs { @@ -283,6 +293,10 @@ func (rm *resourceManager) resolveReferenceForSecurityGroupIDs( if arr.Name == nil || *arr.Name == "" { return hasReferences, fmt.Errorf("provided resource reference is nil or empty: SecurityGroupRefs") } + namespace := ko.ObjectMeta.GetNamespace() + if arr.Namespace != nil && *arr.Namespace != "" { + namespace = *arr.Namespace + } obj := &ec2apitypes.SecurityGroup{} if err := getReferencedResourceState_SecurityGroup(ctx, apiReader, obj, *arr.Name, namespace); err != nil { return hasReferences, err @@ -316,12 +330,8 @@ func getReferencedResourceState_SecurityGroup( if err != nil { return err } - var refResourceSynced, refResourceTerminal bool + var refResourceTerminal bool for _, cond := range obj.Status.Conditions { - if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && - cond.Status == corev1.ConditionTrue { - refResourceSynced = true - } if cond.Type == ackv1alpha1.ConditionTypeTerminal && cond.Status == corev1.ConditionTrue { return ackerr.ResourceReferenceTerminalFor( @@ -334,6 +344,13 @@ func getReferencedResourceState_SecurityGroup( "SecurityGroup", namespace, name) } + var refResourceSynced bool + for _, cond := range obj.Status.Conditions { + if cond.Type == ackv1alpha1.ConditionTypeResourceSynced && + cond.Status == corev1.ConditionTrue { + refResourceSynced = true + } + } if !refResourceSynced { return ackerr.ResourceReferenceNotSyncedFor( "SecurityGroup", diff --git a/pkg/resource/replication_group/sdk.go b/pkg/resource/replication_group/sdk.go index f55663f8..24d5f794 100644 --- a/pkg/resource/replication_group/sdk.go +++ b/pkg/resource/replication_group/sdk.go @@ -130,15 +130,20 @@ func (rm *resourceManager) sdkFind( } else { ko.Status.ClusterEnabled = nil } + if elem.ClusterMode != nil { + ko.Spec.ClusterMode = elem.ClusterMode + } else { + ko.Spec.ClusterMode = nil + } if elem.ConfigurationEndpoint != nil { - f8 := &svcapitypes.Endpoint{} + f9 := &svcapitypes.Endpoint{} if elem.ConfigurationEndpoint.Address != nil { - f8.Address = elem.ConfigurationEndpoint.Address + f9.Address = elem.ConfigurationEndpoint.Address } if elem.ConfigurationEndpoint.Port != nil { - f8.Port = elem.ConfigurationEndpoint.Port + f9.Port = elem.ConfigurationEndpoint.Port } - ko.Status.ConfigurationEndpoint = f8 + ko.Status.ConfigurationEndpoint = f9 } else { ko.Status.ConfigurationEndpoint = nil } @@ -153,78 +158,83 @@ func (rm *resourceManager) sdkFind( ko.Spec.Description = nil } if elem.GlobalReplicationGroupInfo != nil { - f11 := &svcapitypes.GlobalReplicationGroupInfo{} + f12 := &svcapitypes.GlobalReplicationGroupInfo{} if elem.GlobalReplicationGroupInfo.GlobalReplicationGroupId != nil { - f11.GlobalReplicationGroupID = elem.GlobalReplicationGroupInfo.GlobalReplicationGroupId + f12.GlobalReplicationGroupID = elem.GlobalReplicationGroupInfo.GlobalReplicationGroupId } if elem.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole != nil { - f11.GlobalReplicationGroupMemberRole = elem.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole + f12.GlobalReplicationGroupMemberRole = elem.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole } - ko.Status.GlobalReplicationGroupInfo = f11 + ko.Status.GlobalReplicationGroupInfo = f12 } else { ko.Status.GlobalReplicationGroupInfo = nil } + if elem.IpDiscovery != nil { + ko.Spec.IPDiscovery = elem.IpDiscovery + } else { + ko.Spec.IPDiscovery = nil + } if elem.KmsKeyId != nil { ko.Spec.KMSKeyID = elem.KmsKeyId } else { ko.Spec.KMSKeyID = nil } if elem.LogDeliveryConfigurations != nil { - f13 := []*svcapitypes.LogDeliveryConfigurationRequest{} - for _, f13iter := range elem.LogDeliveryConfigurations { - f13elem := &svcapitypes.LogDeliveryConfigurationRequest{} - if f13iter.DestinationDetails != nil { - f13elemf0 := &svcapitypes.DestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails != nil { - f13elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f13elemf0f0.LogGroup = f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f15 := []*svcapitypes.LogDeliveryConfigurationRequest{} + for _, f15iter := range elem.LogDeliveryConfigurations { + f15elem := &svcapitypes.LogDeliveryConfigurationRequest{} + if f15iter.DestinationDetails != nil { + f15elemf0 := &svcapitypes.DestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails != nil { + f15elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f15elemf0f0.LogGroup = f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f13elemf0.CloudWatchLogsDetails = f13elemf0f0 + f15elemf0.CloudWatchLogsDetails = f15elemf0f0 } - if f13iter.DestinationDetails.KinesisFirehoseDetails != nil { - f13elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f13elemf0f1.DeliveryStream = f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f15iter.DestinationDetails.KinesisFirehoseDetails != nil { + f15elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f15elemf0f1.DeliveryStream = f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f13elemf0.KinesisFirehoseDetails = f13elemf0f1 + f15elemf0.KinesisFirehoseDetails = f15elemf0f1 } - f13elem.DestinationDetails = f13elemf0 + f15elem.DestinationDetails = f15elemf0 } - if f13iter.DestinationType != nil { - f13elem.DestinationType = f13iter.DestinationType + if f15iter.DestinationType != nil { + f15elem.DestinationType = f15iter.DestinationType } - if f13iter.LogFormat != nil { - f13elem.LogFormat = f13iter.LogFormat + if f15iter.LogFormat != nil { + f15elem.LogFormat = f15iter.LogFormat } - if f13iter.LogType != nil { - f13elem.LogType = f13iter.LogType + if f15iter.LogType != nil { + f15elem.LogType = f15iter.LogType } - f13 = append(f13, f13elem) + f15 = append(f15, f15elem) } - ko.Spec.LogDeliveryConfigurations = f13 + ko.Spec.LogDeliveryConfigurations = f15 } else { ko.Spec.LogDeliveryConfigurations = nil } if elem.MemberClusters != nil { - f14 := []*string{} - for _, f14iter := range elem.MemberClusters { - var f14elem string - f14elem = *f14iter - f14 = append(f14, &f14elem) + f16 := []*string{} + for _, f16iter := range elem.MemberClusters { + var f16elem string + f16elem = *f16iter + f16 = append(f16, &f16elem) } - ko.Status.MemberClusters = f14 + ko.Status.MemberClusters = f16 } else { ko.Status.MemberClusters = nil } if elem.MemberClustersOutpostArns != nil { - f15 := []*string{} - for _, f15iter := range elem.MemberClustersOutpostArns { - var f15elem string - f15elem = *f15iter - f15 = append(f15, &f15elem) + f17 := []*string{} + for _, f17iter := range elem.MemberClustersOutpostArns { + var f17elem string + f17elem = *f17iter + f17 = append(f17, &f17elem) } - ko.Status.MemberClustersOutpostARNs = f15 + ko.Status.MemberClustersOutpostARNs = f17 } else { ko.Status.MemberClustersOutpostARNs = nil } @@ -233,158 +243,172 @@ func (rm *resourceManager) sdkFind( } else { ko.Status.MultiAZ = nil } + if elem.NetworkType != nil { + ko.Spec.NetworkType = elem.NetworkType + } else { + ko.Spec.NetworkType = nil + } if elem.NodeGroups != nil { - f17 := []*svcapitypes.NodeGroup{} - for _, f17iter := range elem.NodeGroups { - f17elem := &svcapitypes.NodeGroup{} - if f17iter.NodeGroupId != nil { - f17elem.NodeGroupID = f17iter.NodeGroupId - } - if f17iter.NodeGroupMembers != nil { - f17elemf1 := []*svcapitypes.NodeGroupMember{} - for _, f17elemf1iter := range f17iter.NodeGroupMembers { - f17elemf1elem := &svcapitypes.NodeGroupMember{} - if f17elemf1iter.CacheClusterId != nil { - f17elemf1elem.CacheClusterID = f17elemf1iter.CacheClusterId + f20 := []*svcapitypes.NodeGroup{} + for _, f20iter := range elem.NodeGroups { + f20elem := &svcapitypes.NodeGroup{} + if f20iter.NodeGroupId != nil { + f20elem.NodeGroupID = f20iter.NodeGroupId + } + if f20iter.NodeGroupMembers != nil { + f20elemf1 := []*svcapitypes.NodeGroupMember{} + for _, f20elemf1iter := range f20iter.NodeGroupMembers { + f20elemf1elem := &svcapitypes.NodeGroupMember{} + if f20elemf1iter.CacheClusterId != nil { + f20elemf1elem.CacheClusterID = f20elemf1iter.CacheClusterId } - if f17elemf1iter.CacheNodeId != nil { - f17elemf1elem.CacheNodeID = f17elemf1iter.CacheNodeId + if f20elemf1iter.CacheNodeId != nil { + f20elemf1elem.CacheNodeID = f20elemf1iter.CacheNodeId } - if f17elemf1iter.CurrentRole != nil { - f17elemf1elem.CurrentRole = f17elemf1iter.CurrentRole + if f20elemf1iter.CurrentRole != nil { + f20elemf1elem.CurrentRole = f20elemf1iter.CurrentRole } - if f17elemf1iter.PreferredAvailabilityZone != nil { - f17elemf1elem.PreferredAvailabilityZone = f17elemf1iter.PreferredAvailabilityZone + if f20elemf1iter.PreferredAvailabilityZone != nil { + f20elemf1elem.PreferredAvailabilityZone = f20elemf1iter.PreferredAvailabilityZone } - if f17elemf1iter.PreferredOutpostArn != nil { - f17elemf1elem.PreferredOutpostARN = f17elemf1iter.PreferredOutpostArn + if f20elemf1iter.PreferredOutpostArn != nil { + f20elemf1elem.PreferredOutpostARN = f20elemf1iter.PreferredOutpostArn } - if f17elemf1iter.ReadEndpoint != nil { - f17elemf1elemf5 := &svcapitypes.Endpoint{} - if f17elemf1iter.ReadEndpoint.Address != nil { - f17elemf1elemf5.Address = f17elemf1iter.ReadEndpoint.Address + if f20elemf1iter.ReadEndpoint != nil { + f20elemf1elemf5 := &svcapitypes.Endpoint{} + if f20elemf1iter.ReadEndpoint.Address != nil { + f20elemf1elemf5.Address = f20elemf1iter.ReadEndpoint.Address } - if f17elemf1iter.ReadEndpoint.Port != nil { - f17elemf1elemf5.Port = f17elemf1iter.ReadEndpoint.Port + if f20elemf1iter.ReadEndpoint.Port != nil { + f20elemf1elemf5.Port = f20elemf1iter.ReadEndpoint.Port } - f17elemf1elem.ReadEndpoint = f17elemf1elemf5 + f20elemf1elem.ReadEndpoint = f20elemf1elemf5 } - f17elemf1 = append(f17elemf1, f17elemf1elem) + f20elemf1 = append(f20elemf1, f20elemf1elem) } - f17elem.NodeGroupMembers = f17elemf1 + f20elem.NodeGroupMembers = f20elemf1 } - if f17iter.PrimaryEndpoint != nil { - f17elemf2 := &svcapitypes.Endpoint{} - if f17iter.PrimaryEndpoint.Address != nil { - f17elemf2.Address = f17iter.PrimaryEndpoint.Address + if f20iter.PrimaryEndpoint != nil { + f20elemf2 := &svcapitypes.Endpoint{} + if f20iter.PrimaryEndpoint.Address != nil { + f20elemf2.Address = f20iter.PrimaryEndpoint.Address } - if f17iter.PrimaryEndpoint.Port != nil { - f17elemf2.Port = f17iter.PrimaryEndpoint.Port + if f20iter.PrimaryEndpoint.Port != nil { + f20elemf2.Port = f20iter.PrimaryEndpoint.Port } - f17elem.PrimaryEndpoint = f17elemf2 + f20elem.PrimaryEndpoint = f20elemf2 } - if f17iter.ReaderEndpoint != nil { - f17elemf3 := &svcapitypes.Endpoint{} - if f17iter.ReaderEndpoint.Address != nil { - f17elemf3.Address = f17iter.ReaderEndpoint.Address + if f20iter.ReaderEndpoint != nil { + f20elemf3 := &svcapitypes.Endpoint{} + if f20iter.ReaderEndpoint.Address != nil { + f20elemf3.Address = f20iter.ReaderEndpoint.Address } - if f17iter.ReaderEndpoint.Port != nil { - f17elemf3.Port = f17iter.ReaderEndpoint.Port + if f20iter.ReaderEndpoint.Port != nil { + f20elemf3.Port = f20iter.ReaderEndpoint.Port } - f17elem.ReaderEndpoint = f17elemf3 + f20elem.ReaderEndpoint = f20elemf3 } - if f17iter.Slots != nil { - f17elem.Slots = f17iter.Slots + if f20iter.Slots != nil { + f20elem.Slots = f20iter.Slots } - if f17iter.Status != nil { - f17elem.Status = f17iter.Status + if f20iter.Status != nil { + f20elem.Status = f20iter.Status } - f17 = append(f17, f17elem) + f20 = append(f20, f20elem) } - ko.Status.NodeGroups = f17 + ko.Status.NodeGroups = f20 } else { ko.Status.NodeGroups = nil } if elem.PendingModifiedValues != nil { - f18 := &svcapitypes.ReplicationGroupPendingModifiedValues{} + f21 := &svcapitypes.ReplicationGroupPendingModifiedValues{} if elem.PendingModifiedValues.AuthTokenStatus != nil { - f18.AuthTokenStatus = elem.PendingModifiedValues.AuthTokenStatus + f21.AuthTokenStatus = elem.PendingModifiedValues.AuthTokenStatus } if elem.PendingModifiedValues.AutomaticFailoverStatus != nil { - f18.AutomaticFailoverStatus = elem.PendingModifiedValues.AutomaticFailoverStatus + f21.AutomaticFailoverStatus = elem.PendingModifiedValues.AutomaticFailoverStatus + } + if elem.PendingModifiedValues.ClusterMode != nil { + f21.ClusterMode = elem.PendingModifiedValues.ClusterMode } if elem.PendingModifiedValues.LogDeliveryConfigurations != nil { - f18f2 := []*svcapitypes.PendingLogDeliveryConfiguration{} - for _, f18f2iter := range elem.PendingModifiedValues.LogDeliveryConfigurations { - f18f2elem := &svcapitypes.PendingLogDeliveryConfiguration{} - if f18f2iter.DestinationDetails != nil { - f18f2elemf0 := &svcapitypes.DestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails != nil { - f18f2elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f18f2elemf0f0.LogGroup = f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f21f3 := []*svcapitypes.PendingLogDeliveryConfiguration{} + for _, f21f3iter := range elem.PendingModifiedValues.LogDeliveryConfigurations { + f21f3elem := &svcapitypes.PendingLogDeliveryConfiguration{} + if f21f3iter.DestinationDetails != nil { + f21f3elemf0 := &svcapitypes.DestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails != nil { + f21f3elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f21f3elemf0f0.LogGroup = f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f18f2elemf0.CloudWatchLogsDetails = f18f2elemf0f0 + f21f3elemf0.CloudWatchLogsDetails = f21f3elemf0f0 } - if f18f2iter.DestinationDetails.KinesisFirehoseDetails != nil { - f18f2elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f18f2elemf0f1.DeliveryStream = f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f21f3iter.DestinationDetails.KinesisFirehoseDetails != nil { + f21f3elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f21f3elemf0f1.DeliveryStream = f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f18f2elemf0.KinesisFirehoseDetails = f18f2elemf0f1 + f21f3elemf0.KinesisFirehoseDetails = f21f3elemf0f1 } - f18f2elem.DestinationDetails = f18f2elemf0 + f21f3elem.DestinationDetails = f21f3elemf0 } - if f18f2iter.DestinationType != nil { - f18f2elem.DestinationType = f18f2iter.DestinationType + if f21f3iter.DestinationType != nil { + f21f3elem.DestinationType = f21f3iter.DestinationType } - if f18f2iter.LogFormat != nil { - f18f2elem.LogFormat = f18f2iter.LogFormat + if f21f3iter.LogFormat != nil { + f21f3elem.LogFormat = f21f3iter.LogFormat } - if f18f2iter.LogType != nil { - f18f2elem.LogType = f18f2iter.LogType + if f21f3iter.LogType != nil { + f21f3elem.LogType = f21f3iter.LogType } - f18f2 = append(f18f2, f18f2elem) + f21f3 = append(f21f3, f21f3elem) } - f18.LogDeliveryConfigurations = f18f2 + f21.LogDeliveryConfigurations = f21f3 } if elem.PendingModifiedValues.PrimaryClusterId != nil { - f18.PrimaryClusterID = elem.PendingModifiedValues.PrimaryClusterId + f21.PrimaryClusterID = elem.PendingModifiedValues.PrimaryClusterId } if elem.PendingModifiedValues.Resharding != nil { - f18f4 := &svcapitypes.ReshardingStatus{} + f21f5 := &svcapitypes.ReshardingStatus{} if elem.PendingModifiedValues.Resharding.SlotMigration != nil { - f18f4f0 := &svcapitypes.SlotMigration{} + f21f5f0 := &svcapitypes.SlotMigration{} if elem.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage != nil { - f18f4f0.ProgressPercentage = elem.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage + f21f5f0.ProgressPercentage = elem.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage } - f18f4.SlotMigration = f18f4f0 + f21f5.SlotMigration = f21f5f0 } - f18.Resharding = f18f4 + f21.Resharding = f21f5 + } + if elem.PendingModifiedValues.TransitEncryptionEnabled != nil { + f21.TransitEncryptionEnabled = elem.PendingModifiedValues.TransitEncryptionEnabled + } + if elem.PendingModifiedValues.TransitEncryptionMode != nil { + f21.TransitEncryptionMode = elem.PendingModifiedValues.TransitEncryptionMode } if elem.PendingModifiedValues.UserGroups != nil { - f18f5 := &svcapitypes.UserGroupsUpdateStatus{} + f21f8 := &svcapitypes.UserGroupsUpdateStatus{} if elem.PendingModifiedValues.UserGroups.UserGroupIdsToAdd != nil { - f18f5f0 := []*string{} - for _, f18f5f0iter := range elem.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { - var f18f5f0elem string - f18f5f0elem = *f18f5f0iter - f18f5f0 = append(f18f5f0, &f18f5f0elem) + f21f8f0 := []*string{} + for _, f21f8f0iter := range elem.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { + var f21f8f0elem string + f21f8f0elem = *f21f8f0iter + f21f8f0 = append(f21f8f0, &f21f8f0elem) } - f18f5.UserGroupIDsToAdd = f18f5f0 + f21f8.UserGroupIDsToAdd = f21f8f0 } if elem.PendingModifiedValues.UserGroups.UserGroupIdsToRemove != nil { - f18f5f1 := []*string{} - for _, f18f5f1iter := range elem.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { - var f18f5f1elem string - f18f5f1elem = *f18f5f1iter - f18f5f1 = append(f18f5f1, &f18f5f1elem) + f21f8f1 := []*string{} + for _, f21f8f1iter := range elem.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { + var f21f8f1elem string + f21f8f1elem = *f21f8f1iter + f21f8f1 = append(f21f8f1, &f21f8f1elem) } - f18f5.UserGroupIDsToRemove = f18f5f1 + f21f8.UserGroupIDsToRemove = f21f8f1 } - f18.UserGroups = f18f5 + f21.UserGroups = f21f8 } - ko.Status.PendingModifiedValues = f18 + ko.Status.PendingModifiedValues = f21 } else { ko.Status.PendingModifiedValues = nil } @@ -423,14 +447,19 @@ func (rm *resourceManager) sdkFind( } else { ko.Spec.TransitEncryptionEnabled = nil } + if elem.TransitEncryptionMode != nil { + ko.Spec.TransitEncryptionMode = elem.TransitEncryptionMode + } else { + ko.Spec.TransitEncryptionMode = nil + } if elem.UserGroupIds != nil { - f26 := []*string{} - for _, f26iter := range elem.UserGroupIds { - var f26elem string - f26elem = *f26iter - f26 = append(f26, &f26elem) + f30 := []*string{} + for _, f30iter := range elem.UserGroupIds { + var f30elem string + f30elem = *f30iter + f30 = append(f30, &f30elem) } - ko.Spec.UserGroupIDs = f26 + ko.Spec.UserGroupIDs = f30 } else { ko.Spec.UserGroupIDs = nil } @@ -602,15 +631,20 @@ func (rm *resourceManager) sdkCreate( } else { ko.Status.ClusterEnabled = nil } + if resp.ReplicationGroup.ClusterMode != nil { + ko.Spec.ClusterMode = resp.ReplicationGroup.ClusterMode + } else { + ko.Spec.ClusterMode = nil + } if resp.ReplicationGroup.ConfigurationEndpoint != nil { - f8 := &svcapitypes.Endpoint{} + f9 := &svcapitypes.Endpoint{} if resp.ReplicationGroup.ConfigurationEndpoint.Address != nil { - f8.Address = resp.ReplicationGroup.ConfigurationEndpoint.Address + f9.Address = resp.ReplicationGroup.ConfigurationEndpoint.Address } if resp.ReplicationGroup.ConfigurationEndpoint.Port != nil { - f8.Port = resp.ReplicationGroup.ConfigurationEndpoint.Port + f9.Port = resp.ReplicationGroup.ConfigurationEndpoint.Port } - ko.Status.ConfigurationEndpoint = f8 + ko.Status.ConfigurationEndpoint = f9 } else { ko.Status.ConfigurationEndpoint = nil } @@ -625,78 +659,83 @@ func (rm *resourceManager) sdkCreate( ko.Spec.Description = nil } if resp.ReplicationGroup.GlobalReplicationGroupInfo != nil { - f11 := &svcapitypes.GlobalReplicationGroupInfo{} + f12 := &svcapitypes.GlobalReplicationGroupInfo{} if resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId != nil { - f11.GlobalReplicationGroupID = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId + f12.GlobalReplicationGroupID = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId } if resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole != nil { - f11.GlobalReplicationGroupMemberRole = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole + f12.GlobalReplicationGroupMemberRole = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole } - ko.Status.GlobalReplicationGroupInfo = f11 + ko.Status.GlobalReplicationGroupInfo = f12 } else { ko.Status.GlobalReplicationGroupInfo = nil } + if resp.ReplicationGroup.IpDiscovery != nil { + ko.Spec.IPDiscovery = resp.ReplicationGroup.IpDiscovery + } else { + ko.Spec.IPDiscovery = nil + } if resp.ReplicationGroup.KmsKeyId != nil { ko.Spec.KMSKeyID = resp.ReplicationGroup.KmsKeyId } else { ko.Spec.KMSKeyID = nil } if resp.ReplicationGroup.LogDeliveryConfigurations != nil { - f13 := []*svcapitypes.LogDeliveryConfigurationRequest{} - for _, f13iter := range resp.ReplicationGroup.LogDeliveryConfigurations { - f13elem := &svcapitypes.LogDeliveryConfigurationRequest{} - if f13iter.DestinationDetails != nil { - f13elemf0 := &svcapitypes.DestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails != nil { - f13elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f13elemf0f0.LogGroup = f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f15 := []*svcapitypes.LogDeliveryConfigurationRequest{} + for _, f15iter := range resp.ReplicationGroup.LogDeliveryConfigurations { + f15elem := &svcapitypes.LogDeliveryConfigurationRequest{} + if f15iter.DestinationDetails != nil { + f15elemf0 := &svcapitypes.DestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails != nil { + f15elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f15elemf0f0.LogGroup = f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f13elemf0.CloudWatchLogsDetails = f13elemf0f0 + f15elemf0.CloudWatchLogsDetails = f15elemf0f0 } - if f13iter.DestinationDetails.KinesisFirehoseDetails != nil { - f13elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f13elemf0f1.DeliveryStream = f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f15iter.DestinationDetails.KinesisFirehoseDetails != nil { + f15elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f15elemf0f1.DeliveryStream = f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f13elemf0.KinesisFirehoseDetails = f13elemf0f1 + f15elemf0.KinesisFirehoseDetails = f15elemf0f1 } - f13elem.DestinationDetails = f13elemf0 + f15elem.DestinationDetails = f15elemf0 } - if f13iter.DestinationType != nil { - f13elem.DestinationType = f13iter.DestinationType + if f15iter.DestinationType != nil { + f15elem.DestinationType = f15iter.DestinationType } - if f13iter.LogFormat != nil { - f13elem.LogFormat = f13iter.LogFormat + if f15iter.LogFormat != nil { + f15elem.LogFormat = f15iter.LogFormat } - if f13iter.LogType != nil { - f13elem.LogType = f13iter.LogType + if f15iter.LogType != nil { + f15elem.LogType = f15iter.LogType } - f13 = append(f13, f13elem) + f15 = append(f15, f15elem) } - ko.Spec.LogDeliveryConfigurations = f13 + ko.Spec.LogDeliveryConfigurations = f15 } else { ko.Spec.LogDeliveryConfigurations = nil } if resp.ReplicationGroup.MemberClusters != nil { - f14 := []*string{} - for _, f14iter := range resp.ReplicationGroup.MemberClusters { - var f14elem string - f14elem = *f14iter - f14 = append(f14, &f14elem) + f16 := []*string{} + for _, f16iter := range resp.ReplicationGroup.MemberClusters { + var f16elem string + f16elem = *f16iter + f16 = append(f16, &f16elem) } - ko.Status.MemberClusters = f14 + ko.Status.MemberClusters = f16 } else { ko.Status.MemberClusters = nil } if resp.ReplicationGroup.MemberClustersOutpostArns != nil { - f15 := []*string{} - for _, f15iter := range resp.ReplicationGroup.MemberClustersOutpostArns { - var f15elem string - f15elem = *f15iter - f15 = append(f15, &f15elem) + f17 := []*string{} + for _, f17iter := range resp.ReplicationGroup.MemberClustersOutpostArns { + var f17elem string + f17elem = *f17iter + f17 = append(f17, &f17elem) } - ko.Status.MemberClustersOutpostARNs = f15 + ko.Status.MemberClustersOutpostARNs = f17 } else { ko.Status.MemberClustersOutpostARNs = nil } @@ -705,158 +744,172 @@ func (rm *resourceManager) sdkCreate( } else { ko.Status.MultiAZ = nil } + if resp.ReplicationGroup.NetworkType != nil { + ko.Spec.NetworkType = resp.ReplicationGroup.NetworkType + } else { + ko.Spec.NetworkType = nil + } if resp.ReplicationGroup.NodeGroups != nil { - f17 := []*svcapitypes.NodeGroup{} - for _, f17iter := range resp.ReplicationGroup.NodeGroups { - f17elem := &svcapitypes.NodeGroup{} - if f17iter.NodeGroupId != nil { - f17elem.NodeGroupID = f17iter.NodeGroupId - } - if f17iter.NodeGroupMembers != nil { - f17elemf1 := []*svcapitypes.NodeGroupMember{} - for _, f17elemf1iter := range f17iter.NodeGroupMembers { - f17elemf1elem := &svcapitypes.NodeGroupMember{} - if f17elemf1iter.CacheClusterId != nil { - f17elemf1elem.CacheClusterID = f17elemf1iter.CacheClusterId + f20 := []*svcapitypes.NodeGroup{} + for _, f20iter := range resp.ReplicationGroup.NodeGroups { + f20elem := &svcapitypes.NodeGroup{} + if f20iter.NodeGroupId != nil { + f20elem.NodeGroupID = f20iter.NodeGroupId + } + if f20iter.NodeGroupMembers != nil { + f20elemf1 := []*svcapitypes.NodeGroupMember{} + for _, f20elemf1iter := range f20iter.NodeGroupMembers { + f20elemf1elem := &svcapitypes.NodeGroupMember{} + if f20elemf1iter.CacheClusterId != nil { + f20elemf1elem.CacheClusterID = f20elemf1iter.CacheClusterId } - if f17elemf1iter.CacheNodeId != nil { - f17elemf1elem.CacheNodeID = f17elemf1iter.CacheNodeId + if f20elemf1iter.CacheNodeId != nil { + f20elemf1elem.CacheNodeID = f20elemf1iter.CacheNodeId } - if f17elemf1iter.CurrentRole != nil { - f17elemf1elem.CurrentRole = f17elemf1iter.CurrentRole + if f20elemf1iter.CurrentRole != nil { + f20elemf1elem.CurrentRole = f20elemf1iter.CurrentRole } - if f17elemf1iter.PreferredAvailabilityZone != nil { - f17elemf1elem.PreferredAvailabilityZone = f17elemf1iter.PreferredAvailabilityZone + if f20elemf1iter.PreferredAvailabilityZone != nil { + f20elemf1elem.PreferredAvailabilityZone = f20elemf1iter.PreferredAvailabilityZone } - if f17elemf1iter.PreferredOutpostArn != nil { - f17elemf1elem.PreferredOutpostARN = f17elemf1iter.PreferredOutpostArn + if f20elemf1iter.PreferredOutpostArn != nil { + f20elemf1elem.PreferredOutpostARN = f20elemf1iter.PreferredOutpostArn } - if f17elemf1iter.ReadEndpoint != nil { - f17elemf1elemf5 := &svcapitypes.Endpoint{} - if f17elemf1iter.ReadEndpoint.Address != nil { - f17elemf1elemf5.Address = f17elemf1iter.ReadEndpoint.Address + if f20elemf1iter.ReadEndpoint != nil { + f20elemf1elemf5 := &svcapitypes.Endpoint{} + if f20elemf1iter.ReadEndpoint.Address != nil { + f20elemf1elemf5.Address = f20elemf1iter.ReadEndpoint.Address } - if f17elemf1iter.ReadEndpoint.Port != nil { - f17elemf1elemf5.Port = f17elemf1iter.ReadEndpoint.Port + if f20elemf1iter.ReadEndpoint.Port != nil { + f20elemf1elemf5.Port = f20elemf1iter.ReadEndpoint.Port } - f17elemf1elem.ReadEndpoint = f17elemf1elemf5 + f20elemf1elem.ReadEndpoint = f20elemf1elemf5 } - f17elemf1 = append(f17elemf1, f17elemf1elem) + f20elemf1 = append(f20elemf1, f20elemf1elem) } - f17elem.NodeGroupMembers = f17elemf1 + f20elem.NodeGroupMembers = f20elemf1 } - if f17iter.PrimaryEndpoint != nil { - f17elemf2 := &svcapitypes.Endpoint{} - if f17iter.PrimaryEndpoint.Address != nil { - f17elemf2.Address = f17iter.PrimaryEndpoint.Address + if f20iter.PrimaryEndpoint != nil { + f20elemf2 := &svcapitypes.Endpoint{} + if f20iter.PrimaryEndpoint.Address != nil { + f20elemf2.Address = f20iter.PrimaryEndpoint.Address } - if f17iter.PrimaryEndpoint.Port != nil { - f17elemf2.Port = f17iter.PrimaryEndpoint.Port + if f20iter.PrimaryEndpoint.Port != nil { + f20elemf2.Port = f20iter.PrimaryEndpoint.Port } - f17elem.PrimaryEndpoint = f17elemf2 + f20elem.PrimaryEndpoint = f20elemf2 } - if f17iter.ReaderEndpoint != nil { - f17elemf3 := &svcapitypes.Endpoint{} - if f17iter.ReaderEndpoint.Address != nil { - f17elemf3.Address = f17iter.ReaderEndpoint.Address + if f20iter.ReaderEndpoint != nil { + f20elemf3 := &svcapitypes.Endpoint{} + if f20iter.ReaderEndpoint.Address != nil { + f20elemf3.Address = f20iter.ReaderEndpoint.Address } - if f17iter.ReaderEndpoint.Port != nil { - f17elemf3.Port = f17iter.ReaderEndpoint.Port + if f20iter.ReaderEndpoint.Port != nil { + f20elemf3.Port = f20iter.ReaderEndpoint.Port } - f17elem.ReaderEndpoint = f17elemf3 + f20elem.ReaderEndpoint = f20elemf3 } - if f17iter.Slots != nil { - f17elem.Slots = f17iter.Slots + if f20iter.Slots != nil { + f20elem.Slots = f20iter.Slots } - if f17iter.Status != nil { - f17elem.Status = f17iter.Status + if f20iter.Status != nil { + f20elem.Status = f20iter.Status } - f17 = append(f17, f17elem) + f20 = append(f20, f20elem) } - ko.Status.NodeGroups = f17 + ko.Status.NodeGroups = f20 } else { ko.Status.NodeGroups = nil } if resp.ReplicationGroup.PendingModifiedValues != nil { - f18 := &svcapitypes.ReplicationGroupPendingModifiedValues{} + f21 := &svcapitypes.ReplicationGroupPendingModifiedValues{} if resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus != nil { - f18.AuthTokenStatus = resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus + f21.AuthTokenStatus = resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus } if resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus != nil { - f18.AutomaticFailoverStatus = resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus + f21.AutomaticFailoverStatus = resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus + } + if resp.ReplicationGroup.PendingModifiedValues.ClusterMode != nil { + f21.ClusterMode = resp.ReplicationGroup.PendingModifiedValues.ClusterMode } if resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations != nil { - f18f2 := []*svcapitypes.PendingLogDeliveryConfiguration{} - for _, f18f2iter := range resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations { - f18f2elem := &svcapitypes.PendingLogDeliveryConfiguration{} - if f18f2iter.DestinationDetails != nil { - f18f2elemf0 := &svcapitypes.DestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails != nil { - f18f2elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f18f2elemf0f0.LogGroup = f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f21f3 := []*svcapitypes.PendingLogDeliveryConfiguration{} + for _, f21f3iter := range resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations { + f21f3elem := &svcapitypes.PendingLogDeliveryConfiguration{} + if f21f3iter.DestinationDetails != nil { + f21f3elemf0 := &svcapitypes.DestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails != nil { + f21f3elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f21f3elemf0f0.LogGroup = f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f18f2elemf0.CloudWatchLogsDetails = f18f2elemf0f0 + f21f3elemf0.CloudWatchLogsDetails = f21f3elemf0f0 } - if f18f2iter.DestinationDetails.KinesisFirehoseDetails != nil { - f18f2elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f18f2elemf0f1.DeliveryStream = f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f21f3iter.DestinationDetails.KinesisFirehoseDetails != nil { + f21f3elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f21f3elemf0f1.DeliveryStream = f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f18f2elemf0.KinesisFirehoseDetails = f18f2elemf0f1 + f21f3elemf0.KinesisFirehoseDetails = f21f3elemf0f1 } - f18f2elem.DestinationDetails = f18f2elemf0 + f21f3elem.DestinationDetails = f21f3elemf0 } - if f18f2iter.DestinationType != nil { - f18f2elem.DestinationType = f18f2iter.DestinationType + if f21f3iter.DestinationType != nil { + f21f3elem.DestinationType = f21f3iter.DestinationType } - if f18f2iter.LogFormat != nil { - f18f2elem.LogFormat = f18f2iter.LogFormat + if f21f3iter.LogFormat != nil { + f21f3elem.LogFormat = f21f3iter.LogFormat } - if f18f2iter.LogType != nil { - f18f2elem.LogType = f18f2iter.LogType + if f21f3iter.LogType != nil { + f21f3elem.LogType = f21f3iter.LogType } - f18f2 = append(f18f2, f18f2elem) + f21f3 = append(f21f3, f21f3elem) } - f18.LogDeliveryConfigurations = f18f2 + f21.LogDeliveryConfigurations = f21f3 } if resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId != nil { - f18.PrimaryClusterID = resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId + f21.PrimaryClusterID = resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId } if resp.ReplicationGroup.PendingModifiedValues.Resharding != nil { - f18f4 := &svcapitypes.ReshardingStatus{} + f21f5 := &svcapitypes.ReshardingStatus{} if resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration != nil { - f18f4f0 := &svcapitypes.SlotMigration{} + f21f5f0 := &svcapitypes.SlotMigration{} if resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage != nil { - f18f4f0.ProgressPercentage = resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage + f21f5f0.ProgressPercentage = resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage } - f18f4.SlotMigration = f18f4f0 + f21f5.SlotMigration = f21f5f0 } - f18.Resharding = f18f4 + f21.Resharding = f21f5 + } + if resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionEnabled != nil { + f21.TransitEncryptionEnabled = resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionEnabled + } + if resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionMode != nil { + f21.TransitEncryptionMode = resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionMode } if resp.ReplicationGroup.PendingModifiedValues.UserGroups != nil { - f18f5 := &svcapitypes.UserGroupsUpdateStatus{} + f21f8 := &svcapitypes.UserGroupsUpdateStatus{} if resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd != nil { - f18f5f0 := []*string{} - for _, f18f5f0iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { - var f18f5f0elem string - f18f5f0elem = *f18f5f0iter - f18f5f0 = append(f18f5f0, &f18f5f0elem) + f21f8f0 := []*string{} + for _, f21f8f0iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { + var f21f8f0elem string + f21f8f0elem = *f21f8f0iter + f21f8f0 = append(f21f8f0, &f21f8f0elem) } - f18f5.UserGroupIDsToAdd = f18f5f0 + f21f8.UserGroupIDsToAdd = f21f8f0 } if resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove != nil { - f18f5f1 := []*string{} - for _, f18f5f1iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { - var f18f5f1elem string - f18f5f1elem = *f18f5f1iter - f18f5f1 = append(f18f5f1, &f18f5f1elem) + f21f8f1 := []*string{} + for _, f21f8f1iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { + var f21f8f1elem string + f21f8f1elem = *f21f8f1iter + f21f8f1 = append(f21f8f1, &f21f8f1elem) } - f18f5.UserGroupIDsToRemove = f18f5f1 + f21f8.UserGroupIDsToRemove = f21f8f1 } - f18.UserGroups = f18f5 + f21.UserGroups = f21f8 } - ko.Status.PendingModifiedValues = f18 + ko.Status.PendingModifiedValues = f21 } else { ko.Status.PendingModifiedValues = nil } @@ -895,14 +948,19 @@ func (rm *resourceManager) sdkCreate( } else { ko.Spec.TransitEncryptionEnabled = nil } + if resp.ReplicationGroup.TransitEncryptionMode != nil { + ko.Spec.TransitEncryptionMode = resp.ReplicationGroup.TransitEncryptionMode + } else { + ko.Spec.TransitEncryptionMode = nil + } if resp.ReplicationGroup.UserGroupIds != nil { - f26 := []*string{} - for _, f26iter := range resp.ReplicationGroup.UserGroupIds { - var f26elem string - f26elem = *f26iter - f26 = append(f26, &f26elem) + f30 := []*string{} + for _, f30iter := range resp.ReplicationGroup.UserGroupIds { + var f30elem string + f30elem = *f30iter + f30 = append(f30, &f30elem) } - ko.Spec.UserGroupIDs = f26 + ko.Spec.UserGroupIDs = f30 } else { ko.Spec.UserGroupIDs = nil } @@ -957,6 +1015,9 @@ func (rm *resourceManager) newCreateRequestPayload( if r.ko.Spec.CacheSubnetGroupName != nil { res.SetCacheSubnetGroupName(*r.ko.Spec.CacheSubnetGroupName) } + if r.ko.Spec.ClusterMode != nil { + res.SetClusterMode(*r.ko.Spec.ClusterMode) + } if r.ko.Spec.DataTieringEnabled != nil { res.SetDataTieringEnabled(*r.ko.Spec.DataTieringEnabled) } @@ -966,90 +1027,96 @@ func (rm *resourceManager) newCreateRequestPayload( if r.ko.Spec.EngineVersion != nil { res.SetEngineVersion(*r.ko.Spec.EngineVersion) } + if r.ko.Spec.IPDiscovery != nil { + res.SetIpDiscovery(*r.ko.Spec.IPDiscovery) + } if r.ko.Spec.KMSKeyID != nil { res.SetKmsKeyId(*r.ko.Spec.KMSKeyID) } if r.ko.Spec.LogDeliveryConfigurations != nil { - f11 := []*svcsdk.LogDeliveryConfigurationRequest{} - for _, f11iter := range r.ko.Spec.LogDeliveryConfigurations { - f11elem := &svcsdk.LogDeliveryConfigurationRequest{} - if f11iter.DestinationDetails != nil { - f11elemf0 := &svcsdk.DestinationDetails{} - if f11iter.DestinationDetails.CloudWatchLogsDetails != nil { - f11elemf0f0 := &svcsdk.CloudWatchLogsDestinationDetails{} - if f11iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f11elemf0f0.SetLogGroup(*f11iter.DestinationDetails.CloudWatchLogsDetails.LogGroup) + f13 := []*svcsdk.LogDeliveryConfigurationRequest{} + for _, f13iter := range r.ko.Spec.LogDeliveryConfigurations { + f13elem := &svcsdk.LogDeliveryConfigurationRequest{} + if f13iter.DestinationDetails != nil { + f13elemf0 := &svcsdk.DestinationDetails{} + if f13iter.DestinationDetails.CloudWatchLogsDetails != nil { + f13elemf0f0 := &svcsdk.CloudWatchLogsDestinationDetails{} + if f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f13elemf0f0.SetLogGroup(*f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup) } - f11elemf0.SetCloudWatchLogsDetails(f11elemf0f0) + f13elemf0.SetCloudWatchLogsDetails(f13elemf0f0) } - if f11iter.DestinationDetails.KinesisFirehoseDetails != nil { - f11elemf0f1 := &svcsdk.KinesisFirehoseDestinationDetails{} - if f11iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f11elemf0f1.SetDeliveryStream(*f11iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream) + if f13iter.DestinationDetails.KinesisFirehoseDetails != nil { + f13elemf0f1 := &svcsdk.KinesisFirehoseDestinationDetails{} + if f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f13elemf0f1.SetDeliveryStream(*f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream) } - f11elemf0.SetKinesisFirehoseDetails(f11elemf0f1) + f13elemf0.SetKinesisFirehoseDetails(f13elemf0f1) } - f11elem.SetDestinationDetails(f11elemf0) + f13elem.SetDestinationDetails(f13elemf0) } - if f11iter.DestinationType != nil { - f11elem.SetDestinationType(*f11iter.DestinationType) + if f13iter.DestinationType != nil { + f13elem.SetDestinationType(*f13iter.DestinationType) } - if f11iter.Enabled != nil { - f11elem.SetEnabled(*f11iter.Enabled) + if f13iter.Enabled != nil { + f13elem.SetEnabled(*f13iter.Enabled) } - if f11iter.LogFormat != nil { - f11elem.SetLogFormat(*f11iter.LogFormat) + if f13iter.LogFormat != nil { + f13elem.SetLogFormat(*f13iter.LogFormat) } - if f11iter.LogType != nil { - f11elem.SetLogType(*f11iter.LogType) + if f13iter.LogType != nil { + f13elem.SetLogType(*f13iter.LogType) } - f11 = append(f11, f11elem) + f13 = append(f13, f13elem) } - res.SetLogDeliveryConfigurations(f11) + res.SetLogDeliveryConfigurations(f13) } if r.ko.Spec.MultiAZEnabled != nil { res.SetMultiAZEnabled(*r.ko.Spec.MultiAZEnabled) } + if r.ko.Spec.NetworkType != nil { + res.SetNetworkType(*r.ko.Spec.NetworkType) + } if r.ko.Spec.NodeGroupConfiguration != nil { - f13 := []*svcsdk.NodeGroupConfiguration{} - for _, f13iter := range r.ko.Spec.NodeGroupConfiguration { - f13elem := &svcsdk.NodeGroupConfiguration{} - if f13iter.NodeGroupID != nil { - f13elem.SetNodeGroupId(*f13iter.NodeGroupID) + f16 := []*svcsdk.NodeGroupConfiguration{} + for _, f16iter := range r.ko.Spec.NodeGroupConfiguration { + f16elem := &svcsdk.NodeGroupConfiguration{} + if f16iter.NodeGroupID != nil { + f16elem.SetNodeGroupId(*f16iter.NodeGroupID) } - if f13iter.PrimaryAvailabilityZone != nil { - f13elem.SetPrimaryAvailabilityZone(*f13iter.PrimaryAvailabilityZone) + if f16iter.PrimaryAvailabilityZone != nil { + f16elem.SetPrimaryAvailabilityZone(*f16iter.PrimaryAvailabilityZone) } - if f13iter.PrimaryOutpostARN != nil { - f13elem.SetPrimaryOutpostArn(*f13iter.PrimaryOutpostARN) + if f16iter.PrimaryOutpostARN != nil { + f16elem.SetPrimaryOutpostArn(*f16iter.PrimaryOutpostARN) } - if f13iter.ReplicaAvailabilityZones != nil { - f13elemf3 := []*string{} - for _, f13elemf3iter := range f13iter.ReplicaAvailabilityZones { - var f13elemf3elem string - f13elemf3elem = *f13elemf3iter - f13elemf3 = append(f13elemf3, &f13elemf3elem) + if f16iter.ReplicaAvailabilityZones != nil { + f16elemf3 := []*string{} + for _, f16elemf3iter := range f16iter.ReplicaAvailabilityZones { + var f16elemf3elem string + f16elemf3elem = *f16elemf3iter + f16elemf3 = append(f16elemf3, &f16elemf3elem) } - f13elem.SetReplicaAvailabilityZones(f13elemf3) + f16elem.SetReplicaAvailabilityZones(f16elemf3) } - if f13iter.ReplicaCount != nil { - f13elem.SetReplicaCount(*f13iter.ReplicaCount) + if f16iter.ReplicaCount != nil { + f16elem.SetReplicaCount(*f16iter.ReplicaCount) } - if f13iter.ReplicaOutpostARNs != nil { - f13elemf5 := []*string{} - for _, f13elemf5iter := range f13iter.ReplicaOutpostARNs { - var f13elemf5elem string - f13elemf5elem = *f13elemf5iter - f13elemf5 = append(f13elemf5, &f13elemf5elem) + if f16iter.ReplicaOutpostARNs != nil { + f16elemf5 := []*string{} + for _, f16elemf5iter := range f16iter.ReplicaOutpostARNs { + var f16elemf5elem string + f16elemf5elem = *f16elemf5iter + f16elemf5 = append(f16elemf5, &f16elemf5elem) } - f13elem.SetReplicaOutpostArns(f13elemf5) + f16elem.SetReplicaOutpostArns(f16elemf5) } - if f13iter.Slots != nil { - f13elem.SetSlots(*f13iter.Slots) + if f16iter.Slots != nil { + f16elem.SetSlots(*f16iter.Slots) } - f13 = append(f13, f13elem) + f16 = append(f16, f16elem) } - res.SetNodeGroupConfiguration(f13) + res.SetNodeGroupConfiguration(f16) } if r.ko.Spec.NotificationTopicARN != nil { res.SetNotificationTopicArn(*r.ko.Spec.NotificationTopicARN) @@ -1061,13 +1128,13 @@ func (rm *resourceManager) newCreateRequestPayload( res.SetPort(*r.ko.Spec.Port) } if r.ko.Spec.PreferredCacheClusterAZs != nil { - f17 := []*string{} - for _, f17iter := range r.ko.Spec.PreferredCacheClusterAZs { - var f17elem string - f17elem = *f17iter - f17 = append(f17, &f17elem) + f20 := []*string{} + for _, f20iter := range r.ko.Spec.PreferredCacheClusterAZs { + var f20elem string + f20elem = *f20iter + f20 = append(f20, &f20elem) } - res.SetPreferredCacheClusterAZs(f17) + res.SetPreferredCacheClusterAZs(f20) } if r.ko.Spec.PreferredMaintenanceWindow != nil { res.SetPreferredMaintenanceWindow(*r.ko.Spec.PreferredMaintenanceWindow) @@ -1085,22 +1152,25 @@ func (rm *resourceManager) newCreateRequestPayload( res.SetReplicationGroupId(*r.ko.Spec.ReplicationGroupID) } if r.ko.Spec.SecurityGroupIDs != nil { - f23 := []*string{} - for _, f23iter := range r.ko.Spec.SecurityGroupIDs { - var f23elem string - f23elem = *f23iter - f23 = append(f23, &f23elem) + f26 := []*string{} + for _, f26iter := range r.ko.Spec.SecurityGroupIDs { + var f26elem string + f26elem = *f26iter + f26 = append(f26, &f26elem) } - res.SetSecurityGroupIds(f23) + res.SetSecurityGroupIds(f26) + } + if r.ko.Spec.ServerlessCacheSnapshotName != nil { + res.SetServerlessCacheSnapshotName(*r.ko.Spec.ServerlessCacheSnapshotName) } if r.ko.Spec.SnapshotARNs != nil { - f24 := []*string{} - for _, f24iter := range r.ko.Spec.SnapshotARNs { - var f24elem string - f24elem = *f24iter - f24 = append(f24, &f24elem) + f28 := []*string{} + for _, f28iter := range r.ko.Spec.SnapshotARNs { + var f28elem string + f28elem = *f28iter + f28 = append(f28, &f28elem) } - res.SetSnapshotArns(f24) + res.SetSnapshotArns(f28) } if r.ko.Spec.SnapshotName != nil { res.SetSnapshotName(*r.ko.Spec.SnapshotName) @@ -1112,30 +1182,33 @@ func (rm *resourceManager) newCreateRequestPayload( res.SetSnapshotWindow(*r.ko.Spec.SnapshotWindow) } if r.ko.Spec.Tags != nil { - f28 := []*svcsdk.Tag{} - for _, f28iter := range r.ko.Spec.Tags { - f28elem := &svcsdk.Tag{} - if f28iter.Key != nil { - f28elem.SetKey(*f28iter.Key) + f32 := []*svcsdk.Tag{} + for _, f32iter := range r.ko.Spec.Tags { + f32elem := &svcsdk.Tag{} + if f32iter.Key != nil { + f32elem.SetKey(*f32iter.Key) } - if f28iter.Value != nil { - f28elem.SetValue(*f28iter.Value) + if f32iter.Value != nil { + f32elem.SetValue(*f32iter.Value) } - f28 = append(f28, f28elem) + f32 = append(f32, f32elem) } - res.SetTags(f28) + res.SetTags(f32) } if r.ko.Spec.TransitEncryptionEnabled != nil { res.SetTransitEncryptionEnabled(*r.ko.Spec.TransitEncryptionEnabled) } + if r.ko.Spec.TransitEncryptionMode != nil { + res.SetTransitEncryptionMode(*r.ko.Spec.TransitEncryptionMode) + } if r.ko.Spec.UserGroupIDs != nil { - f30 := []*string{} - for _, f30iter := range r.ko.Spec.UserGroupIDs { - var f30elem string - f30elem = *f30iter - f30 = append(f30, &f30elem) + f35 := []*string{} + for _, f35iter := range r.ko.Spec.UserGroupIDs { + var f35elem string + f35elem = *f35iter + f35 = append(f35, &f35elem) } - res.SetUserGroupIds(f30) + res.SetUserGroupIds(f35) } return res, nil @@ -1275,15 +1348,20 @@ func (rm *resourceManager) sdkUpdate( } else { ko.Status.ClusterEnabled = nil } + if resp.ReplicationGroup.ClusterMode != nil { + ko.Spec.ClusterMode = resp.ReplicationGroup.ClusterMode + } else { + ko.Spec.ClusterMode = nil + } if resp.ReplicationGroup.ConfigurationEndpoint != nil { - f8 := &svcapitypes.Endpoint{} + f9 := &svcapitypes.Endpoint{} if resp.ReplicationGroup.ConfigurationEndpoint.Address != nil { - f8.Address = resp.ReplicationGroup.ConfigurationEndpoint.Address + f9.Address = resp.ReplicationGroup.ConfigurationEndpoint.Address } if resp.ReplicationGroup.ConfigurationEndpoint.Port != nil { - f8.Port = resp.ReplicationGroup.ConfigurationEndpoint.Port + f9.Port = resp.ReplicationGroup.ConfigurationEndpoint.Port } - ko.Status.ConfigurationEndpoint = f8 + ko.Status.ConfigurationEndpoint = f9 } else { ko.Status.ConfigurationEndpoint = nil } @@ -1298,78 +1376,83 @@ func (rm *resourceManager) sdkUpdate( ko.Spec.Description = nil } if resp.ReplicationGroup.GlobalReplicationGroupInfo != nil { - f11 := &svcapitypes.GlobalReplicationGroupInfo{} + f12 := &svcapitypes.GlobalReplicationGroupInfo{} if resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId != nil { - f11.GlobalReplicationGroupID = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId + f12.GlobalReplicationGroupID = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId } if resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole != nil { - f11.GlobalReplicationGroupMemberRole = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole + f12.GlobalReplicationGroupMemberRole = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole } - ko.Status.GlobalReplicationGroupInfo = f11 + ko.Status.GlobalReplicationGroupInfo = f12 } else { ko.Status.GlobalReplicationGroupInfo = nil } + if resp.ReplicationGroup.IpDiscovery != nil { + ko.Spec.IPDiscovery = resp.ReplicationGroup.IpDiscovery + } else { + ko.Spec.IPDiscovery = nil + } if resp.ReplicationGroup.KmsKeyId != nil { ko.Spec.KMSKeyID = resp.ReplicationGroup.KmsKeyId } else { ko.Spec.KMSKeyID = nil } if resp.ReplicationGroup.LogDeliveryConfigurations != nil { - f13 := []*svcapitypes.LogDeliveryConfigurationRequest{} - for _, f13iter := range resp.ReplicationGroup.LogDeliveryConfigurations { - f13elem := &svcapitypes.LogDeliveryConfigurationRequest{} - if f13iter.DestinationDetails != nil { - f13elemf0 := &svcapitypes.DestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails != nil { - f13elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f13elemf0f0.LogGroup = f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f15 := []*svcapitypes.LogDeliveryConfigurationRequest{} + for _, f15iter := range resp.ReplicationGroup.LogDeliveryConfigurations { + f15elem := &svcapitypes.LogDeliveryConfigurationRequest{} + if f15iter.DestinationDetails != nil { + f15elemf0 := &svcapitypes.DestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails != nil { + f15elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f15elemf0f0.LogGroup = f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f13elemf0.CloudWatchLogsDetails = f13elemf0f0 + f15elemf0.CloudWatchLogsDetails = f15elemf0f0 } - if f13iter.DestinationDetails.KinesisFirehoseDetails != nil { - f13elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f13elemf0f1.DeliveryStream = f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f15iter.DestinationDetails.KinesisFirehoseDetails != nil { + f15elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f15elemf0f1.DeliveryStream = f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f13elemf0.KinesisFirehoseDetails = f13elemf0f1 + f15elemf0.KinesisFirehoseDetails = f15elemf0f1 } - f13elem.DestinationDetails = f13elemf0 + f15elem.DestinationDetails = f15elemf0 } - if f13iter.DestinationType != nil { - f13elem.DestinationType = f13iter.DestinationType + if f15iter.DestinationType != nil { + f15elem.DestinationType = f15iter.DestinationType } - if f13iter.LogFormat != nil { - f13elem.LogFormat = f13iter.LogFormat + if f15iter.LogFormat != nil { + f15elem.LogFormat = f15iter.LogFormat } - if f13iter.LogType != nil { - f13elem.LogType = f13iter.LogType + if f15iter.LogType != nil { + f15elem.LogType = f15iter.LogType } - f13 = append(f13, f13elem) + f15 = append(f15, f15elem) } - ko.Spec.LogDeliveryConfigurations = f13 + ko.Spec.LogDeliveryConfigurations = f15 } else { ko.Spec.LogDeliveryConfigurations = nil } if resp.ReplicationGroup.MemberClusters != nil { - f14 := []*string{} - for _, f14iter := range resp.ReplicationGroup.MemberClusters { - var f14elem string - f14elem = *f14iter - f14 = append(f14, &f14elem) + f16 := []*string{} + for _, f16iter := range resp.ReplicationGroup.MemberClusters { + var f16elem string + f16elem = *f16iter + f16 = append(f16, &f16elem) } - ko.Status.MemberClusters = f14 + ko.Status.MemberClusters = f16 } else { ko.Status.MemberClusters = nil } if resp.ReplicationGroup.MemberClustersOutpostArns != nil { - f15 := []*string{} - for _, f15iter := range resp.ReplicationGroup.MemberClustersOutpostArns { - var f15elem string - f15elem = *f15iter - f15 = append(f15, &f15elem) + f17 := []*string{} + for _, f17iter := range resp.ReplicationGroup.MemberClustersOutpostArns { + var f17elem string + f17elem = *f17iter + f17 = append(f17, &f17elem) } - ko.Status.MemberClustersOutpostARNs = f15 + ko.Status.MemberClustersOutpostARNs = f17 } else { ko.Status.MemberClustersOutpostARNs = nil } @@ -1378,158 +1461,172 @@ func (rm *resourceManager) sdkUpdate( } else { ko.Status.MultiAZ = nil } + if resp.ReplicationGroup.NetworkType != nil { + ko.Spec.NetworkType = resp.ReplicationGroup.NetworkType + } else { + ko.Spec.NetworkType = nil + } if resp.ReplicationGroup.NodeGroups != nil { - f17 := []*svcapitypes.NodeGroup{} - for _, f17iter := range resp.ReplicationGroup.NodeGroups { - f17elem := &svcapitypes.NodeGroup{} - if f17iter.NodeGroupId != nil { - f17elem.NodeGroupID = f17iter.NodeGroupId - } - if f17iter.NodeGroupMembers != nil { - f17elemf1 := []*svcapitypes.NodeGroupMember{} - for _, f17elemf1iter := range f17iter.NodeGroupMembers { - f17elemf1elem := &svcapitypes.NodeGroupMember{} - if f17elemf1iter.CacheClusterId != nil { - f17elemf1elem.CacheClusterID = f17elemf1iter.CacheClusterId + f20 := []*svcapitypes.NodeGroup{} + for _, f20iter := range resp.ReplicationGroup.NodeGroups { + f20elem := &svcapitypes.NodeGroup{} + if f20iter.NodeGroupId != nil { + f20elem.NodeGroupID = f20iter.NodeGroupId + } + if f20iter.NodeGroupMembers != nil { + f20elemf1 := []*svcapitypes.NodeGroupMember{} + for _, f20elemf1iter := range f20iter.NodeGroupMembers { + f20elemf1elem := &svcapitypes.NodeGroupMember{} + if f20elemf1iter.CacheClusterId != nil { + f20elemf1elem.CacheClusterID = f20elemf1iter.CacheClusterId } - if f17elemf1iter.CacheNodeId != nil { - f17elemf1elem.CacheNodeID = f17elemf1iter.CacheNodeId + if f20elemf1iter.CacheNodeId != nil { + f20elemf1elem.CacheNodeID = f20elemf1iter.CacheNodeId } - if f17elemf1iter.CurrentRole != nil { - f17elemf1elem.CurrentRole = f17elemf1iter.CurrentRole + if f20elemf1iter.CurrentRole != nil { + f20elemf1elem.CurrentRole = f20elemf1iter.CurrentRole } - if f17elemf1iter.PreferredAvailabilityZone != nil { - f17elemf1elem.PreferredAvailabilityZone = f17elemf1iter.PreferredAvailabilityZone + if f20elemf1iter.PreferredAvailabilityZone != nil { + f20elemf1elem.PreferredAvailabilityZone = f20elemf1iter.PreferredAvailabilityZone } - if f17elemf1iter.PreferredOutpostArn != nil { - f17elemf1elem.PreferredOutpostARN = f17elemf1iter.PreferredOutpostArn + if f20elemf1iter.PreferredOutpostArn != nil { + f20elemf1elem.PreferredOutpostARN = f20elemf1iter.PreferredOutpostArn } - if f17elemf1iter.ReadEndpoint != nil { - f17elemf1elemf5 := &svcapitypes.Endpoint{} - if f17elemf1iter.ReadEndpoint.Address != nil { - f17elemf1elemf5.Address = f17elemf1iter.ReadEndpoint.Address + if f20elemf1iter.ReadEndpoint != nil { + f20elemf1elemf5 := &svcapitypes.Endpoint{} + if f20elemf1iter.ReadEndpoint.Address != nil { + f20elemf1elemf5.Address = f20elemf1iter.ReadEndpoint.Address } - if f17elemf1iter.ReadEndpoint.Port != nil { - f17elemf1elemf5.Port = f17elemf1iter.ReadEndpoint.Port + if f20elemf1iter.ReadEndpoint.Port != nil { + f20elemf1elemf5.Port = f20elemf1iter.ReadEndpoint.Port } - f17elemf1elem.ReadEndpoint = f17elemf1elemf5 + f20elemf1elem.ReadEndpoint = f20elemf1elemf5 } - f17elemf1 = append(f17elemf1, f17elemf1elem) + f20elemf1 = append(f20elemf1, f20elemf1elem) } - f17elem.NodeGroupMembers = f17elemf1 + f20elem.NodeGroupMembers = f20elemf1 } - if f17iter.PrimaryEndpoint != nil { - f17elemf2 := &svcapitypes.Endpoint{} - if f17iter.PrimaryEndpoint.Address != nil { - f17elemf2.Address = f17iter.PrimaryEndpoint.Address + if f20iter.PrimaryEndpoint != nil { + f20elemf2 := &svcapitypes.Endpoint{} + if f20iter.PrimaryEndpoint.Address != nil { + f20elemf2.Address = f20iter.PrimaryEndpoint.Address } - if f17iter.PrimaryEndpoint.Port != nil { - f17elemf2.Port = f17iter.PrimaryEndpoint.Port + if f20iter.PrimaryEndpoint.Port != nil { + f20elemf2.Port = f20iter.PrimaryEndpoint.Port } - f17elem.PrimaryEndpoint = f17elemf2 + f20elem.PrimaryEndpoint = f20elemf2 } - if f17iter.ReaderEndpoint != nil { - f17elemf3 := &svcapitypes.Endpoint{} - if f17iter.ReaderEndpoint.Address != nil { - f17elemf3.Address = f17iter.ReaderEndpoint.Address + if f20iter.ReaderEndpoint != nil { + f20elemf3 := &svcapitypes.Endpoint{} + if f20iter.ReaderEndpoint.Address != nil { + f20elemf3.Address = f20iter.ReaderEndpoint.Address } - if f17iter.ReaderEndpoint.Port != nil { - f17elemf3.Port = f17iter.ReaderEndpoint.Port + if f20iter.ReaderEndpoint.Port != nil { + f20elemf3.Port = f20iter.ReaderEndpoint.Port } - f17elem.ReaderEndpoint = f17elemf3 + f20elem.ReaderEndpoint = f20elemf3 } - if f17iter.Slots != nil { - f17elem.Slots = f17iter.Slots + if f20iter.Slots != nil { + f20elem.Slots = f20iter.Slots } - if f17iter.Status != nil { - f17elem.Status = f17iter.Status + if f20iter.Status != nil { + f20elem.Status = f20iter.Status } - f17 = append(f17, f17elem) + f20 = append(f20, f20elem) } - ko.Status.NodeGroups = f17 + ko.Status.NodeGroups = f20 } else { ko.Status.NodeGroups = nil } if resp.ReplicationGroup.PendingModifiedValues != nil { - f18 := &svcapitypes.ReplicationGroupPendingModifiedValues{} + f21 := &svcapitypes.ReplicationGroupPendingModifiedValues{} if resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus != nil { - f18.AuthTokenStatus = resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus + f21.AuthTokenStatus = resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus } if resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus != nil { - f18.AutomaticFailoverStatus = resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus + f21.AutomaticFailoverStatus = resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus + } + if resp.ReplicationGroup.PendingModifiedValues.ClusterMode != nil { + f21.ClusterMode = resp.ReplicationGroup.PendingModifiedValues.ClusterMode } if resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations != nil { - f18f2 := []*svcapitypes.PendingLogDeliveryConfiguration{} - for _, f18f2iter := range resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations { - f18f2elem := &svcapitypes.PendingLogDeliveryConfiguration{} - if f18f2iter.DestinationDetails != nil { - f18f2elemf0 := &svcapitypes.DestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails != nil { - f18f2elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f18f2elemf0f0.LogGroup = f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f21f3 := []*svcapitypes.PendingLogDeliveryConfiguration{} + for _, f21f3iter := range resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations { + f21f3elem := &svcapitypes.PendingLogDeliveryConfiguration{} + if f21f3iter.DestinationDetails != nil { + f21f3elemf0 := &svcapitypes.DestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails != nil { + f21f3elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f21f3elemf0f0.LogGroup = f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f18f2elemf0.CloudWatchLogsDetails = f18f2elemf0f0 + f21f3elemf0.CloudWatchLogsDetails = f21f3elemf0f0 } - if f18f2iter.DestinationDetails.KinesisFirehoseDetails != nil { - f18f2elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f18f2elemf0f1.DeliveryStream = f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f21f3iter.DestinationDetails.KinesisFirehoseDetails != nil { + f21f3elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f21f3elemf0f1.DeliveryStream = f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f18f2elemf0.KinesisFirehoseDetails = f18f2elemf0f1 + f21f3elemf0.KinesisFirehoseDetails = f21f3elemf0f1 } - f18f2elem.DestinationDetails = f18f2elemf0 + f21f3elem.DestinationDetails = f21f3elemf0 } - if f18f2iter.DestinationType != nil { - f18f2elem.DestinationType = f18f2iter.DestinationType + if f21f3iter.DestinationType != nil { + f21f3elem.DestinationType = f21f3iter.DestinationType } - if f18f2iter.LogFormat != nil { - f18f2elem.LogFormat = f18f2iter.LogFormat + if f21f3iter.LogFormat != nil { + f21f3elem.LogFormat = f21f3iter.LogFormat } - if f18f2iter.LogType != nil { - f18f2elem.LogType = f18f2iter.LogType + if f21f3iter.LogType != nil { + f21f3elem.LogType = f21f3iter.LogType } - f18f2 = append(f18f2, f18f2elem) + f21f3 = append(f21f3, f21f3elem) } - f18.LogDeliveryConfigurations = f18f2 + f21.LogDeliveryConfigurations = f21f3 } if resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId != nil { - f18.PrimaryClusterID = resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId + f21.PrimaryClusterID = resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId } if resp.ReplicationGroup.PendingModifiedValues.Resharding != nil { - f18f4 := &svcapitypes.ReshardingStatus{} + f21f5 := &svcapitypes.ReshardingStatus{} if resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration != nil { - f18f4f0 := &svcapitypes.SlotMigration{} + f21f5f0 := &svcapitypes.SlotMigration{} if resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage != nil { - f18f4f0.ProgressPercentage = resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage + f21f5f0.ProgressPercentage = resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage } - f18f4.SlotMigration = f18f4f0 + f21f5.SlotMigration = f21f5f0 } - f18.Resharding = f18f4 + f21.Resharding = f21f5 + } + if resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionEnabled != nil { + f21.TransitEncryptionEnabled = resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionEnabled + } + if resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionMode != nil { + f21.TransitEncryptionMode = resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionMode } if resp.ReplicationGroup.PendingModifiedValues.UserGroups != nil { - f18f5 := &svcapitypes.UserGroupsUpdateStatus{} + f21f8 := &svcapitypes.UserGroupsUpdateStatus{} if resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd != nil { - f18f5f0 := []*string{} - for _, f18f5f0iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { - var f18f5f0elem string - f18f5f0elem = *f18f5f0iter - f18f5f0 = append(f18f5f0, &f18f5f0elem) + f21f8f0 := []*string{} + for _, f21f8f0iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { + var f21f8f0elem string + f21f8f0elem = *f21f8f0iter + f21f8f0 = append(f21f8f0, &f21f8f0elem) } - f18f5.UserGroupIDsToAdd = f18f5f0 + f21f8.UserGroupIDsToAdd = f21f8f0 } if resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove != nil { - f18f5f1 := []*string{} - for _, f18f5f1iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { - var f18f5f1elem string - f18f5f1elem = *f18f5f1iter - f18f5f1 = append(f18f5f1, &f18f5f1elem) + f21f8f1 := []*string{} + for _, f21f8f1iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { + var f21f8f1elem string + f21f8f1elem = *f21f8f1iter + f21f8f1 = append(f21f8f1, &f21f8f1elem) } - f18f5.UserGroupIDsToRemove = f18f5f1 + f21f8.UserGroupIDsToRemove = f21f8f1 } - f18.UserGroups = f18f5 + f21.UserGroups = f21f8 } - ko.Status.PendingModifiedValues = f18 + ko.Status.PendingModifiedValues = f21 } else { ko.Status.PendingModifiedValues = nil } @@ -1568,14 +1665,19 @@ func (rm *resourceManager) sdkUpdate( } else { ko.Spec.TransitEncryptionEnabled = nil } + if resp.ReplicationGroup.TransitEncryptionMode != nil { + ko.Spec.TransitEncryptionMode = resp.ReplicationGroup.TransitEncryptionMode + } else { + ko.Spec.TransitEncryptionMode = nil + } if resp.ReplicationGroup.UserGroupIds != nil { - f26 := []*string{} - for _, f26iter := range resp.ReplicationGroup.UserGroupIds { - var f26elem string - f26elem = *f26iter - f26 = append(f26, &f26elem) + f30 := []*string{} + for _, f30iter := range resp.ReplicationGroup.UserGroupIds { + var f30elem string + f30elem = *f30iter + f30 = append(f30, &f30elem) } - ko.Spec.UserGroupIDs = f26 + ko.Spec.UserGroupIDs = f30 } else { ko.Spec.UserGroupIDs = nil } @@ -1629,43 +1731,49 @@ func (rm *resourceManager) newUpdateRequestPayload( } res.SetCacheSecurityGroupNames(f7) } + if r.ko.Spec.ClusterMode != nil { + res.SetClusterMode(*r.ko.Spec.ClusterMode) + } + if r.ko.Spec.IPDiscovery != nil { + res.SetIpDiscovery(*r.ko.Spec.IPDiscovery) + } if r.ko.Spec.LogDeliveryConfigurations != nil { - f8 := []*svcsdk.LogDeliveryConfigurationRequest{} - for _, f8iter := range r.ko.Spec.LogDeliveryConfigurations { - f8elem := &svcsdk.LogDeliveryConfigurationRequest{} - if f8iter.DestinationDetails != nil { - f8elemf0 := &svcsdk.DestinationDetails{} - if f8iter.DestinationDetails.CloudWatchLogsDetails != nil { - f8elemf0f0 := &svcsdk.CloudWatchLogsDestinationDetails{} - if f8iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f8elemf0f0.SetLogGroup(*f8iter.DestinationDetails.CloudWatchLogsDetails.LogGroup) + f10 := []*svcsdk.LogDeliveryConfigurationRequest{} + for _, f10iter := range r.ko.Spec.LogDeliveryConfigurations { + f10elem := &svcsdk.LogDeliveryConfigurationRequest{} + if f10iter.DestinationDetails != nil { + f10elemf0 := &svcsdk.DestinationDetails{} + if f10iter.DestinationDetails.CloudWatchLogsDetails != nil { + f10elemf0f0 := &svcsdk.CloudWatchLogsDestinationDetails{} + if f10iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f10elemf0f0.SetLogGroup(*f10iter.DestinationDetails.CloudWatchLogsDetails.LogGroup) } - f8elemf0.SetCloudWatchLogsDetails(f8elemf0f0) + f10elemf0.SetCloudWatchLogsDetails(f10elemf0f0) } - if f8iter.DestinationDetails.KinesisFirehoseDetails != nil { - f8elemf0f1 := &svcsdk.KinesisFirehoseDestinationDetails{} - if f8iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f8elemf0f1.SetDeliveryStream(*f8iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream) + if f10iter.DestinationDetails.KinesisFirehoseDetails != nil { + f10elemf0f1 := &svcsdk.KinesisFirehoseDestinationDetails{} + if f10iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f10elemf0f1.SetDeliveryStream(*f10iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream) } - f8elemf0.SetKinesisFirehoseDetails(f8elemf0f1) + f10elemf0.SetKinesisFirehoseDetails(f10elemf0f1) } - f8elem.SetDestinationDetails(f8elemf0) + f10elem.SetDestinationDetails(f10elemf0) } - if f8iter.DestinationType != nil { - f8elem.SetDestinationType(*f8iter.DestinationType) + if f10iter.DestinationType != nil { + f10elem.SetDestinationType(*f10iter.DestinationType) } - if f8iter.Enabled != nil { - f8elem.SetEnabled(*f8iter.Enabled) + if f10iter.Enabled != nil { + f10elem.SetEnabled(*f10iter.Enabled) } - if f8iter.LogFormat != nil { - f8elem.SetLogFormat(*f8iter.LogFormat) + if f10iter.LogFormat != nil { + f10elem.SetLogFormat(*f10iter.LogFormat) } - if f8iter.LogType != nil { - f8elem.SetLogType(*f8iter.LogType) + if f10iter.LogType != nil { + f10elem.SetLogType(*f10iter.LogType) } - f8 = append(f8, f8elem) + f10 = append(f10, f10elem) } - res.SetLogDeliveryConfigurations(f8) + res.SetLogDeliveryConfigurations(f10) } if r.ko.Spec.MultiAZEnabled != nil { res.SetMultiAZEnabled(*r.ko.Spec.MultiAZEnabled) @@ -1694,6 +1802,12 @@ func (rm *resourceManager) newUpdateRequestPayload( if r.ko.Status.SnapshottingClusterID != nil { res.SetSnapshottingClusterId(*r.ko.Status.SnapshottingClusterID) } + if r.ko.Spec.TransitEncryptionEnabled != nil { + res.SetTransitEncryptionEnabled(*r.ko.Spec.TransitEncryptionEnabled) + } + if r.ko.Spec.TransitEncryptionMode != nil { + res.SetTransitEncryptionMode(*r.ko.Spec.TransitEncryptionMode) + } return res, nil } @@ -1968,15 +2082,20 @@ func (rm *resourceManager) setReplicationGroupOutput( } else { ko.Status.ClusterEnabled = nil } + if resp.ReplicationGroup.ClusterMode != nil { + ko.Spec.ClusterMode = resp.ReplicationGroup.ClusterMode + } else { + ko.Spec.ClusterMode = nil + } if resp.ReplicationGroup.ConfigurationEndpoint != nil { - f8 := &svcapitypes.Endpoint{} + f9 := &svcapitypes.Endpoint{} if resp.ReplicationGroup.ConfigurationEndpoint.Address != nil { - f8.Address = resp.ReplicationGroup.ConfigurationEndpoint.Address + f9.Address = resp.ReplicationGroup.ConfigurationEndpoint.Address } if resp.ReplicationGroup.ConfigurationEndpoint.Port != nil { - f8.Port = resp.ReplicationGroup.ConfigurationEndpoint.Port + f9.Port = resp.ReplicationGroup.ConfigurationEndpoint.Port } - ko.Status.ConfigurationEndpoint = f8 + ko.Status.ConfigurationEndpoint = f9 } else { ko.Status.ConfigurationEndpoint = nil } @@ -1991,78 +2110,83 @@ func (rm *resourceManager) setReplicationGroupOutput( ko.Spec.Description = nil } if resp.ReplicationGroup.GlobalReplicationGroupInfo != nil { - f11 := &svcapitypes.GlobalReplicationGroupInfo{} + f12 := &svcapitypes.GlobalReplicationGroupInfo{} if resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId != nil { - f11.GlobalReplicationGroupID = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId + f12.GlobalReplicationGroupID = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupId } if resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole != nil { - f11.GlobalReplicationGroupMemberRole = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole + f12.GlobalReplicationGroupMemberRole = resp.ReplicationGroup.GlobalReplicationGroupInfo.GlobalReplicationGroupMemberRole } - ko.Status.GlobalReplicationGroupInfo = f11 + ko.Status.GlobalReplicationGroupInfo = f12 } else { ko.Status.GlobalReplicationGroupInfo = nil } + if resp.ReplicationGroup.IpDiscovery != nil { + ko.Spec.IPDiscovery = resp.ReplicationGroup.IpDiscovery + } else { + ko.Spec.IPDiscovery = nil + } if resp.ReplicationGroup.KmsKeyId != nil { ko.Spec.KMSKeyID = resp.ReplicationGroup.KmsKeyId } else { ko.Spec.KMSKeyID = nil } if resp.ReplicationGroup.LogDeliveryConfigurations != nil { - f13 := []*svcapitypes.LogDeliveryConfigurationRequest{} - for _, f13iter := range resp.ReplicationGroup.LogDeliveryConfigurations { - f13elem := &svcapitypes.LogDeliveryConfigurationRequest{} - if f13iter.DestinationDetails != nil { - f13elemf0 := &svcapitypes.DestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails != nil { - f13elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f13elemf0f0.LogGroup = f13iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f15 := []*svcapitypes.LogDeliveryConfigurationRequest{} + for _, f15iter := range resp.ReplicationGroup.LogDeliveryConfigurations { + f15elem := &svcapitypes.LogDeliveryConfigurationRequest{} + if f15iter.DestinationDetails != nil { + f15elemf0 := &svcapitypes.DestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails != nil { + f15elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f15elemf0f0.LogGroup = f15iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f13elemf0.CloudWatchLogsDetails = f13elemf0f0 + f15elemf0.CloudWatchLogsDetails = f15elemf0f0 } - if f13iter.DestinationDetails.KinesisFirehoseDetails != nil { - f13elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f13elemf0f1.DeliveryStream = f13iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f15iter.DestinationDetails.KinesisFirehoseDetails != nil { + f15elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f15elemf0f1.DeliveryStream = f15iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f13elemf0.KinesisFirehoseDetails = f13elemf0f1 + f15elemf0.KinesisFirehoseDetails = f15elemf0f1 } - f13elem.DestinationDetails = f13elemf0 + f15elem.DestinationDetails = f15elemf0 } - if f13iter.DestinationType != nil { - f13elem.DestinationType = f13iter.DestinationType + if f15iter.DestinationType != nil { + f15elem.DestinationType = f15iter.DestinationType } - if f13iter.LogFormat != nil { - f13elem.LogFormat = f13iter.LogFormat + if f15iter.LogFormat != nil { + f15elem.LogFormat = f15iter.LogFormat } - if f13iter.LogType != nil { - f13elem.LogType = f13iter.LogType + if f15iter.LogType != nil { + f15elem.LogType = f15iter.LogType } - f13 = append(f13, f13elem) + f15 = append(f15, f15elem) } - ko.Spec.LogDeliveryConfigurations = f13 + ko.Spec.LogDeliveryConfigurations = f15 } else { ko.Spec.LogDeliveryConfigurations = nil } if resp.ReplicationGroup.MemberClusters != nil { - f14 := []*string{} - for _, f14iter := range resp.ReplicationGroup.MemberClusters { - var f14elem string - f14elem = *f14iter - f14 = append(f14, &f14elem) + f16 := []*string{} + for _, f16iter := range resp.ReplicationGroup.MemberClusters { + var f16elem string + f16elem = *f16iter + f16 = append(f16, &f16elem) } - ko.Status.MemberClusters = f14 + ko.Status.MemberClusters = f16 } else { ko.Status.MemberClusters = nil } if resp.ReplicationGroup.MemberClustersOutpostArns != nil { - f15 := []*string{} - for _, f15iter := range resp.ReplicationGroup.MemberClustersOutpostArns { - var f15elem string - f15elem = *f15iter - f15 = append(f15, &f15elem) + f17 := []*string{} + for _, f17iter := range resp.ReplicationGroup.MemberClustersOutpostArns { + var f17elem string + f17elem = *f17iter + f17 = append(f17, &f17elem) } - ko.Status.MemberClustersOutpostARNs = f15 + ko.Status.MemberClustersOutpostARNs = f17 } else { ko.Status.MemberClustersOutpostARNs = nil } @@ -2071,158 +2195,172 @@ func (rm *resourceManager) setReplicationGroupOutput( } else { ko.Status.MultiAZ = nil } + if resp.ReplicationGroup.NetworkType != nil { + ko.Spec.NetworkType = resp.ReplicationGroup.NetworkType + } else { + ko.Spec.NetworkType = nil + } if resp.ReplicationGroup.NodeGroups != nil { - f17 := []*svcapitypes.NodeGroup{} - for _, f17iter := range resp.ReplicationGroup.NodeGroups { - f17elem := &svcapitypes.NodeGroup{} - if f17iter.NodeGroupId != nil { - f17elem.NodeGroupID = f17iter.NodeGroupId - } - if f17iter.NodeGroupMembers != nil { - f17elemf1 := []*svcapitypes.NodeGroupMember{} - for _, f17elemf1iter := range f17iter.NodeGroupMembers { - f17elemf1elem := &svcapitypes.NodeGroupMember{} - if f17elemf1iter.CacheClusterId != nil { - f17elemf1elem.CacheClusterID = f17elemf1iter.CacheClusterId + f20 := []*svcapitypes.NodeGroup{} + for _, f20iter := range resp.ReplicationGroup.NodeGroups { + f20elem := &svcapitypes.NodeGroup{} + if f20iter.NodeGroupId != nil { + f20elem.NodeGroupID = f20iter.NodeGroupId + } + if f20iter.NodeGroupMembers != nil { + f20elemf1 := []*svcapitypes.NodeGroupMember{} + for _, f20elemf1iter := range f20iter.NodeGroupMembers { + f20elemf1elem := &svcapitypes.NodeGroupMember{} + if f20elemf1iter.CacheClusterId != nil { + f20elemf1elem.CacheClusterID = f20elemf1iter.CacheClusterId } - if f17elemf1iter.CacheNodeId != nil { - f17elemf1elem.CacheNodeID = f17elemf1iter.CacheNodeId + if f20elemf1iter.CacheNodeId != nil { + f20elemf1elem.CacheNodeID = f20elemf1iter.CacheNodeId } - if f17elemf1iter.CurrentRole != nil { - f17elemf1elem.CurrentRole = f17elemf1iter.CurrentRole + if f20elemf1iter.CurrentRole != nil { + f20elemf1elem.CurrentRole = f20elemf1iter.CurrentRole } - if f17elemf1iter.PreferredAvailabilityZone != nil { - f17elemf1elem.PreferredAvailabilityZone = f17elemf1iter.PreferredAvailabilityZone + if f20elemf1iter.PreferredAvailabilityZone != nil { + f20elemf1elem.PreferredAvailabilityZone = f20elemf1iter.PreferredAvailabilityZone } - if f17elemf1iter.PreferredOutpostArn != nil { - f17elemf1elem.PreferredOutpostARN = f17elemf1iter.PreferredOutpostArn + if f20elemf1iter.PreferredOutpostArn != nil { + f20elemf1elem.PreferredOutpostARN = f20elemf1iter.PreferredOutpostArn } - if f17elemf1iter.ReadEndpoint != nil { - f17elemf1elemf5 := &svcapitypes.Endpoint{} - if f17elemf1iter.ReadEndpoint.Address != nil { - f17elemf1elemf5.Address = f17elemf1iter.ReadEndpoint.Address + if f20elemf1iter.ReadEndpoint != nil { + f20elemf1elemf5 := &svcapitypes.Endpoint{} + if f20elemf1iter.ReadEndpoint.Address != nil { + f20elemf1elemf5.Address = f20elemf1iter.ReadEndpoint.Address } - if f17elemf1iter.ReadEndpoint.Port != nil { - f17elemf1elemf5.Port = f17elemf1iter.ReadEndpoint.Port + if f20elemf1iter.ReadEndpoint.Port != nil { + f20elemf1elemf5.Port = f20elemf1iter.ReadEndpoint.Port } - f17elemf1elem.ReadEndpoint = f17elemf1elemf5 + f20elemf1elem.ReadEndpoint = f20elemf1elemf5 } - f17elemf1 = append(f17elemf1, f17elemf1elem) + f20elemf1 = append(f20elemf1, f20elemf1elem) } - f17elem.NodeGroupMembers = f17elemf1 + f20elem.NodeGroupMembers = f20elemf1 } - if f17iter.PrimaryEndpoint != nil { - f17elemf2 := &svcapitypes.Endpoint{} - if f17iter.PrimaryEndpoint.Address != nil { - f17elemf2.Address = f17iter.PrimaryEndpoint.Address + if f20iter.PrimaryEndpoint != nil { + f20elemf2 := &svcapitypes.Endpoint{} + if f20iter.PrimaryEndpoint.Address != nil { + f20elemf2.Address = f20iter.PrimaryEndpoint.Address } - if f17iter.PrimaryEndpoint.Port != nil { - f17elemf2.Port = f17iter.PrimaryEndpoint.Port + if f20iter.PrimaryEndpoint.Port != nil { + f20elemf2.Port = f20iter.PrimaryEndpoint.Port } - f17elem.PrimaryEndpoint = f17elemf2 + f20elem.PrimaryEndpoint = f20elemf2 } - if f17iter.ReaderEndpoint != nil { - f17elemf3 := &svcapitypes.Endpoint{} - if f17iter.ReaderEndpoint.Address != nil { - f17elemf3.Address = f17iter.ReaderEndpoint.Address + if f20iter.ReaderEndpoint != nil { + f20elemf3 := &svcapitypes.Endpoint{} + if f20iter.ReaderEndpoint.Address != nil { + f20elemf3.Address = f20iter.ReaderEndpoint.Address } - if f17iter.ReaderEndpoint.Port != nil { - f17elemf3.Port = f17iter.ReaderEndpoint.Port + if f20iter.ReaderEndpoint.Port != nil { + f20elemf3.Port = f20iter.ReaderEndpoint.Port } - f17elem.ReaderEndpoint = f17elemf3 + f20elem.ReaderEndpoint = f20elemf3 } - if f17iter.Slots != nil { - f17elem.Slots = f17iter.Slots + if f20iter.Slots != nil { + f20elem.Slots = f20iter.Slots } - if f17iter.Status != nil { - f17elem.Status = f17iter.Status + if f20iter.Status != nil { + f20elem.Status = f20iter.Status } - f17 = append(f17, f17elem) + f20 = append(f20, f20elem) } - ko.Status.NodeGroups = f17 + ko.Status.NodeGroups = f20 } else { ko.Status.NodeGroups = nil } if resp.ReplicationGroup.PendingModifiedValues != nil { - f18 := &svcapitypes.ReplicationGroupPendingModifiedValues{} + f21 := &svcapitypes.ReplicationGroupPendingModifiedValues{} if resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus != nil { - f18.AuthTokenStatus = resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus + f21.AuthTokenStatus = resp.ReplicationGroup.PendingModifiedValues.AuthTokenStatus } if resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus != nil { - f18.AutomaticFailoverStatus = resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus + f21.AutomaticFailoverStatus = resp.ReplicationGroup.PendingModifiedValues.AutomaticFailoverStatus + } + if resp.ReplicationGroup.PendingModifiedValues.ClusterMode != nil { + f21.ClusterMode = resp.ReplicationGroup.PendingModifiedValues.ClusterMode } if resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations != nil { - f18f2 := []*svcapitypes.PendingLogDeliveryConfiguration{} - for _, f18f2iter := range resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations { - f18f2elem := &svcapitypes.PendingLogDeliveryConfiguration{} - if f18f2iter.DestinationDetails != nil { - f18f2elemf0 := &svcapitypes.DestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails != nil { - f18f2elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} - if f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { - f18f2elemf0f0.LogGroup = f18f2iter.DestinationDetails.CloudWatchLogsDetails.LogGroup + f21f3 := []*svcapitypes.PendingLogDeliveryConfiguration{} + for _, f21f3iter := range resp.ReplicationGroup.PendingModifiedValues.LogDeliveryConfigurations { + f21f3elem := &svcapitypes.PendingLogDeliveryConfiguration{} + if f21f3iter.DestinationDetails != nil { + f21f3elemf0 := &svcapitypes.DestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails != nil { + f21f3elemf0f0 := &svcapitypes.CloudWatchLogsDestinationDetails{} + if f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup != nil { + f21f3elemf0f0.LogGroup = f21f3iter.DestinationDetails.CloudWatchLogsDetails.LogGroup } - f18f2elemf0.CloudWatchLogsDetails = f18f2elemf0f0 + f21f3elemf0.CloudWatchLogsDetails = f21f3elemf0f0 } - if f18f2iter.DestinationDetails.KinesisFirehoseDetails != nil { - f18f2elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} - if f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { - f18f2elemf0f1.DeliveryStream = f18f2iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream + if f21f3iter.DestinationDetails.KinesisFirehoseDetails != nil { + f21f3elemf0f1 := &svcapitypes.KinesisFirehoseDestinationDetails{} + if f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream != nil { + f21f3elemf0f1.DeliveryStream = f21f3iter.DestinationDetails.KinesisFirehoseDetails.DeliveryStream } - f18f2elemf0.KinesisFirehoseDetails = f18f2elemf0f1 + f21f3elemf0.KinesisFirehoseDetails = f21f3elemf0f1 } - f18f2elem.DestinationDetails = f18f2elemf0 + f21f3elem.DestinationDetails = f21f3elemf0 } - if f18f2iter.DestinationType != nil { - f18f2elem.DestinationType = f18f2iter.DestinationType + if f21f3iter.DestinationType != nil { + f21f3elem.DestinationType = f21f3iter.DestinationType } - if f18f2iter.LogFormat != nil { - f18f2elem.LogFormat = f18f2iter.LogFormat + if f21f3iter.LogFormat != nil { + f21f3elem.LogFormat = f21f3iter.LogFormat } - if f18f2iter.LogType != nil { - f18f2elem.LogType = f18f2iter.LogType + if f21f3iter.LogType != nil { + f21f3elem.LogType = f21f3iter.LogType } - f18f2 = append(f18f2, f18f2elem) + f21f3 = append(f21f3, f21f3elem) } - f18.LogDeliveryConfigurations = f18f2 + f21.LogDeliveryConfigurations = f21f3 } if resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId != nil { - f18.PrimaryClusterID = resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId + f21.PrimaryClusterID = resp.ReplicationGroup.PendingModifiedValues.PrimaryClusterId } if resp.ReplicationGroup.PendingModifiedValues.Resharding != nil { - f18f4 := &svcapitypes.ReshardingStatus{} + f21f5 := &svcapitypes.ReshardingStatus{} if resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration != nil { - f18f4f0 := &svcapitypes.SlotMigration{} + f21f5f0 := &svcapitypes.SlotMigration{} if resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage != nil { - f18f4f0.ProgressPercentage = resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage + f21f5f0.ProgressPercentage = resp.ReplicationGroup.PendingModifiedValues.Resharding.SlotMigration.ProgressPercentage } - f18f4.SlotMigration = f18f4f0 + f21f5.SlotMigration = f21f5f0 } - f18.Resharding = f18f4 + f21.Resharding = f21f5 + } + if resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionEnabled != nil { + f21.TransitEncryptionEnabled = resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionEnabled + } + if resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionMode != nil { + f21.TransitEncryptionMode = resp.ReplicationGroup.PendingModifiedValues.TransitEncryptionMode } if resp.ReplicationGroup.PendingModifiedValues.UserGroups != nil { - f18f5 := &svcapitypes.UserGroupsUpdateStatus{} + f21f8 := &svcapitypes.UserGroupsUpdateStatus{} if resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd != nil { - f18f5f0 := []*string{} - for _, f18f5f0iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { - var f18f5f0elem string - f18f5f0elem = *f18f5f0iter - f18f5f0 = append(f18f5f0, &f18f5f0elem) + f21f8f0 := []*string{} + for _, f21f8f0iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToAdd { + var f21f8f0elem string + f21f8f0elem = *f21f8f0iter + f21f8f0 = append(f21f8f0, &f21f8f0elem) } - f18f5.UserGroupIDsToAdd = f18f5f0 + f21f8.UserGroupIDsToAdd = f21f8f0 } if resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove != nil { - f18f5f1 := []*string{} - for _, f18f5f1iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { - var f18f5f1elem string - f18f5f1elem = *f18f5f1iter - f18f5f1 = append(f18f5f1, &f18f5f1elem) + f21f8f1 := []*string{} + for _, f21f8f1iter := range resp.ReplicationGroup.PendingModifiedValues.UserGroups.UserGroupIdsToRemove { + var f21f8f1elem string + f21f8f1elem = *f21f8f1iter + f21f8f1 = append(f21f8f1, &f21f8f1elem) } - f18f5.UserGroupIDsToRemove = f18f5f1 + f21f8.UserGroupIDsToRemove = f21f8f1 } - f18.UserGroups = f18f5 + f21.UserGroups = f21f8 } - ko.Status.PendingModifiedValues = f18 + ko.Status.PendingModifiedValues = f21 } else { ko.Status.PendingModifiedValues = nil } @@ -2261,14 +2399,19 @@ func (rm *resourceManager) setReplicationGroupOutput( } else { ko.Spec.TransitEncryptionEnabled = nil } + if resp.ReplicationGroup.TransitEncryptionMode != nil { + ko.Spec.TransitEncryptionMode = resp.ReplicationGroup.TransitEncryptionMode + } else { + ko.Spec.TransitEncryptionMode = nil + } if resp.ReplicationGroup.UserGroupIds != nil { - f26 := []*string{} - for _, f26iter := range resp.ReplicationGroup.UserGroupIds { - var f26elem string - f26elem = *f26iter - f26 = append(f26, &f26elem) + f30 := []*string{} + for _, f30iter := range resp.ReplicationGroup.UserGroupIds { + var f30elem string + f30elem = *f30iter + f30 = append(f30, &f30elem) } - ko.Spec.UserGroupIDs = f26 + ko.Spec.UserGroupIDs = f30 } else { ko.Spec.UserGroupIDs = nil } diff --git a/pkg/resource/snapshot/manager_factory.go b/pkg/resource/snapshot/manager_factory.go index 6140bba4..bb2daa2f 100644 --- a/pkg/resource/snapshot/manager_factory.go +++ b/pkg/resource/snapshot/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/user/delta.go b/pkg/resource/user/delta.go index 746c7b38..cd2a9791 100644 --- a/pkg/resource/user/delta.go +++ b/pkg/resource/user/delta.go @@ -50,6 +50,24 @@ func newResourceDelta( delta.Add("Spec.AccessString", a.ko.Spec.AccessString, b.ko.Spec.AccessString) } } + if ackcompare.HasNilDifference(a.ko.Spec.AuthenticationMode, b.ko.Spec.AuthenticationMode) { + delta.Add("Spec.AuthenticationMode", a.ko.Spec.AuthenticationMode, b.ko.Spec.AuthenticationMode) + } else if a.ko.Spec.AuthenticationMode != nil && b.ko.Spec.AuthenticationMode != nil { + if len(a.ko.Spec.AuthenticationMode.Passwords) != len(b.ko.Spec.AuthenticationMode.Passwords) { + delta.Add("Spec.AuthenticationMode.Passwords", a.ko.Spec.AuthenticationMode.Passwords, b.ko.Spec.AuthenticationMode.Passwords) + } else if len(a.ko.Spec.AuthenticationMode.Passwords) > 0 { + if !ackcompare.SliceStringPEqual(a.ko.Spec.AuthenticationMode.Passwords, b.ko.Spec.AuthenticationMode.Passwords) { + delta.Add("Spec.AuthenticationMode.Passwords", a.ko.Spec.AuthenticationMode.Passwords, b.ko.Spec.AuthenticationMode.Passwords) + } + } + if ackcompare.HasNilDifference(a.ko.Spec.AuthenticationMode.Type, b.ko.Spec.AuthenticationMode.Type) { + delta.Add("Spec.AuthenticationMode.Type", a.ko.Spec.AuthenticationMode.Type, b.ko.Spec.AuthenticationMode.Type) + } else if a.ko.Spec.AuthenticationMode.Type != nil && b.ko.Spec.AuthenticationMode.Type != nil { + if *a.ko.Spec.AuthenticationMode.Type != *b.ko.Spec.AuthenticationMode.Type { + delta.Add("Spec.AuthenticationMode.Type", a.ko.Spec.AuthenticationMode.Type, b.ko.Spec.AuthenticationMode.Type) + } + } + } if ackcompare.HasNilDifference(a.ko.Spec.Engine, b.ko.Spec.Engine) { delta.Add("Spec.Engine", a.ko.Spec.Engine, b.ko.Spec.Engine) } else if a.ko.Spec.Engine != nil && b.ko.Spec.Engine != nil { diff --git a/pkg/resource/user/manager_factory.go b/pkg/resource/user/manager_factory.go index d5b128a0..aad13dee 100644 --- a/pkg/resource/user/manager_factory.go +++ b/pkg/resource/user/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/user/sdk.go b/pkg/resource/user/sdk.go index e533f848..9e0dbc33 100644 --- a/pkg/resource/user/sdk.go +++ b/pkg/resource/user/sdk.go @@ -294,6 +294,22 @@ func (rm *resourceManager) newCreateRequestPayload( if r.ko.Spec.AccessString != nil { res.SetAccessString(*r.ko.Spec.AccessString) } + if r.ko.Spec.AuthenticationMode != nil { + f1 := &svcsdk.AuthenticationMode{} + if r.ko.Spec.AuthenticationMode.Passwords != nil { + f1f0 := []*string{} + for _, f1f0iter := range r.ko.Spec.AuthenticationMode.Passwords { + var f1f0elem string + f1f0elem = *f1f0iter + f1f0 = append(f1f0, &f1f0elem) + } + f1.SetPasswords(f1f0) + } + if r.ko.Spec.AuthenticationMode.Type != nil { + f1.SetType(*r.ko.Spec.AuthenticationMode.Type) + } + res.SetAuthenticationMode(f1) + } if r.ko.Spec.Engine != nil { res.SetEngine(*r.ko.Spec.Engine) } @@ -301,35 +317,35 @@ func (rm *resourceManager) newCreateRequestPayload( res.SetNoPasswordRequired(*r.ko.Spec.NoPasswordRequired) } if r.ko.Spec.Passwords != nil { - f3 := []*string{} - for _, f3iter := range r.ko.Spec.Passwords { - var f3elem string - if f3iter != nil { - tmpSecret, err := rm.rr.SecretValueFromReference(ctx, f3iter) + f4 := []*string{} + for _, f4iter := range r.ko.Spec.Passwords { + var f4elem string + if f4iter != nil { + tmpSecret, err := rm.rr.SecretValueFromReference(ctx, f4iter) if err != nil { return nil, ackrequeue.Needed(err) } if tmpSecret != "" { - f3elem = tmpSecret + f4elem = tmpSecret } } - f3 = append(f3, &f3elem) + f4 = append(f4, &f4elem) } - res.SetPasswords(f3) + res.SetPasswords(f4) } if r.ko.Spec.Tags != nil { - f4 := []*svcsdk.Tag{} - for _, f4iter := range r.ko.Spec.Tags { - f4elem := &svcsdk.Tag{} - if f4iter.Key != nil { - f4elem.SetKey(*f4iter.Key) + f5 := []*svcsdk.Tag{} + for _, f5iter := range r.ko.Spec.Tags { + f5elem := &svcsdk.Tag{} + if f5iter.Key != nil { + f5elem.SetKey(*f5iter.Key) } - if f4iter.Value != nil { - f4elem.SetValue(*f4iter.Value) + if f5iter.Value != nil { + f5elem.SetValue(*f5iter.Value) } - f4 = append(f4, f4elem) + f5 = append(f5, f5elem) } - res.SetTags(f4) + res.SetTags(f5) } if r.ko.Spec.UserID != nil { res.SetUserId(*r.ko.Spec.UserID) @@ -455,6 +471,22 @@ func (rm *resourceManager) newUpdateRequestPayload( ) (*svcsdk.ModifyUserInput, error) { res := &svcsdk.ModifyUserInput{} + if r.ko.Spec.AuthenticationMode != nil { + f1 := &svcsdk.AuthenticationMode{} + if r.ko.Spec.AuthenticationMode.Passwords != nil { + f1f0 := []*string{} + for _, f1f0iter := range r.ko.Spec.AuthenticationMode.Passwords { + var f1f0elem string + f1f0elem = *f1f0iter + f1f0 = append(f1f0, &f1f0elem) + } + f1.SetPasswords(f1f0) + } + if r.ko.Spec.AuthenticationMode.Type != nil { + f1.SetType(*r.ko.Spec.AuthenticationMode.Type) + } + res.SetAuthenticationMode(f1) + } if r.ko.Spec.UserID != nil { res.SetUserId(*r.ko.Spec.UserID) } diff --git a/pkg/resource/user_group/manager_factory.go b/pkg/resource/user_group/manager_factory.go index db798305..c81d479d 100644 --- a/pkg/resource/user_group/manager_factory.go +++ b/pkg/resource/user_group/manager_factory.go @@ -53,8 +53,12 @@ func (f *resourceManagerFactory) ManagerFor( sess *session.Session, id ackv1alpha1.AWSAccountID, region ackv1alpha1.AWSRegion, + roleARN ackv1alpha1.AWSResourceName, ) (acktypes.AWSResourceManager, error) { - rmId := fmt.Sprintf("%s/%s", id, region) + // We use the account ID, region, and role ARN to uniquely identify a + // resource manager. This helps us to avoid creating multiple resource + // managers for the same account/region/roleARN combination. + rmId := fmt.Sprintf("%s/%s/%s", id, region, roleARN) f.RLock() rm, found := f.rmCache[rmId] f.RUnlock() diff --git a/pkg/resource/user_group/sdk.go b/pkg/resource/user_group/sdk.go index a9c736d8..5ce9ab9f 100644 --- a/pkg/resource/user_group/sdk.go +++ b/pkg/resource/user_group/sdk.go @@ -140,6 +140,17 @@ func (rm *resourceManager) sdkFind( } else { ko.Status.ReplicationGroups = nil } + if elem.ServerlessCaches != nil { + f5 := []*string{} + for _, f5iter := range elem.ServerlessCaches { + var f5elem string + f5elem = *f5iter + f5 = append(f5, &f5elem) + } + ko.Status.ServerlessCaches = f5 + } else { + ko.Status.ServerlessCaches = nil + } if elem.Status != nil { ko.Status.Status = elem.Status } else { @@ -151,13 +162,13 @@ func (rm *resourceManager) sdkFind( ko.Spec.UserGroupID = nil } if elem.UserIds != nil { - f7 := []*string{} - for _, f7iter := range elem.UserIds { - var f7elem string - f7elem = *f7iter - f7 = append(f7, &f7elem) + f8 := []*string{} + for _, f8iter := range elem.UserIds { + var f8elem string + f8elem = *f8iter + f8 = append(f8, &f8elem) } - ko.Spec.UserIDs = f7 + ko.Spec.UserIDs = f8 } else { ko.Spec.UserIDs = nil } @@ -281,6 +292,17 @@ func (rm *resourceManager) sdkCreate( } else { ko.Status.ReplicationGroups = nil } + if resp.ServerlessCaches != nil { + f5 := []*string{} + for _, f5iter := range resp.ServerlessCaches { + var f5elem string + f5elem = *f5iter + f5 = append(f5, &f5elem) + } + ko.Status.ServerlessCaches = f5 + } else { + ko.Status.ServerlessCaches = nil + } if resp.Status != nil { ko.Status.Status = resp.Status } else { @@ -292,13 +314,13 @@ func (rm *resourceManager) sdkCreate( ko.Spec.UserGroupID = nil } if resp.UserIds != nil { - f7 := []*string{} - for _, f7iter := range resp.UserIds { - var f7elem string - f7elem = *f7iter - f7 = append(f7, &f7elem) + f8 := []*string{} + for _, f8iter := range resp.UserIds { + var f8elem string + f8elem = *f8iter + f8 = append(f8, &f8elem) } - ko.Spec.UserIDs = f7 + ko.Spec.UserIDs = f8 } else { ko.Spec.UserIDs = nil }