Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2022-03-25T18:32:50Z"
build_hash: c6b852a8017aa73cfc5a882b1ba60c88d820e967
go_version: go1.17.5
version: v0.18.1
api_directory_checksum: 246af92291668493e03954b4e4117c21f5b62790
build_date: "2022-04-11T23:03:51Z"
build_hash: fc5620cf5fde243ee5124324d26bb7e952049bf2
go_version: go1.17.8
version: v0.18.3
api_directory_checksum: 7087207d90a71ce286e3c45edad16bb89b0a8eb3
api_version: v1alpha1
aws_sdk_go_version: v1.42.0
generator_config_info:
file_checksum: 4fd6f317804ecb5192bfb88c569ae335d418248b
file_checksum: 2461349a2827ec98ae7440fbff3301c1effcfaf4
original_file_name: generator.yaml
last_modification:
reason: API generation
8 changes: 8 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ resources:
template_path: hooks/replication_group/sdk_file_end.go.tpl
sdk_file_end_set_output_post_populate:
code: "rm.customSetOutput(obj, ko) // custom set output from obj"
renames:
operations:
CreateReplicationGroup:
input_fields:
ReplicationGroupDescription: Description
ModifyReplicationGroup:
input_fields:
ReplicationGroupDescription: Description
Snapshot:
update_conditions_custom_method_name: CustomUpdateConditions
exceptions:
Expand Down
9 changes: 3 additions & 6 deletions apis/v1alpha1/replication_group.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ spec:
creating a cluster. For more information, see Subnets and Subnet
Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html)."
type: string
description:
description: A user-created description for the replication group.
type: string
engine:
description: The name of the cache engine to be used for the clusters
in this replication group. Must be Redis.
Expand Down Expand Up @@ -293,9 +296,6 @@ spec:
nodes in each node group (shard). Valid values are 0 to 5.
format: int64
type: integer
replicationGroupDescription:
description: A user-created description for the replication group.
type: string
replicationGroupID:
description: "The replication group identifier. This parameter is
stored as a lowercase string. \n Constraints: \n * A name must
Expand Down Expand Up @@ -383,7 +383,7 @@ spec:
type: string
type: array
required:
- replicationGroupDescription
- description
- replicationGroupID
type: object
status:
Expand Down Expand Up @@ -496,9 +496,6 @@ spec:
format: int64
type: integer
type: object
description:
description: The user supplied description of the replication group.
type: string
events:
description: A list of events. Each element in the list contains detailed
information about one event.
Expand Down
8 changes: 8 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ resources:
template_path: hooks/replication_group/sdk_file_end.go.tpl
sdk_file_end_set_output_post_populate:
code: "rm.customSetOutput(obj, ko) // custom set output from obj"
renames:
operations:
CreateReplicationGroup:
input_fields:
ReplicationGroupDescription: Description
ModifyReplicationGroup:
input_fields:
ReplicationGroupDescription: Description
Snapshot:
update_conditions_custom_method_name: CustomUpdateConditions
exceptions:
Expand Down
4 changes: 3 additions & 1 deletion go.local.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ require (
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // 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
github.com/jaypipes/envutil v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -50,7 +52,7 @@ require (
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
Expand Down
11 changes: 4 additions & 7 deletions helm/crds/elasticache.services.k8s.aws_replicationgroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ spec:
creating a cluster. For more information, see Subnets and Subnet
Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html)."
type: string
description:
description: A user-created description for the replication group.
type: string
engine:
description: The name of the cache engine to be used for the clusters
in this replication group. Must be Redis.
Expand Down Expand Up @@ -293,9 +296,6 @@ spec:
nodes in each node group (shard). Valid values are 0 to 5.
format: int64
type: integer
replicationGroupDescription:
description: A user-created description for the replication group.
type: string
replicationGroupID:
description: "The replication group identifier. This parameter is
stored as a lowercase string. \n Constraints: \n * A name must
Expand Down Expand Up @@ -383,7 +383,7 @@ spec:
type: string
type: array
required:
- replicationGroupDescription
- description
- replicationGroupID
type: object
status:
Expand Down Expand Up @@ -496,9 +496,6 @@ spec:
format: int64
type: integer
type: object
description:
description: The user supplied description of the replication group.
type: string
events:
description: A list of events. Each element in the list contains detailed
information about one event.
Expand Down
7 changes: 4 additions & 3 deletions pkg/resource/cache_parameter_group/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/resource/cache_subnet_group/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions pkg/resource/replication_group/custom_update_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ package replication_group
import (
"context"
"fmt"
"path/filepath"
"strconv"
"testing"

"github.com/aws-controllers-k8s/elasticache-controller/pkg/testutil"
ackmetrics "github.com/aws-controllers-k8s/runtime/pkg/metrics"
"github.com/aws-controllers-k8s/runtime/pkg/requeue"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/pkg/errors"
"github.com/stretchr/testify/mock"
"go.uber.org/zap/zapcore"
"path/filepath"
ctrlrtzap "sigs.k8s.io/controller-runtime/pkg/log/zap"
"strconv"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -267,7 +268,7 @@ func validatePayloadReplicaConfig(
func TestDecreaseReplicaCountMock(t *testing.T) {
assert := assert.New(t)
// Setup mock API response
var mockReplicationGroupDescription = "mock_replication_group_description"
var mockDescription = "mock_replication_group_description"
var mockOutput svcsdk.DecreaseReplicaCountOutput
testutil.LoadFromFixture(filepath.Join("testdata", "DecreaseReplicaCountOutput.json"), &mockOutput)
mocksdkapi := &mocksvcsdkapi.ElastiCacheAPI{}
Expand All @@ -278,7 +279,7 @@ func TestDecreaseReplicaCountMock(t *testing.T) {
desired := provideResource()
latest := provideResource()
res, _ := rm.decreaseReplicaCount(context.Background(), desired, latest)
assert.Equal(mockReplicationGroupDescription, *res.ko.Status.Description)
assert.Equal(mockDescription, *res.ko.Spec.Description)
})
}

Expand Down
14 changes: 7 additions & 7 deletions pkg/resource/replication_group/delta.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading