Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions scripts/build-controller-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ACK_GENERATE_BIN_PATH=${ACK_GENERATE_BIN_PATH:-$DEFAULT_ACK_GENERATE_BIN_PATH}
ACK_GENERATE_API_VERSION=${ACK_GENERATE_API_VERSION:-"v1alpha1"}
ACK_GENERATE_CONFIG_PATH=${ACK_GENERATE_CONFIG_PATH:-""}
ACK_METADATA_CONFIG_PATH=${ACK_METADATA_CONFIG_PATH:-""}
AWS_SDK_GO_VERSION=${AWS_SDK_GO_VERSION:-"v1.35.5"}
AWS_SDK_GO_VERSION=${AWS_SDK_GO_VERSION:-""}

DEFAULT_TEMPLATES_DIR="$ROOT_DIR/../../aws-controllers-k8s/code-generator/templates"
TEMPLATES_DIR=${TEMPLATES_DIR:-$DEFAULT_TEMPLATES_DIR}
Expand Down Expand Up @@ -86,7 +86,7 @@ Environment variables:
Default: $ACK_GENERATE_SERVICE_ACCOUNT_NAME
AWS_SDK_GO_VERSION: Overrides the version of github.com/aws/aws-sdk-go used
by 'ack-generate' to fetch the service API Specifications.
Default: $AWS_SDK_GO_VERSION
Default: Version of aws-controllers-k8s/runtime in go.mod
K8S_RBAC_ROLE_NAME: Name of the Kubernetes Role to use when
generating the RBAC manifests for the
custom resource definitions.
Expand Down Expand Up @@ -137,6 +137,10 @@ RELEASE_VERSION="$2"
K8S_RBAC_ROLE_NAME=${K8S_RBAC_ROLE_NAME:-"ack-$SERVICE-controller"}
ACK_GENERATE_SERVICE_ACCOUNT_NAME=${ACK_GENERATE_SERVICE_ACCOUNT_NAME:-"ack-$SERVICE-controller"}

if [ -z "$AWS_SDK_GO_VERSION" ]; then
AWS_SDK_GO_VERSION=$(go list -m -f '{{ .Version }}' -modfile $SERVICE_CONTROLLER_SOURCE_PATH/go.mod github.com/aws/aws-sdk-go)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

fi

# If there's a generator.yaml in the service's directory and the caller hasn't
# specified an override, use that.
if [ -z "$ACK_GENERATE_CONFIG_PATH" ]; then
Expand Down
5 changes: 5 additions & 0 deletions scripts/build-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Environment variables:
Default: metadata.yaml
AWS_SDK_GO_VERSION: Overrides the version of github.com/aws/aws-sdk-go used
by 'ack-generate' to fetch the service API Specifications.
Default: Version of aws-controllers-k8s/runtime in go.mod
TEMPLATES_DIR: Overrides the directory containg ack-generate templates
Default: $TEMPLATES_DIR
K8S_RBAC_ROLE_NAME: Name of the Kubernetes Role to use when generating
Expand Down Expand Up @@ -129,6 +130,10 @@ echo "Copying common custom resource definitions into $SERVICE"
mkdir -p $config_output_dir/crd/common
cp -r $RUNTIME_CRD_DIR/crd/* $config_output_dir/crd/common/

if [ -z "$AWS_SDK_GO_VERSION" ]; then
AWS_SDK_GO_VERSION=$(go list -m -f '{{ .Version }}' -modfile $SERVICE_CONTROLLER_SOURCE_PATH/go.mod github.com/aws/aws-sdk-go)
fi

# If there's a generator.yaml in the service's directory and the caller hasn't
# specified an override, use that.
if [ -z "$ACK_GENERATE_CONFIG_PATH" ]; then
Expand Down