generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 272
Closed
Labels
area/code-generationIssues or PRs as related to controllers or docs code generationIssues or PRs as related to controllers or docs code generationkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
When regenerating the RDS controller with the latest code-gen, I get the following error:
[jaypipes@thelio code-generator]$ make build-controller SERVICE=rds
building ack-generate ... ok.
Copying common custom resource definitions into rds
Building Kubernetes API objects for rds
Generating deepcopy code for rds
Generating custom resource definitions for rds
Building service controller for rds
Error: template: /home/jaypipes/go/src/github.com/aws-controllers-k8s/code-generator/templates/pkg/resource/resource.go.tpl:77:4: executing "/home/jaypipes/go/src/github.com/aws-controllers-k8s/code-generator/templates/pkg/resource/resource.go.tpl" at <GoCodeSetResourceIdentifiers .CRD "identifier" "r.ko" 1>: error calling GoCodeSetResourceIdentifiers: Primary identifier field 'DBSecurityGroupName' cannot be found in either spec or status.
make: *** [Makefile:32: build-controller] Error 1
The reason for the error is that the DBSecurityGroupName
field of the DBSecurityGroup
resource has been renamed to just Name
and the code that is looking for the primary identifier name is finding the correct field in the Input shape for CreateDBSecurityGroup
, however the code that looks for the same field in the Spec or Status does not find that field because the field is actually renamed, so hits this panic:
The solution for this is to look up the memberName
in the CRD's Config.Renames
block to see if the field has been renamed...
Metadata
Metadata
Assignees
Labels
area/code-generationIssues or PRs as related to controllers or docs code generationIssues or PRs as related to controllers or docs code generationkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.