You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixesaws-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.
0 commit comments