-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow separate service ID and alias (#211)
Fixes aws-controllers-k8s/community#994 Description of changes: This pull request supports including an optional `--model-name` command line argument for any `ack-generate` generator verb. The generator will use this argument to override the service name when looking up the API files in `aws-sdk-go/models/apis`. Currently we reference the `metadata.serviceId` field from the `api-2.json` file as the `ServiceIDClean` variable. `ServiceIDClean` is used in all code generator templates as the import path for `aws-sdk-go` and when referencing the controller name (eg. `{{ .ServiceIDClean}}-controller`). This pull request will redirect `ServiceIDClean` to use the service alias provided when calling `ack-generate`, instead. Therefore, all subsequent ACK repositories should be named according to the AWS SDK Go package name, rather than the API file's definition of `serviceId`. `ServiceID` has been removed from the template variables, instead replaced by `AWSSDKModelServiceID` if it is needed. `ServiceIDClean` now refers to the name of the AWS SDK Go package name. For services that need to use the `--model-name` command line argument, such as `opensearchservice` and `elbv2`, developers should use the `ACK_GENERATE_MODEL_NAME` environment variable when calling `make build-controller`. Changes to the CI/CD system will need to be made to accommodate this customisation. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
1 parent
0466b01
commit 15c7f5c
Showing
13 changed files
with
110 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.